Data transmission method and apparatus based on device reconnection mechanism
Patent Information
- Application Number
- CN202511838400.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-08-14
- Estimated Expiration
- 2045-12-08
AI Technical Summary
[0003]然而,对于硬件设备来说,过于频繁的连接,往往会导致其电量损耗过高,从而导致设备使用寿命缩短
[0043]本申请有益效果为:本申请监测本地的应用程序与数据发送设备之间的第一连接质量特征;获取所述应用程序与数据发送设备的历史连接数据,基于所述历史连接数据获得所述应用程序与数据发送设备之间的第二连接质量特征;根据所述第一连接质量特征、所述第二连接质量特征评估所述应用程序与数据发送设备之间的总连接适配度;根据所述总连接适配度匹配目标重连模式;利用所述目标重连模式进行所述应用程序与数据发送设备的通信链路重连,并通过重连成功的通信链路进行数据传输。由此可见,本申请通过监测应用程序(运行于移动端)与数据发送设备(CGM发射器硬件设备)之间的第一连接质量特征、基于历史连接数据获得第二连接质量特征,结合两类连接质量特征评估总连接适配度并匹配目标重连模式,再利用目标重连模式进行通信链路重连及数据传输,能够全面且精准地掌握两者间的连接状态,让重连策略适配实际连接场景,有效平衡数据传输的实时性与数据发送设备的电量损耗,延长数据发送设备的使用寿命,同时为通信链路重连提供科学依据,提升重连的针对性与有效性,保障数据传输的稳定性与可靠性。
Smart Images

Figure CN121262643B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical device technology, and in particular to a data transmission method and apparatus based on a device reconnection mechanism. Background Technology
[0002] When connecting a CGM (continuous glucose monitoring) Bluetooth hardware device (i.e., data transmitting device) and a mobile device (i.e., data receiving device), in order to ensure the real-time transmission of data, the device and the mobile device are often forced to maintain a connection. If a disconnection occurs, a reconnection is initiated immediately to ensure that data can be received as soon as possible.
[0003] However, for hardware devices, excessively frequent connections often lead to excessive power consumption, thereby shortening the device's lifespan. Finding a balance between data real-time performance and hardware power consumption, ensuring data real-time performance while minimizing power consumption through reconnection strategies, has become a crucial problem to solve.
[0004] In summary, how to reasonably complete the reconnection between devices to balance data transmission efficiency and power consumption is a problem that needs to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a data transmission method and apparatus based on a device reconnection mechanism, which rationally completes the reconnection between devices to balance data transmission efficiency and power consumption. The specific solution is as follows:
[0006] In a first aspect, this application discloses a data transmission method based on a device reconnection mechanism, comprising:
[0007] Monitor the initial connection quality characteristics between local applications and data sending devices;
[0008] Obtain historical connection data between the application and the data sending device, and obtain a second connection quality characteristic between the application and the data sending device based on the historical connection data;
[0009] The overall connection compatibility between the application and the data sending device is evaluated based on the first connection quality characteristic and the second connection quality characteristic.
[0010] Match the target reconnection mode based on the total connection adaptability;
[0011] The application and the data sending device are reconnected using the target reconnection mode, and data is transmitted through the successfully reconnected communication link.
[0012] Optionally, the monitoring of the first connection quality characteristics between the local application and the data sending device includes:
[0013] The system monitors the signal strength between the local application and the data transmission device in real time via Bluetooth.
[0014] Detect the running status information of the application;
[0015] The signal strength and the operating status information are determined as the first connection quality characteristics between the application and the data transmission device.
[0016] Optionally, the running status information can be any one of a first running status, a second running status, and a third running status; wherein, the first running status indicates that the application is in the foreground, the second running status indicates that the application is in the background, and the third running status indicates that the data receiving device is in power saving mode.
[0017] Optionally, the historical connection data includes historical signal strength between the application and the data transmitting device within a first historical time period; obtaining the second connection quality characteristic between the application and the data transmitting device based on the historical connection data includes:
[0018] The coefficient of variation of the historical signal intensity is determined based on the historical signal intensity; wherein the coefficient of variation characterizes the stability of the historical signal intensity.
[0019] The coefficient of variation is determined as the second connection quality characteristic.
[0020] Optionally, determining the coefficient of variation of the historical signal intensity based on the historical signal intensity includes:
[0021] Determine the average value of the historical signal strength, and determine the standard deviation of the historical signal strength based on the average value;
[0022] The ratio of the standard deviation to the mean is determined as the coefficient of variation of the historical signal intensity.
[0023] Optionally, the historical connection data includes connection result records between the application and the data sending device within a second historical time period; obtaining the second connection quality characteristics between the application and the data sending device based on the historical connection data includes:
[0024] The connection success rate within the second historical time period is determined based on the number of successful connections and the number of failed connections recorded in the connection result record, and the connection success rate is defined as the second connection quality feature.
[0025] Optionally, the historical connection data includes the target data transmission method between the application and the data sending device within a third historical time period; obtaining the second connection quality characteristics between the application and the data sending device based on the historical connection data includes:
[0026] Based on the target data transmission method, the real-time data ratio between the application and the data sending device during the third historical time period is determined, and the real-time data ratio is determined as the second connection quality characteristic.
[0027] Optionally, the target data transmission method can be any one of real-time connection transmission, scanning transmission, and historical data review transmission; wherein, the scanning transmission method is a method of receiving data via Bluetooth broadcast based on a preset time interval, and the historical data review transmission method is a method of receiving historical data based on a review method.
[0028] Optionally, the step of evaluating the overall connection compatibility between the application and the data sending device based on the first connection quality characteristic and the second connection quality characteristic includes:
[0029] The first connection fit corresponding to the first connection quality feature and the second connection fit corresponding to the second connection quality feature are evaluated respectively.
[0030] The first connection fit score and the second connection fit score are weighted and summed to obtain the total connection fit score between the application and the data sending device.
[0031] Optionally, matching the target reconnection mode based on the total connection adaptability includes:
[0032] Select the target reconnection mode corresponding to the total connection adaptability from the preset active reconnection mode, the preset balanced reconnection mode, and the preset conservative reconnection mode; wherein the preset active reconnection mode, the preset balanced reconnection mode, and the preset conservative reconnection mode correspond to different reconnection waiting time, reconnection number, and backoff time, respectively.
[0033] Secondly, this application discloses a data transmission device based on a device reconnection mechanism, comprising:
[0034] The first feature acquisition module is used to monitor the first connection quality features between the local application and the data sending device.
[0035] The second feature acquisition module is used to acquire historical connection data between the application and the data transmission device, and to obtain a second connection quality feature between the application and the data transmission device based on the historical connection data;
[0036] The compatibility determination module is used to evaluate the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature.
[0037] The mode determination module is used to match the target reconnection mode based on the total connection adaptability.
[0038] The data transmission module is used to reconnect the communication link between the application and the data sending device using the target reconnection mode, and to transmit data through the successfully reconnected communication link.
[0039] Thirdly, this application discloses an electronic device, including:
[0040] Memory, used to store computer programs;
[0041] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed data transmission method based on a device reconnection mechanism.
[0042] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed data transmission method based on a device reconnection mechanism.
[0043] The beneficial effects of this application are as follows: This application monitors a first connection quality characteristic between a local application and a data transmission device; obtains historical connection data between the application and the data transmission device, and obtains a second connection quality characteristic between the application and the data transmission device based on the historical connection data; evaluates the overall connection compatibility between the application and the data transmission device based on the first connection quality characteristic and the second connection quality characteristic; matches a target reconnection mode based on the overall connection compatibility; reconnects the communication link between the application and the data transmission device using the target reconnection mode, and transmits data through the successfully reconnected communication link. Therefore, this application monitors the first connection quality characteristics between the application (running on a mobile device) and the data transmission device (CGM transmitter hardware device), obtains the second connection quality characteristics based on historical connection data, combines the two types of connection quality characteristics to evaluate the overall connection adaptability and match the target reconnection mode, and then uses the target reconnection mode to reconnect the communication link and transmit data. This allows for a comprehensive and accurate understanding of the connection status between the two, enabling the reconnection strategy to adapt to the actual connection scenario, effectively balancing the real-time nature of data transmission with the power consumption of the data transmission device, extending the service life of the data transmission device, providing a scientific basis for communication link reconnection, improving the targeting and effectiveness of reconnection, and ensuring the stability and reliability of data transmission. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1 This is a flowchart of a data transmission method based on a device reconnection mechanism disclosed in this application;
[0046] Figure 2 This is a specific data transmission diagram disclosed in this application;
[0047] Figure 3 This is a schematic diagram of a data transmission device structure based on a device reconnection mechanism disclosed in this application;
[0048] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0050] When connecting a CGM (continuous glucose monitoring) Bluetooth hardware device (i.e., data transmitting device) and a mobile device (i.e., data receiving device), in order to ensure the real-time transmission of data, the device and the mobile device are often forced to maintain a connection. If a disconnection occurs, a reconnection is initiated immediately to ensure that data can be received as soon as possible.
[0051] However, for hardware devices, excessively frequent connections often lead to excessive power consumption, thereby shortening the device's lifespan. Finding a balance between data real-time performance and hardware power consumption, ensuring data real-time performance while minimizing power consumption through reconnection strategies, has become a crucial problem to solve.
[0052] Therefore, this application provides a data transmission scheme based on a device reconnection mechanism, which reasonably completes the reconnection between devices to balance data transmission effectiveness and power consumption.
[0053] See Figure 1As shown in the figure, this application discloses a data transmission method based on a device reconnection mechanism, including:
[0054] Step S11: Monitor the first connection quality characteristics between the local application and the data sending device.
[0055] Data receiving devices can be mobile phones, iPads, e-readers, etc., while data sending devices can be CGM transmitter hardware. Monitoring the connection quality characteristics between the local application and the data sending device can be done from multiple dimensions. Specifically, it can monitor the signal strength (Received Signal Strength Indicator, i.e., RSSI) and operating status. Signal strength directly reflects the strength of the Bluetooth signal between the two devices. The stronger the signal strength, the better the Bluetooth signal of the CGM hardware device, and the weaker the signal strength, the worse the Bluetooth signal of the hardware device. Operating status information can accurately determine the current activity and resource constraints of the application and the data receiving device. Therefore, using signal strength and operating status information as the primary connection quality characteristics between the application and the data sending device can comprehensively and quantitatively reflect the overall status of the Bluetooth connection between the application and the data sending device, providing key data basis for subsequent construction of a reconnection decision engine and selection of an appropriate reconnection mode.
[0056] In this embodiment, monitoring the first connection quality characteristic between the local application and the data transmitting device includes: monitoring the signal strength between the local application and the data transmitting device in real time via system Bluetooth; detecting the running status information of the application; and determining the signal strength and the running status information as the first connection quality characteristic between the application and the data transmitting device.
[0057] The system Bluetooth of the data receiving device monitors the signal strength between the local application and the data sending device in real time. The system Bluetooth refers to the Bluetooth function module built into the operating system of the data receiving device. The signal strength can also be classified according to its magnitude. Specifically, if the RSSI value is greater than -60, it is classified as the highest signal strength; if the RSSI value is between -70 and -60, it is classified as the medium signal strength; and if the RSSI value is less than -70, it is classified as the low signal strength, thus forming the first connection quality characteristic.
[0058] Simultaneously, the application's running status information is detected, and the signal strength after the above-mentioned classification and the detected running status information are both determined as the first connection quality characteristics between the application and the data sending device. This method can intuitively reflect the basic connection conditions from two dimensions: signal strength and application running status. It provides basic data support for subsequent evaluation of connection adaptability and selection of reconnection mode, and helps to improve the pertinence of reconnection strategies.
[0059] In this embodiment, the running status information is any one of the first running status, the second running status, and the third running status; wherein, the first running status indicates that the application is in the foreground working state, the second running status indicates that the application is in the background working state, and the third running status indicates that the data receiving device is in power saving mode.
[0060] The application's running status information can be any one of the following: a first running status, a second running status, or a third running status. The first running status indicates that the application is currently open or in use in the foreground. The second running status indicates that the application has been running in the background for an extended period, or that the data receiving device is in a background state with the screen off and in sleep mode. The third running status indicates that the data receiving device is in power-saving mode. This running status information accurately determines the current activity level and resource limitations of both the application and the data receiving device. Specifically, being in the foreground indicates a high requirement for real-time data transmission between the application and the data sending device. Being in the background ensures necessary data transmission without requiring all data to be transmitted in real-time. In power-saving mode, the activity of all mobile applications is limited, thus reducing the need for real-time data transmission. Therefore, the application's running status information provides a clear basis for developing adaptive reconnection strategies, helping to balance real-time data transmission with power consumption of the data sending device and extend device lifespan.
[0061] Step S12: Obtain historical connection data between the application and the data sending device, and obtain a second connection quality characteristic between the application and the data sending device based on the historical connection data.
[0062] In a first embodiment for obtaining the second connection quality feature, the historical connection data includes the historical signal strength between the application and the data transmitting device within a first historical time period; obtaining the second connection quality feature between the application and the data transmitting device based on the historical connection data includes: determining the coefficient of variation of the historical signal strength based on the historical signal strength; wherein the coefficient of variation characterizes the stability of the historical signal strength; and determining the coefficient of variation as the second connection quality feature.
[0063] Historical connection data includes the historical signal strength between the application and the data transmitting device within a first historical time period, which is a specified historical time period. The coefficient of variation is used to compare the fluctuation of different datasets or data with different dimensions. Therefore, the smaller the coefficient of variation, the more stable the Bluetooth signal (RSSI) of the hardware device is, and vice versa. Thus, the coefficient of variation is used as the second connection quality feature.
[0064] In this embodiment, determining the coefficient of variation of the historical signal intensity based on the historical signal intensity includes: determining the average value of the historical signal intensity, and determining the standard deviation of the historical signal intensity based on the average value; and determining the ratio of the standard deviation to the average value as the coefficient of variation of the historical signal intensity.
[0065] In determining the coefficient of variation of signal strength, firstly, the average signal strength (miu) within the first historical time period is determined, i.e., the average signal strength (miu) = (the sum of signal strengths within the first historical time period) / (the number of signal strengths within the first historical time period); secondly, the standard deviation of the signal strength is determined based on the average value, i.e. ;in, Let represent the i-th signal strength, and N represent the number of signal strengths within the first historical time period. Next, the ratio of the standard deviation to the mean is determined as the coefficient of variation (CV) of the signal strength, i.e., . Specifically, the level can also be classified by the coefficient of variation. For example, by checking the coefficient of variation of RSSI values of hardware devices for two or more rounds, if the coefficient of variation is less than 20%, it is marked as very stable signal strength; if the coefficient of variation is between 20% and 40%, it is marked as moderately stable signal strength; and if the coefficient of variation is greater than 40%, it is marked as unstable signal strength.
[0066] In the second embodiment for obtaining the second connection quality feature, the historical connection data includes connection result records between the application and the data sending device within a second historical time period; obtaining the second connection quality feature between the application and the data sending device based on the historical connection data includes: determining the connection success rate within the second historical time period based on the number of successful connections and the number of failed connections in the connection result records, and determining the connection success rate as the second connection quality feature.
[0067] Each time the application and hardware device connect, the connection result is recorded in the application as a basis for subsequent judgment. The success rate of the application's connection to the hardware device is retrieved within a continuous historical period (i.e., a specified second historical time period). A higher success rate indicates a more stable hardware device. Specifically, the connection result records between the application and the data sending device are monitored within the second historical time period. The connection success rate within the second historical time period is determined based on the number of successful connections and the number of failed connections recorded. That is, connection success rate = number of successful connections / sum of successful connections and failed connections. The connection success rate is defined as the second connection quality characteristic. Further, the connection success rate is categorized. Specifically, the success rate of connecting to the hardware device in one or more past rounds is recorded. If the connection success rate is greater than 80%, it is marked as high success rate; if the connection success rate is between 50% and 80%, it is marked as medium success rate; and if the connection success rate is less than 50%, it is marked as low success rate.
[0068] In the third embodiment for obtaining the second connection quality feature, the historical connection data includes the target data transmission mode between the application and the data sending device within a third historical time period; obtaining the second connection quality feature between the application and the data sending device based on the historical connection data includes: determining the real-time data ratio between the application and the data sending device within the third historical time period based on the target data transmission mode, and determining the real-time data ratio as the second connection quality feature.
[0069] Historical connection data includes the target data transmission method between the application and the data sending device during the third historical time period. Based on the target data transmission method, a second connection quality characteristic is obtained between the two, that is, the proportion of real-time data volume through the target data transmission method to the total data volume during the third historical time period. This is used to determine the real-time data ratio between the application and the data sending device during the third historical time period, and this real-time data ratio is determined as the second connection quality characteristic. Furthermore, the third historical time period is examined, and a level is classified based on the real-time data ratio. If the real-time data ratio exceeds 80%, it is marked as a stable device; otherwise, it is marked as an ordinary device.
[0070] Real-time data ratios can quantify the stability of historical data transmission, providing a key reference for a comprehensive assessment of connection quality and helping to improve the accuracy of subsequent reconnection pattern matching.
[0071] In this embodiment, the target data transmission method is any one of real-time connection transmission, scanning transmission, and historical data review transmission; wherein, the scanning transmission method is a method of receiving data via Bluetooth broadcast based on a preset time interval, and the historical data review transmission method is a method of receiving historical data based on a review method.
[0072] The target data transmission method between the application and the data transmitting device can be any one of the following: real-time connection transmission, scanning transmission, or historical data review transmission. Real-time connection transmission means the application maintains a constant connection with the data transmitting device, and every piece of data generated by the device is transmitted to the application via Bluetooth immediately, indicating a stable Bluetooth signal connection. Scanning transmission means the application periodically initiates Bluetooth scanning and acquires data by receiving Bluetooth broadcasts. This method is only used when local data is complete and the data transmitting device's Bluetooth signal (RSSI) is stable; it also indicates a stable Bluetooth signal connection. Historical data review transmission is a method of receiving historical data retrospectively. Specifically, this occurs when the application is not connected to the data transmitting device, or when the application does not continuously scan for Bluetooth signals from the device, but instead waits until a successful connection is established to retrieve data lost due to connection drops. This indicates an unstable Bluetooth signal connection.
[0073] Every time data is transmitted between the application and the data sending device, the application records the method in which the data is transmitted, i.e., records the target transmission method, as a basis for subsequent judgment.
[0074] The first, second, and third historical time periods are all pre-defined historical time periods based on actual application scenarios and technical requirements. Their core function is to provide a time range for the calculation and evaluation of different second connection quality characteristics, ensuring that the collection and analysis of various characteristic data have a clear and unified time benchmark. Specifically, the first historical time period is mainly used to obtain historical signal strength between the application and the data transmitting device, providing a data source for calculating the coefficient of variation to assess signal stability. This time period needs to cover a sufficient number of signal strength samples to ensure the accuracy of the coefficient of variation calculation. The second historical time period is used to statistically analyze the connection success rates between the application and the data transmitting device in one or more past rounds, thereby determining the historical connection success rate. Its length needs to be adapted to the connection cycle to ensure that it reflects the results of a certain number of connection attempts, making the success rate assessment more representative. The third historical time period targets the target data transmission method and is used to statistically analyze the real-time data ratio. This time period needs to cover a sufficient transmission cycle to comprehensively reflect the proportion of different transmission methods, providing support for assessing the stability of data transmission. Although all three are specified historical time periods, their specific durations can be flexibly set according to actual monitoring needs, equipment characteristics, and data transmission frequency. By clarifying the time range corresponding to different dimensions of connection quality characteristics, the pertinence and effectiveness of each characteristic data can be ensured, laying a reliable data foundation for subsequent overall connection adaptability assessment and target reconnection mode matching.
[0075] Step S13: Evaluate the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature.
[0076] In this embodiment, the step of evaluating the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature includes: evaluating the first connection compatibility corresponding to the first connection quality feature and the second connection compatibility corresponding to the second connection quality feature respectively; and weighting and summing the first connection compatibility and the second connection compatibility to obtain the overall connection compatibility between the application and the data sending device.
[0077] The first connection quality characteristic includes signal strength and operating status information, while the second connection quality characteristic includes coefficient of variation, connection success rate, and real-time data ratio. The first connection adaptability corresponding to the first connection quality characteristic and the second connection adaptability corresponding to the second connection quality characteristic are evaluated separately. Different connection quality characteristics are matched with corresponding preset level classification conditions to evaluate the connection adaptability corresponding to each connection quality characteristic, and different preset level classification conditions are applied to different characteristics. Then, combined with the connection parameter quality weights, the first connection adaptability and the second connection adaptability are weighted and summed to obtain the total connection adaptability between the application and the data sending device. This comprehensively and quantitatively reflects the connection adaptability between the two, providing a scientific basis for subsequent selection of the appropriate reconnection mode, thereby effectively balancing the real-time performance of data transmission and the power consumption of the data sending device, and extending the device's lifespan.
[0078] Regarding signal strength, the preset level classification conditions are constructed based on a first signal strength threshold and a second signal strength threshold, with the first signal strength threshold being greater than the second signal strength threshold. Specifically, if the signal strength is greater than the first signal strength threshold, the first connection adaptability is determined as the first preset score; if the signal strength is not greater than the first signal strength threshold but greater than the second signal strength threshold, the first connection adaptability is determined as the second preset score; and if the signal strength is less than the second signal strength threshold, the first connection adaptability is determined as the third preset score. Specifically, the first signal strength threshold is -60, the second signal strength threshold is -70, the first preset score is 2, the second preset score is 0, and the third preset score is -2, as shown in Table 1.
[0079] Table 1 Connection compatibility of signal strength
[0080]
[0081] The operating status information is matched with preset level classification conditions to evaluate the second connection adaptability corresponding to the operating status information. Specifically, if the operating status information is in the foreground working state, the first connection adaptability is the fourth preset score; if the operating status information is in the background working state, the first connection adaptability is the fifth preset score; and if the operating status information is in power saving mode, the first connection adaptability is the sixth preset score. Among these, the fourth preset score is +2, the fifth preset score is 0, and the sixth preset score is -2, as shown in Table 2.
[0082] Table 2 Connection Adaptability of Running Status Information
[0083]
[0084] For the coefficient of variation, the preset level classification conditions are constructed based on a first coefficient of variation threshold and a second coefficient of variation threshold, with the first coefficient of variation threshold being less than the second coefficient of variation threshold. That is, if the coefficient of variation is not greater than the first coefficient of variation threshold, the second connection fit is determined to be the seventh preset score; if the coefficient of variation is greater than the first coefficient of variation threshold but not greater than the second coefficient of variation threshold, the second connection fit is determined to be the eighth preset score; and if the coefficient of variation is greater than the second coefficient of variation threshold, the second connection fit is determined to be the ninth preset score. Specifically, the first coefficient of variation threshold is 20%, the second coefficient of variation threshold is 40%, the seventh preset score is 1, the eighth preset score is 0, and the ninth preset score is -1, as shown in Table 3.
[0085] Table 3. Connection fit of coefficient of variation
[0086]
[0087] Regarding connection success rate, the preset level classification conditions are constructed based on a first success rate threshold and a second success rate threshold, with the first success rate threshold being greater than the second success rate threshold. Specifically, if the connection success rate is not less than the first success rate threshold, the second connection adaptability is determined to be the tenth preset score; if the connection success rate is less than the first success rate threshold but not less than the second success rate threshold, the second connection adaptability is determined to be the eleventh preset score; and if the connection success rate is less than the second success rate threshold, the second connection adaptability is determined to be the twelfth preset score. Specifically, the first success rate threshold is 80%, the second success rate threshold is 50%, the tenth preset score is +2, the eleventh preset score is 0, and the twelfth preset score is -2, as shown in Table 4.
[0088] Table 4 Connection Success Rate and Connection Adaptability
[0089]
[0090] The real-time data ratio is matched with preset level classification conditions. These preset level classification conditions are constructed based on a first ratio threshold and a second ratio threshold, with the first ratio threshold being greater than the second ratio threshold. That is, if the real-time data ratio is not less than the first success rate threshold, the second connection adaptation is determined to be the thirteenth preset score; if the real-time data ratio is less than the first success rate threshold but not less than the second success rate threshold, the second connection adaptation is determined to be the fourteenth preset score; and if the real-time data ratio is less than the second success rate threshold, the second connection adaptation is determined to be the fifteenth preset score. Specifically, the first ratio threshold is 80%, the second ratio threshold is 50%, the thirteenth preset score is 1, the fourteenth preset score is 0, and the fifteenth preset score is -1, as shown in Table 5.
[0091] Table 5 Connection Adaptability of Real-Time Data Ratio
[0092]
[0093] Step S14: Match the target reconnection mode according to the total connection adaptability.
[0094] In this embodiment, matching the target reconnection mode according to the total connection adaptability includes: selecting the target reconnection mode corresponding to the total connection adaptability from a preset aggressive reconnection mode, a preset balanced reconnection mode, and a preset conservative reconnection mode; wherein, the preset aggressive reconnection mode, the preset balanced reconnection mode, and the preset conservative reconnection mode correspond to different reconnection waiting times, reconnection times, and backoff times, respectively.
[0095] Choose the target reconnection mode corresponding to the total connection fit from the preset active reconnection mode, preset balanced reconnection mode, and preset conservative reconnection mode. It can be understood that the higher the total connection fit, the more likely the preset active reconnection mode will be selected; the medium total connection fit will select the preset balanced reconnection mode; and the lower the total connection fit, the more likely the preset conservative reconnection mode will be selected. Based on the selected target reconnection mode, attempt to reconnect the communication link with the data sending device.
[0096] In the default active reconnection mode, the system will pursue real-time connection and data transmission regardless of cost. Its corresponding reconnection waiting time is 800ms~1s, the number of reconnections is unlimited, and the backoff time is a fixed interval. It is suitable for scenarios with strong RSSI, stable signal, high historical connection success rate, data mainly relies on real-time transmission, and the application is in the foreground.
[0097] In the preset balanced reconnection mode, a balance is sought between cost and real-time performance. Depending on different scenarios and states, a limited bias is applied between the two modes. The corresponding initial reconnection waiting time is 1s to 3s, the number of reconnections is limited to 10 (if the limit is exceeded, the connection will be initiated again after waiting 60s for the next data transmission), and the backoff time is exponential (e.g., 3s for the first disconnection, 6s for the second, and so on up to 30s). It is suitable for scenarios with medium RSSI, medium signal stability, a historical connection success rate of more than 50%, and more than 50% of the data relying on real-time transmission.
[0098] In the default conservative reconnection mode, battery life is prioritized, and only necessary connections and data transmissions are performed, allowing for the sacrifice of some data real-time performance. The corresponding reconnection waiting time is 20 seconds, the number of reconnections is only 2 to 3 times within a 60-second output cycle, and the backoff time is a fixed value of 20 seconds after failure (or reconnection is triggered when the RSSI value improves or when the user opens the application). It is suitable for scenarios with weak RSSI, unstable signal, low historical connection success rate, data mainly relying on retrospective transmission, and applications running in the background or mobile devices in power-saving mode.
[0099] By matching the overall connection adaptability with the corresponding reconnection mode, the reconnection strategy can be accurately adapted to different connection scenarios. While ensuring the real-time data transmission requirements, it minimizes the power consumption of the data sending device and extends the device's lifespan. The specific reconnection modes are shown in Table 6.
[0100] Table 6 Reconnection Modes
[0101]
[0102] Step S15: Reconnect the communication link between the application and the data sending device using the target reconnection mode, and transmit data through the successfully reconnected communication link.
[0103] Understandably, when attempting to reconnect the communication link with the data sending device based on the target reconnection mode, it is also necessary to record the connection result, for example... Figure 2 The diagram illustrates a specific data transmission scenario. In the current reconnection situation, if the connection is successful, the local connection record is updated to record this reconnection as a successful connection; if the connection fails, the local connection record is updated to record this reconnection as a failed connection, and the system waits for the next reconnection based on the reconnection waiting time and backoff time set in the target reconnection mode.
[0104] The beneficial effects of this application are as follows: This application monitors a first connection quality characteristic between a local application and a data transmission device; obtains historical connection data between the application and the data transmission device, and obtains a second connection quality characteristic between the application and the data transmission device based on the historical connection data; evaluates the overall connection compatibility between the application and the data transmission device based on the first connection quality characteristic and the second connection quality characteristic; matches a target reconnection mode based on the overall connection compatibility; reconnects the communication link between the application and the data transmission device using the target reconnection mode, and transmits data through the successfully reconnected communication link. Therefore, this application monitors the first connection quality characteristics between the application (running on a mobile device) and the data transmission device (CGM transmitter hardware device), obtains the second connection quality characteristics based on historical connection data, combines the two types of connection quality characteristics to evaluate the overall connection adaptability and match the target reconnection mode, and then uses the target reconnection mode to reconnect the communication link and transmit data. This allows for a comprehensive and accurate understanding of the connection status between the two, enabling the reconnection strategy to adapt to the actual connection scenario, effectively balancing the real-time nature of data transmission with the power consumption of the data transmission device, extending the service life of the data transmission device, providing a scientific basis for communication link reconnection, improving the targeting and effectiveness of reconnection, and ensuring the stability and reliability of data transmission.
[0105] See Figure 3As shown in the figure, this application discloses a data transmission device based on a device reconnection mechanism, including:
[0106] The first feature acquisition module 11 is used to monitor the first connection quality feature between the local application and the data sending device;
[0107] The second feature acquisition module 12 is used to acquire historical connection data between the application and the data transmission device, and to obtain a second connection quality feature between the application and the data transmission device based on the historical connection data.
[0108] The compatibility determination module 13 is used to evaluate the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature.
[0109] The mode determination module 14 is used to match the target reconnection mode according to the total connection adaptability.
[0110] The data transmission module 15 is used to reconnect the communication link between the application and the data sending device using the target reconnection mode, and to transmit data through the successfully reconnected communication link.
[0111] Furthermore, embodiments of this application also provide an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0112] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data transmission method based on a device reconnection mechanism, which is executed by the electronic device as disclosed in any of the foregoing embodiments.
[0113] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0114] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0115] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0116] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the data transmission method based on the device reconnection mechanism disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0117] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned data transmission method based on a device reconnection mechanism. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0118] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0119] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software module may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the art.
[0120] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] The present invention has provided a detailed description of a data transmission method and apparatus based on a device reconnection mechanism. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data transmission method based on a device reconnection mechanism, characterized in that, include: Monitor a first connection quality characteristic between a local application and a data transmission device, wherein the first connection quality characteristic includes: signal strength and the running status information of the application; The application obtains historical connection data between the application and the data transmitting device, and obtains a second connection quality feature between the application and the data transmitting device based on the historical connection data. The second connection quality feature includes at least one of the following: coefficient of variation for characterizing the stability of historical signal strength, connection success rate within a historical time period, and real-time data ratio within a historical time period. The overall connection compatibility between the application and the data sending device is evaluated based on the first connection quality characteristic and the second connection quality characteristic. The target reconnection mode is matched according to the total connection adaptability, wherein the target reconnection mode includes the following parameters: reconnection waiting time, number of reconnections and backoff time; The application and the data sending device are reconnected using the target reconnection mode, and data is transmitted through the successfully reconnected communication link. The step of evaluating the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature includes: matching the first connection quality feature and the second connection quality feature with corresponding preset level classification conditions to evaluate the first connection compatibility corresponding to the first connection quality feature and the second connection compatibility corresponding to the second connection quality feature; and performing a weighted summation of the first connection compatibility and the second connection compatibility to obtain the overall connection compatibility between the application and the data sending device; wherein the first connection quality feature and the second connection quality feature correspond to different preset level classification conditions.
2. The data transmission method based on the device reconnection mechanism according to claim 1, characterized in that, The first connection quality characteristic monitored between the local application and the data sending device includes: The system monitors the signal strength between the local application and the data transmission device in real time via Bluetooth. Detect the running status information of the application; The signal strength and the operating status information are determined as the first connection quality characteristics between the application and the data transmission device.
3. The data transmission method based on the device reconnection mechanism according to claim 2, characterized in that, The running status information is any one of the first running status, the second running status, and the third running status; wherein, the first running status indicates that the application is in the foreground, the second running status indicates that the application is in the background, and the third running status indicates that the data receiving device is in power saving mode.
4. The data transmission method based on the device reconnection mechanism according to claim 1, characterized in that, The historical connection data includes the historical signal strength between the application and the data transmitting device within a first historical time period; obtaining the second connection quality characteristic between the application and the data transmitting device based on the historical connection data includes: The coefficient of variation of the historical signal intensity is determined based on the historical signal intensity; wherein the coefficient of variation characterizes the stability of the historical signal intensity. The coefficient of variation is determined as the second connection quality characteristic.
5. The data transmission method based on the device reconnection mechanism according to claim 4, characterized in that, The determination of the coefficient of variation of the historical signal strength based on the historical signal strength includes: Determine the average value of the historical signal strength, and determine the standard deviation of the historical signal strength based on the average value; The ratio of the standard deviation to the mean is determined as the coefficient of variation of the historical signal intensity.
6. The data transmission method based on the device reconnection mechanism according to claim 1, characterized in that, The historical connection data includes connection result records between the application and the data sending device within a second historical time period; obtaining the second connection quality characteristics between the application and the data sending device based on the historical connection data includes: The connection success rate within the second historical time period is determined based on the number of successful connections and the number of failed connections recorded in the connection result record, and the connection success rate is defined as the second connection quality feature.
7. The data transmission method based on the device reconnection mechanism according to claim 1, characterized in that, The historical connection data includes the target data transmission method between the application and the data sending device within a third historical time period; obtaining the second connection quality characteristics between the application and the data sending device based on the historical connection data includes: Based on the target data transmission method, the real-time data ratio between the application and the data sending device during the third historical time period is determined, and the real-time data ratio is determined as the second connection quality characteristic.
8. The data transmission method based on the device reconnection mechanism according to claim 7, characterized in that, The target data transmission method can be any one of real-time connection transmission, scanning transmission, and historical data review transmission; wherein, the scanning transmission method is a method of receiving data via Bluetooth broadcast based on a preset time interval, and the historical data review transmission method is a method of receiving historical data based on a review method.
9. The data transmission method based on a device reconnection mechanism according to any one of claims 1 to 8, characterized in that, The step of matching the target reconnection mode based on the total connection adaptability includes: Select the target reconnection mode corresponding to the total connection adaptability from the preset active reconnection mode, the preset balanced reconnection mode, and the preset conservative reconnection mode; wherein the preset active reconnection mode, the preset balanced reconnection mode, and the preset conservative reconnection mode correspond to different reconnection waiting time, reconnection number, and backoff time, respectively.
10. A data transmission device based on a device reconnection mechanism, characterized in that, A data transmission method based on a device reconnection mechanism as described in any one of claims 1 to 9 includes: The first feature acquisition module is used to monitor the first connection quality features between the local application and the data sending device. The second feature acquisition module is used to acquire historical connection data between the application and the data transmission device, and to obtain a second connection quality feature between the application and the data transmission device based on the historical connection data; The compatibility determination module is used to evaluate the overall connection compatibility between the application and the data sending device based on the first connection quality feature and the second connection quality feature. The mode determination module is used to match the target reconnection mode based on the total connection adaptability. The data transmission module is used to reconnect the communication link between the application and the data sending device using the target reconnection mode, and to transmit data through the successfully reconnected communication link.
Citation Information
Patent Citations
Interface connection method and device, electronic equipment and readable storage medium
CN119946120A
Equipment connection control method, terminal equipment and system
CN120152061A
Bluetooth connection method and system
CN120201398A
Network connection method, connection system and storage medium
CN120676424A
Equipment connection method and electronic equipment
CN120825824A