CN-120378436-B - Data synchronization method for intelligent medicine box and mobile terminal
Abstract
The invention relates to the technical field of data transmission, in particular to a data synchronization method of an intelligent medicine box and a mobile terminal, which comprises the steps of determining a data synchronization tendency type based on the data interaction frequency and the connection stability degree of the intelligent medicine box and the mobile terminal in a preset time before data synchronization; the method comprises the steps of determining a data synchronization method based on the data synchronization trend type and the real-time connection stability degree of the intelligent medicine box and the mobile terminal, determining secondary division synchronous data or adjusting synchronous data transmission sequence according to whether the abnormal connection time point distribution of the intelligent medicine box and the mobile terminal is uniform or not and the single batch of data volume, and adjusting the preset interaction frequency and the preset connection stability degree or adjusting the data synchronization interval based on the data synchronization precision and the synchronous data growth rate in a preset period.
Inventors
- ZHU HAIYAN
- FAN XI
- TANG QI
- YI WEN
- XU MAOLIN
- WANG MENG
- PENG YAOJUN
- PENG YAWEN
- PAN BO
- HAN GUOXIN
- TANG GUOQING
- CHEN JIE
Assignees
- 中国人民解放军总医院第一医学中心
Dates
- Publication Date
- 20260505
- Application Date
- 20250407
Claims (7)
- 1. The data synchronization method of the intelligent medicine box and the mobile terminal is characterized by comprising the following steps: acquiring data synchronization data and connection data of the intelligent medicine box and the mobile terminal in a preset time before data synchronization; determining a data synchronization tendency type based on the data interaction frequency and the connection stability degree of the intelligent medicine box and the mobile terminal in a preset time before data synchronization; Determining whether to perform data synchronization of the intelligent medicine box and the mobile terminal in a batch data synchronization mode or a timing data synchronization mode based on the data synchronization trend type of the intelligent medicine box and the mobile terminal and the real-time connection stability degree, and determining whether to perform data synchronization of the intelligent medicine box and the mobile terminal in a key data synchronization mode based on the real-time connection stability degree; when the data synchronization of the intelligent medicine box and the mobile terminal is carried out in a batch data synchronization mode, determining secondary division synchronous data or adjusting the transmission sequence of the synchronous data according to whether the abnormal connection time point distribution of the intelligent medicine box and the mobile terminal is uniform and the single batch data volume; Determining to adjust the preset interaction frequency and the preset connection stability degree or adjust the data synchronization interval based on the data synchronization precision and the synchronous data growth rate in a preset period; determining the data synchronization trend type includes: if the data interaction frequency of the intelligent medicine box and the mobile terminal is larger than the preset interaction frequency and the connection stability degree is smaller than the preset stability degree in the preset time before data synchronization, determining that the data synchronization tendency type is a strong data synchronization tendency type; If the data interaction frequency of the intelligent medicine box and the mobile terminal is smaller than or equal to the preset interaction frequency or the connection stability degree is larger than or equal to the preset stability degree in the preset time before the data synchronization, determining that the data synchronization tendency type is a weak data synchronization tendency type; The connection stability degree is determined according to the packet loss rate in the preset time and the connection interruption times; Determining whether to perform data synchronization of the intelligent medicine box and the mobile terminal in a batch data synchronization mode or a timing data synchronization mode based on the data synchronization trend type of the intelligent medicine box and the mobile terminal and the real-time connection stability degree, and determining whether to perform data synchronization of the intelligent medicine box and the mobile terminal in a key data synchronization mode based on the real-time connection stability degree, comprising: if the data synchronization tendency type of the intelligent medicine box and the mobile terminal is a strong data synchronization tendency type and the real-time connection stability degree is smaller than the preset real-time connection stability degree, determining to synchronize the data of the intelligent medicine box and the mobile terminal in a batch data synchronization mode; If the data synchronization tendency type of the intelligent medicine box and the mobile terminal is a weak data synchronization tendency type and the real-time connection stability degree is smaller than the preset real-time connection stability degree, determining to synchronize the data of the intelligent medicine box and the mobile terminal in a key data synchronization mode; if the real-time connection stability degree is greater than or equal to the preset real-time connection stability degree, determining to synchronize the data of the intelligent medicine box and the mobile terminal in a timing data synchronization mode.
- 2. The method for synchronizing data between an intelligent medicine box and a mobile terminal according to claim 1, wherein the preset interaction frequency is determined according to a historical average value of the data interaction frequency between the intelligent medicine box and the mobile terminal, and the preset connection stability degree is determined according to a historical average value of the connection stability degree between the intelligent medicine box and the mobile terminal.
- 3. The method for synchronizing data between a smart medicine box and a mobile terminal according to claim 2, wherein determining the secondary division synchronization data or adjusting the synchronization data transmission sequence comprises: If the abnormal connection time points of the intelligent medicine box and the mobile terminal are unevenly distributed and the single batch data volume is larger than the preset data volume, determining secondary division synchronous data; if the abnormal connection time points of the intelligent medicine box and the mobile terminal are uniformly distributed, or the single batch data volume is smaller than or equal to the preset data volume, determining to adjust the synchronous data transmission sequence.
- 4. The method for synchronizing data between a smart medicine box and a mobile terminal according to claim 3, wherein determining whether the distribution of abnormal points in time of connection of the smart medicine box and the mobile terminal is uniform comprises: Uniformly dividing the occurrence time period of the connection abnormal event into a plurality of time intervals, and counting the number of the connection abnormal events in each time interval; Calculating the average number of connection abnormal events in each time interval; Comparing the absolute value of the difference between the number of the connected abnormal events and the average number in each time interval with the absolute value of the preset difference; the number of time intervals between the absolute value of the difference between the number of the abnormal connection events and the average number and the absolute value of the preset difference is larger than the preset number, and the abnormal connection time point distribution of the intelligent medicine box and the mobile terminal is determined to be uneven.
- 5. The method for synchronizing data between a smart medicine box and a mobile terminal according to claim 4, wherein the abnormal connection event comprises a connection interruption, a data transmission failure and a packet loss.
- 6. The method for synchronizing data between an intelligent medicine box and a mobile terminal according to claim 5, wherein determining to adjust the preset interaction frequency and the preset connection stability degree or adjusting the data synchronization interval comprises: If the data synchronization precision in the preset period is smaller than the preset synchronization precision and the synchronous data increase rate is larger than the preset increase amount, determining to adjust the data synchronization interval; And if the data synchronization precision in the preset period is smaller than the preset synchronization precision and the synchronous data increment rate is smaller than or equal to the preset increment amount, determining to adjust the preset interaction frequency and the preset connection stability.
- 7. The method for synchronizing data between an intelligent medicine box and a mobile terminal according to claim 6, wherein the adjustment amount of the data synchronization interval is positively correlated with the synchronous data increment rate, the preset interaction frequency is positively correlated with the data synchronization precision in a preset period, and the preset connection stability is positively correlated with the data synchronization precision in the preset period.
Description
Data synchronization method for intelligent medicine box and mobile terminal Technical Field The invention relates to the technical field of data transmission, in particular to a data synchronization method of an intelligent medicine box and a mobile terminal. Background In an actual usage scenario, network environments where the intelligent medicine box and the mobile terminal are located are quite different, from an indoor stable Wi-Fi environment to an outdoor mobile network with unstable signals, different network conditions have significant influence on stability and efficiency of data synchronization, when the network signals are not good, the situation of delay, interruption or data loss can occur in data synchronization, user experience is seriously affected, for example, in an area with weak signals such as an elevator and a basement, the intelligent medicine box can not synchronize medicine data to the mobile terminal in time, and a user misses important medicine reminding or lacks important use data of the intelligent medicine box. For example, CN109121176B discloses a distributed data synchronization method, which optimizes a diffusion node selection mechanism for performing data synchronization by message diffusion between nodes in a gossip protocol according to the characteristics of limited channel bandwidth, most connectionless transmission modes, low information transmission rate, relatively high error rate and small service capacity in a wireless network environment, and selects an optimal data synchronization node by constraint conditions such as heartbeat index, bandwidth, delay jitter and transmission path, thereby effectively improving the distributed data synchronization performance, avoiding triggering a large amount of invalid information by random diffusion of messages between nodes when the traditional Goss ip protocol is used in the wireless network environment, seriously consuming communication resources of the wireless network, and affecting the distributed data synchronization performance. However, in the prior art, the problem that the network environment analysis is not accurate enough when the data are synchronized, so that the data synchronization precision is low and the data synchronization is incomplete due to network fluctuation exists. Disclosure of Invention Therefore, the invention provides a data synchronization method of an intelligent medicine box and a mobile terminal, which is used for solving the problems of low data synchronization precision and incomplete data synchronization caused by network fluctuation due to insufficient network environment analysis during data synchronization in the prior art. In order to achieve the above object, the present invention provides a data synchronization method for an intelligent medicine box and a mobile terminal, comprising: acquiring data synchronization data and connection data of the intelligent medicine box and the mobile terminal in a preset time before data synchronization; determining a data synchronization tendency type based on the data interaction frequency and the connection stability degree of the intelligent medicine box and the mobile terminal in a preset time before data synchronization; Determining a batch data synchronization mode, a timing data synchronization mode or a key data synchronization mode based on the data synchronization trend type of the intelligent medicine box and the mobile terminal and the real-time connection stability degree, and performing data synchronization of the intelligent medicine box and the mobile terminal; when the data synchronization of the intelligent medicine box and the mobile terminal is carried out in a batch data synchronization mode, determining secondary division synchronous data or adjusting the transmission sequence of the synchronous data according to whether the abnormal connection time point distribution of the intelligent medicine box and the mobile terminal is uniform and the single batch data volume; And adjusting the preset interaction frequency and the preset connection stability degree or adjusting the data synchronization interval based on the data synchronization precision and the synchronous data growth rate in the preset period. Further, determining the data synchronization tendency type includes: if the data interaction frequency of the intelligent medicine box and the mobile terminal is larger than the preset interaction frequency and the connection stability degree is smaller than the preset stability degree in the preset time before data synchronization, determining that the data synchronization tendency type is a strong data synchronization tendency type; And if the data interaction frequency of the intelligent medicine box and the mobile terminal is smaller than or equal to the preset interaction frequency or the connection stability degree is larger than or equal to the preset stability degree in the preset time before the data synchronization