Information processing methods, devices, equipment, media and program products
By dynamically adjusting the data volume and optimizing retransmission for data synchronization in smart access control devices, the problem of poor user experience caused by single-threaded transmission has been solved, achieving more efficient data transmission.
Patent Information
- Application Number
- CN202411505215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-10-25
AI Technical Summary
When synchronizing data between smart access control devices in the park, single-threaded transmission leads to a poor user experience, especially when there are many devices or a large amount of data, resulting in excessively long transmission times.
By acquiring parameters such as the minimum expected data volume that can be transmitted within the target device's time range, the successful transmission time, the idle transmission time, and the timeout time for transmission failure, the data volume is dynamically adjusted and retransmissions are performed to optimize the data synchronization process.
It improved the success rate and transmission rate of data retransmission, shortened the transmission time, and enhanced the user experience.
Smart Images

Figure CN119383716B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Internet of Things (IoT) technology, and in particular relates to an information processing method, apparatus, device, computer storage medium, and computer program product. Background Technology
[0002] When permissions are modified or added within the park, relevant data needs to be synchronized with the smart access control devices in the park to ensure that the modified and added permissions are configured synchronously in the smart access control device system. Similarly, when initially setting up the devices, all user permission information and other data from the park need to be synchronized to the devices.
[0003] Currently, during data synchronization, remote management servers typically send data to various smart access control devices via API calls or file transfers. Since smart access control devices are single-threaded, they cannot perform other tasks while synchronizing data, rendering them unusable by users. When there are many smart access control devices to synchronize or the amount of data to be synchronized is large, the transmission time is often lengthy, resulting in a poor user experience. Summary of the Invention
[0004] This application provides an information processing method, apparatus, device, computer storage medium, and computer program product that can improve the efficiency of data synchronization, thereby enhancing the user experience.
[0005] In a first aspect, embodiments of this application provide an information processing method, including:
[0006] Obtain the first interface transmission result, which is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface;
[0007] When the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the timeout of the transmission failure, and the total amount of data that failed to be transmitted are obtained.
[0008] The amount of data to be synchronized second is calculated based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the timeout of transmission failure, and the total amount of data that failed to be transmitted.
[0009] The second data to be synchronized is extracted from the first data to be synchronized based on the amount of data in the second data to be synchronized.
[0010] Send the second set of data to be synchronized to the target device.
[0011] In one optional implementation, the amount of data to be synchronized second is calculated based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the idle transmission time, the timeout time for transmission failure, and the total amount of data that failed to be transmitted, including:
[0012] The sorting weight is calculated based on the successful transmission time, the empty transmission time, and the timeout time for failed transmissions.
[0013] Calculate the product of the sorting weight and the total amount of data that failed to be transmitted;
[0014] Add the product to the amount of data that can be transmitted within the minimum expected time range to obtain the amount of data to be synchronized for the second time.
[0015] In an optional implementation, before obtaining the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed transmission, when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the method further includes:
[0016] Obtain the total amount of data successfully transmitted and the total duration of data transmission for the target device within a preset time period;
[0017] Divide the total amount of successfully transmitted data by the total transmission time to obtain the average transmission rate of the target device.
[0018] The product of the average transmission rate and the preset minimum estimated time is calculated to obtain the amount of data that can be transmitted within the minimum estimated time range.
[0019] In one optional implementation, before obtaining the first interface transmission result, the method further includes:
[0020] Get the data volume of the first data to be synchronized;
[0021] Based on the amount of data to be synchronized, extract the first data to be synchronized from the preset data queue to be transmitted;
[0022] The first data to be synchronized is transmitted to the target device according to the predetermined first transmission period.
[0023] In one optional implementation, before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method further includes:
[0024] Get the usage records of the target device within the synchronization time period window. The usage records include the time when the target device was used. The synchronization time period window includes the synchronization period and the preset period adjacent to the synchronization period.
[0025] Determine the expected usage time of the target device within the synchronization period based on usage records;
[0026] Calculate the time interval between the target time and the expected usage time;
[0027] Calculate the difference in duration between the time interval and the air transmission time;
[0028] If the duration difference meets the preset conditions, the time period with the target time as the starting time and the duration difference as the duration will be determined as the first transmission period.
[0029] In one alternative implementation, before acquiring the first usage record of the target device within the synchronization time period window, the method further includes:
[0030] Obtain the usage count set, which includes the usage count of the target device corresponding to multiple time period windows within the target time period;
[0031] The time period window corresponding to the smallest number of uses in the set of usage counts is determined as the synchronization time period window.
[0032] In one optional implementation, before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method further includes:
[0033] Obtain the park number to which the target device belongs and the synchronization time period window. The synchronization time period window includes the synchronization time period and the preset time period adjacent to the synchronization time period.
[0034] Based on the preset key generation formula, the target key is generated according to the park number and the synchronization time period window;
[0035] The target key is used to encrypt the first data to be synchronized multiple times.
[0036] In one optional implementation, after extracting the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized, the method further includes:
[0037] Add the third data to be synchronized to the preset transmission failure queue. The third data to be synchronized includes the remaining data to be synchronized after extracting the second data from the first data to be synchronized.
[0038] In one optional implementation, after sending the second data to be synchronized to the target device, the method further includes:
[0039] Obtain the second interface transmission result of the second data to be synchronized;
[0040] Increment the transmission count of the first data to be synchronized by one;
[0041] If the second interface transmission result indicates that the second data to be synchronized has failed, the second data to be synchronized is used as the new first data to be synchronized, and the second interface transmission result is used as the new first interface transmission result. If the first interface transmission result indicates that the first data to be synchronized has failed, the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout time of the first data to be synchronized failing, and the data volume of the first data to be synchronized are obtained for the target device, until the second data to be synchronized is successfully transmitted, or the number of times the first data to be synchronized is transmitted reaches a preset number.
[0042] In one alternative implementation, after incrementing the transmission count of the first data to be synchronized by one, the method further includes:
[0043] If the number of transmissions of the first data to be synchronized reaches a preset number, the fourth data to be synchronized is extracted from the second data to be synchronized according to the preset minimum data transmission amount of the target device;
[0044] Add the fifth data to be synchronized to the preset transmission failure queue. The fifth data to be synchronized includes the remaining data to be synchronized after extracting the fourth data to be synchronized from the second data to be synchronized; send the fourth data to be synchronized to the target device.
[0045] In one alternative implementation, after sending the fourth data to be synchronized to the target device, the method further includes:
[0046] Obtain the transmission result of the third interface for the fourth data to be synchronized;
[0047] If the transmission result of the third interface is used to characterize the failure of the fourth data to be synchronized, the fourth data to be synchronized and the device information of the target device are added to the preset transmission failure queue.
[0048] Based on the device information of the target device, retrieve the sixth data to be synchronized that was successfully sent to the target device from the preset transmission success queue;
[0049] Add the sixth piece of data to be synchronized to the transmission failure queue;
[0050] Remove the target device from the preset queue of transferable devices.
[0051] In one optional implementation, after obtaining the first interface transmission result, the method further includes:
[0052] When the first interface transmission result is used to characterize the successful transmission of the first data to be synchronized, the network time taken by the target device to receive the first data to be synchronized and the device processing time for data entry are obtained.
[0053] Based on the predetermined second transmission period, the network time for the target device to receive the first data to be synchronized, the device processing time for data entry, and the corresponding relationship between the data volume of the first data to be synchronized and the data volume of the seventh data to be synchronized, the data volume of the seventh data to be synchronized is calculated.
[0054] Based on the amount of data in the seventh data to be synchronized, extract the seventh data to be synchronized from the preset data queue to be transmitted;
[0055] According to the second transmission period, the seventh data to be synchronized is sent to the target device.
[0056] In one optional implementation, before retrieving the first data to be synchronized from a preset data queue based on the amount of data to be synchronized, the method further includes:
[0057] If the database to be transmitted contains data to be transmitted and the data queue to be transmitted is not full, extract the data to be transmitted from the database to be transmitted and put it into the data queue to be transmitted.
[0058] If the database to be transmitted does not contain the data to be transmitted, and the queue of data to be transmitted is not full, extract the data from the preset transmission failure queue and put it into the queue of data to be transmitted.
[0059] In one optional implementation, before reading the first data to be synchronized from a preset data queue based on the amount of data to be synchronized, the method further includes:
[0060] If the database to be transmitted, the transmission failure queue, and the data to be transmitted queue do not contain any data to be synchronized, an instruction message is sent to the target device to instruct the target device to synchronize the received data to be synchronized with other devices in the preset transmittable device queue.
[0061] Secondly, embodiments of this application provide an information processing apparatus, including:
[0062] The acquisition module is used to acquire the first interface transmission result, which is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface.
[0063] The acquisition module is also used to acquire, in the case that the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed to be transmitted.
[0064] The calculation module is used to calculate the amount of data to be synchronized in the second data based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed to be transmitted.
[0065] The extraction module is used to extract the second data to be synchronized from the first data to be synchronized according to the amount of data in the second data to be synchronized;
[0066] The sending module is used to send the second data to be synchronized to the target device.
[0067] Thirdly, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions;
[0068] When the processor executes computer program instructions, it implements an information processing method as described in any optional embodiment of the first aspect of this application.
[0069] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement an information processing method as described in any optional embodiment of the first aspect of this application.
[0070] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform an information processing method as described in any optional embodiment of the first aspect of this application.
[0071] The information processing method, apparatus, device, computer storage medium, and computer program product of this application embodiment can obtain a first interface transmission result. The first interface transmission result is the transmission result of a remote management server transmitting first data to be synchronized to a target device through an interface. When the first interface transmission result indicates that the first data to be synchronized has failed, the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission are obtained for the target device. Based on the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission, the amount of data to be synchronized second is calculated. In this way, the amount of data to be retransmitted can be dynamically reduced according to network conditions and the device conditions of the target device. Then, the second data to be synchronized is extracted from the first data to be synchronized according to the amount of data to be synchronized second, and sent to the target device. Thus, by retransmitting the failed data to be synchronized according to the adjusted amount of data, the amount of data to be retransmitted can be adapted to the current network and device conditions. This not only results in a higher data transmission rate during retransmission but also improves the success rate of data retransmission. This helps improve the overall transmission efficiency of all data to be synchronized, thereby shortening the transmission time, reducing the time the device cannot be used by the user, and thus improving the user experience. Attached Figure Description
[0072] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1 This is a flowchart illustrating an information processing method provided in one embodiment of this application;
[0074] Figure 2 This is a schematic diagram of the structure of an information processing apparatus provided in another embodiment of this application;
[0075] Figure 3 This is a schematic diagram of the structure of an information processing device provided in another embodiment of this application. Detailed Implementation
[0076] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0077] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0078] As described in the background section, because smart access control devices are single-threaded, they cannot perform other tasks while synchronizing data, making them unusable by the user. When there are many smart access control devices to be synchronized or the amount of data to be synchronized is large, a long transmission time is often required. This results in a poor user experience.
[0079] The relevant technologies involve using a cloud monitoring system to transmit data to smart home devices in real time, and using the cloud monitoring system to broadcast information to all terminal devices monitoring the smart network to achieve information synchronization.
[0080] The related technologies also involve using inter-device communication in media resource playback scenarios to add two verification steps to ensure that the frames to be played are played in complete synchronization between devices.
[0081] However, the two solutions mentioned above only involve data synchronization between devices and do not address improving the data synchronization rate between the remote management server and the smart devices.
[0082] Related technologies also involve increasing the bandwidth between smart devices and remote management servers, or transmitting data locally via direct wired connections. However, this approach is costly to implement and offers limited improvement in data synchronization rates. If the data volume becomes too large or network problems occur, leading to data transmission failures, retransmission will take a considerable amount of time.
[0083] In order to improve the efficiency of data synchronization, the inventors, after in-depth thinking, ingeniously proposed an information processing method, device, equipment, computer storage medium, and computer program product.
[0084] The information processing method provided in this application embodiment will be described below with reference to the accompanying drawings and through specific embodiments and application scenarios. The information processing method provided in this application embodiment can be executed by an information processing device, or a portion of the information processing device used to execute the information processing method. This application embodiment uses the execution of the information processing method by an information processing device as an example to describe the information processing method provided in this application embodiment in detail.
[0085] The information processing method of this application embodiment can be applied to a data synchronization scenario between a remote management server in a park and multiple devices within the park. The remote server and the devices can communicate via remote connection, and the multiple devices in the park can communicate with each other through a local network.
[0086] In one example, before synchronizing data with multiple devices within the campus, the remote management server can send probe requests to each device individually. These probe requests can be for data transmission, carrying empty data. Because the data is empty, the device's processing time can be ignored. Based on the responses of each device, the idle time and network time of each device can be obtained. If a device does not respond, it is considered offline and designated as a non-transferable device. In this way, multiple transferable devices can be identified from among the multiple devices within the campus, along with the idle time and network time of each transferable device.
[0087] In one example, for each transmittable device, the remote management server can also set an initial maximum amount of data to be synchronized in a single session and an initial minimum limit on the number of device groups to be split. During data synchronization, if the total amount of data to be synchronized is less than or equal to the maximum amount of data to be synchronized in a single session, or if the number of transmittable devices is less than or equal to the minimum limit on the number of device groups to be split, the remote management server will directly transmit the full amount of data to each transmittable device through the interface.
[0088] In one example, the remote management server can generate an initialization queue before synchronizing data with multiple devices within the campus. Specifically, when the management application is multi-instance, the initial queue can be initialized in a remote dictionary server (Redis). This initialization queue can include a queue of data to be transmitted, a queue of failed transmissions, a queue of successful transmissions, and a queue of transferable devices. The queue of data to be transmitted stores data to be synchronized; its size is fixed, and when data is retrieved, the remaining data to be synchronized can be read from the database and added to the queue. The queue of successful transmissions records successfully transmitted data and corresponding device information. The queue of failed transmissions records data that failed to be synchronized and corresponding device information. The queue of transferable devices records information about devices capable of data transmission and the amount of data that each device can transmit.
[0089] In one example, when synchronizing data to multiple devices within a park, the remote management server can start a thread pool. Based on the amount of data each device in the transmissible device queue can transmit, the server retrieves the data to be synchronized for each device from the data queue to be transmitted and sends this data to the corresponding device. For example, the transmissible device queue includes m devices, denoted as device 1 to device m, and the amount of data each device can transmit is denoted as Num1 to Num... m The thread pool can extract data of sizes Num1 to Num from the queue of data to be transmitted. m The data to be synchronized is sent to devices 1 through m respectively.
[0090] The following is in conjunction with the appendix Figure 1 The information processing method provided in the embodiments of this application will be described in detail.
[0091] Figure 1 A flowchart illustrating an embodiment of the information processing method provided in this application is shown. Figure 1 As shown, the information processing method may specifically include the following steps S110 to S150.
[0092] S110, Obtain the first interface transmission result. The first interface transmission result is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface.
[0093] In step S110, the target device may include any device in the transmittable device queue.
[0094] S120, when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, obtain the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed to be transmitted.
[0095] In step S120, the successful transmission time may include the time consumed by the successfully transmitted data to be synchronized in historical data. The total amount of data that failed to be transmitted may include the amount of data to be synchronized that failed to be transmitted in historical data. In some examples, the total amount of data that failed to be transmitted may include the total amount of data from data sources that failed to be synchronized, specifically including the data to be synchronized that failed to be transmitted and its amount. The idle transmission time can be determined by sending a probe request to the target device.
[0096] S130, calculate the amount of data to be synchronized for the second time based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time for successful transmission, the timeout for unused transmission, the timeout for failed transmission, and the total amount of data that failed to be transmitted.
[0097] S140, extract the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized.
[0098] S150, send the second data to be synchronized to the target device.
[0099] The information processing method of this application embodiment can obtain a first interface transmission result. The first interface transmission result is the transmission result of a remote management server transmitting first data to be synchronized to a target device through an interface. When the first interface transmission result indicates that the first data to be synchronized has failed, the method obtains the minimum expected time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission for the target device. Based on the minimum expected time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission, the method calculates the amount of data to be synchronized second. This allows for dynamic adjustment of the retransmission amount based on network conditions and the target device's equipment status. Then, the second data to be synchronized is extracted from the first data to be synchronized according to the second data to be synchronized amount and sent to the target device. By retransmitting the failed data to be synchronized according to the adjusted data amount, the retransmission amount can be adapted to the current network and equipment conditions. This not only results in a higher data transmission rate during retransmission but also improves the success rate of data retransmission. This helps improve the overall transmission efficiency of all data to be synchronized, thereby shortening the transmission time, reducing the time the device cannot be used by the user, and thus improving the user experience.
[0100] In one embodiment, the amount of data to be synchronized second is calculated based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time for successful transmission, the timeout for idle transmission, the timeout for transmission failure, and the total amount of data that failed to be transmitted. Specifically, this may include:
[0101] The sorting weights are calculated based on the successful transmission time, the timeout for unsuccessful transmission, and the timeout for failed transmission.
[0102] Calculate the product of the sorting weight and the total amount of data that failed to be transmitted.
[0103] Add the product to the amount of data that can be transmitted within the minimum expected time range to obtain the amount of data to be synchronized for the second time.
[0104] For example, the sorting weight in the above embodiments can be calculated using the following formula 1.
[0105]
[0106] In Formula 1, K 数据 This can represent the sorting weight. 'n' can represent the number of times the data to be synchronized was successfully transmitted to the target device within a historical period. T i This can represent the total transmission time of the device during the i-th successful transmission. t 0总 It can represent the time of space travel. t 超时 It can represent the average timeout period for transmission failures within a historical timeframe.
[0107] The amount of data to be synchronized in the second phase can be calculated using the following formula 2.
[0108]
[0109] In Formula 2, Num m Num can represent the amount of data to be synchronized second. i It can represent the total amount of data that failed to be transmitted.
[0110] According to the above implementation method, the amount of data to be retransmitted can be dynamically reduced based on network conditions and the device conditions of the target device. This not only allows for a higher data transmission rate during retransmission but also improves the success rate of data retransmission. Consequently, it helps improve the overall transmission efficiency of all data to be synchronized, thereby shortening transmission time, reducing the time the device is unusable by the user, and ultimately enhancing the user experience.
[0111] In one embodiment, before obtaining the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed transmission, when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the method may further include:
[0112] Obtain the total amount of data successfully transmitted and the total duration of data transmission for the target device within a preset time period.
[0113] Divide the total amount of successfully transmitted data by the total transmission time to obtain the average transmission rate of the target device.
[0114] The product of the average transmission rate and the preset minimum estimated time is calculated to obtain the amount of data that can be transmitted within the minimum estimated time range.
[0115] In the above implementation, the average transmission rate of the target device can be calculated using the following formula 3.
[0116]
[0117] In Formula 3, m can represent the number of successful transmissions within a preset time period, and num... i It can represent the amount of data transmitted during the i-th successful transmission. This can represent the total amount of data successfully transmitted. T i This can represent the total transmission time of the device during the i-th successful transmission. It can represent the total duration of data transmission.
[0118] The amount of data that can be transmitted within the minimum estimated time frame can be calculated using the following formula 4.
[0119] Num 最小预计时间 =T 最小预估 *C Formula 4
[0120] In formula 4, Num 最小预计时间 T can represent the amount of data that can be transmitted within the minimum estimated time range. 最小预估 The minimum estimated time for data transmission can be preset, T. 最小预估 The value of T can be set according to the actual situation. For example, T 最小预估 A time interval of 5 seconds is acceptable, which allows for a more appropriate amount of data to be transmitted in a single transmission, reducing the number of times the entire data can be transmitted and thus improving the data transmission rate.
[0121] According to the above implementation method, the amount of data that can be transmitted within the minimum estimated time range can be adjusted based on historical successful transmission data. Thus, the amount of retransmitted data determined based on the amount of data that can be transmitted within the minimum estimated time range is more suitable for network and equipment conditions. This not only allows for a higher data transmission rate during retransmission but also improves the success rate of data retransmission.
[0122] In one embodiment, before obtaining the first interface transmission result, the method may further include:
[0123] Obtain the amount of data for the first data to be synchronized.
[0124] Based on the amount of data to be synchronized, the first data to be synchronized is extracted from the preset queue of data to be transmitted.
[0125] The first data to be synchronized is transmitted to the target device according to the predetermined first transmission period.
[0126] In the above implementation, the amount of data to be synchronized can be obtained from a preset queue of transmittable devices.
[0127] According to the above implementation method, the amount of data to be transmitted to the device can be determined based on the device's specifications, and data transmission can be performed according to this amount. This allows for both high data transmission speed and high success rate, thereby reducing the transmission time of the entire dataset and improving data synchronization efficiency.
[0128] In one embodiment, before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method may further include:
[0129] Get the usage records of the target device within the synchronization time period window. The usage records include the time when the target device was used. The synchronization time period window includes the synchronization period and the preset period adjacent to the synchronization period.
[0130] Determine the expected usage time of the target device during the synchronization period based on usage records.
[0131] Calculate the time interval between the target time and the expected time of use.
[0132] Calculate the difference in duration between the time interval and the air transmission time;
[0133] If the duration difference meets the preset conditions, the time period with the target time as the starting time and the duration difference as the duration will be determined as the first transmission period.
[0134] In the above embodiments, the synchronization time period window may include a time window determined from a preset time period. The time window may consist of multiple time periods of equal length. The synchronization time period may be the central time period of the synchronization time period window. The target time may be the current time, and the expected usage time of the target device within the synchronization time period may be the closest usage time to the current time after the predicted current time. Preset conditions may include a duration difference within a preset range. For example, the preset conditions may include a duration difference value within the interval [a, b], where a and b are positive numbers, and a is less than b. It is understood that the duration difference value may be a value in seconds, minutes, hours, or other units, and is not limited here. The values of a and b can be adjusted according to different units of measurement. For example, when the unit of measurement is seconds, a can be 5, and b can be 30.
[0135] In one example, after calculating the duration difference between the time interval and the transmission time, the method may further include: if the duration difference is greater than b, determining the time period with the target time as the starting time and a duration of b as the first transmission period. This limits the duration of a single transmission even when the expected transmission time is long. Thus, the downtime of the device due to data transmission can be kept below b, thereby reducing the risk of users being unable to use the device due to data transmission and improving the user experience.
[0136] In one example, after calculating the difference between the time interval and the time of idle transmission, the method may further include: if the difference is less than 'a', pausing the transmission of the first data to be synchronized; after reaching the expected usage time, using the current time as the target time, and returning to the expected usage time of the target device within the synchronization period determined based on usage records, until the difference meets a preset condition. This allows data transmission to be temporarily suspended when the expected available transmission time is short. This not only reduces the number of full data transmissions but also lowers the risk of data transmission failure, thereby improving data transmission efficiency.
[0137] In one embodiment, before obtaining the first usage record of the target device within the synchronization time period window, the method may further include:
[0138] Get the usage count set, which includes the usage count of the target device for each of the multiple time period windows within the target time period.
[0139] The time period window corresponding to the smallest number of uses in the set of usage counts is determined as the synchronization time period window.
[0140] In the above embodiments, the target time period can be a pre-selected historical time period. The time period can include multiple time periods of equal length, and the time period window can be a window divided from the time period using a sliding window method. For example, a time period can be one day, and can be evenly divided into 24 intervals, denoted as intervals 0 to 23, with each interval being 1 hour. The length of a sliding window can be 3 intervals, and the sliding step size can be one interval. For example, the number of times the target device is used corresponding to each time period window can be calculated using the following formula 5.
[0141]
[0142] In Formula 5, i can represent the i-th time period. x can be a value from 1 to 24, (n x-1 +n x +n x+1 ) i It can represent the number of times the target device is used within the time period window consisting of the interval x-1 to x+1 at the i-th time period.
[0143] According to the above implementation method, the time period window corresponding to the minimum number of times the target device is used in each time period window can be determined as the synchronization time period window. In this way, based on the user's historical behavior, the time period window in which the user uses the device less frequently can be determined as the synchronization time period window. Therefore, data transmission within the synchronization period corresponding to this synchronization time period window can reduce the risk of data transmission causing the user to be unable to use the device, thereby improving the user experience.
[0144] In one embodiment, before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method may further include:
[0145] Obtain the park number to which the target device belongs and the synchronization time period window. The synchronization time period window includes the synchronization time period and the preset time period adjacent to the synchronization time period.
[0146] Based on a preset key generation formula, a target key is generated according to the park number and the synchronization time period window.
[0147] The target key is used to encrypt the first data to be synchronized multiple times.
[0148] Accordingly, after receiving the data to be synchronized, the target device can decrypt the data.
[0149] This application does not limit the encryption and decryption methods. For example, the encryption and decryption methods may include symmetric encryption algorithms, such as the RC algorithm.
[0150] The following uses the RC algorithm as an example to illustrate the encryption and decryption process of the data to be synchronized.
[0151] Taking a one-day time period as an example, a time period can be evenly divided into 24 intervals, denoted as intervals 0 to 23, each interval being 1 hour. The synchronization time period x is formatted to extract the hour dimension, and the preceding and following hours are extracted, then integrated with the park number Num. 园 The key generation formula is as follows:
[0152]
[0153] The remote management server can perform encryption operations, dividing the data to be encrypted into a 4×4 matrix of 128 bits. If the matrix is less than 128 bits, it is padded using the encryption message syntax standard (PKCS#7). The key... Take the first 16 bytes (128 bits) as the new encryption key.
[0154] 128-bit new key It is also represented by a matrix in bytes, with each column of the matrix called a 32-bit word. The key matrix is expanded into a sequence of 44 words W[0], W[1], ..., W
[43] using a key arrangement function. The first four elements of this sequence, W[0], W[1], W[2], W[3], are the original key, used for initial key addition in encryption operations. The remaining 40 words are divided into 10 groups, each group containing 4 words (128 bits) used for round key addition in 10 rounds of encryption operations. Each round of encryption involves byte substitution, row shifting, column mixing, and round key addition; the final iteration does not perform column mixing. Bitwise inversion is added in the second, fourth, sixth, eighth, and tenth rounds to transform the encrypted information and obtain the ciphertext.
[0155] Once the target device receives the data to be synchronized, it can perform a decryption operation. Specifically, the obtained ciphertext is inverted bit by bit to obtain the inverted ciphertext matrix X. After 10 rounds of key addition, reverse byte substitution, reverse row shifting, and inverse column mixing, in the second, fourth, sixth, and tenth rounds, all encrypted information is inverted bit by bit. Each time, a portion of the key matrix is taken as decryption information to obtain the plaintext.
[0156] In this way, the remote management server and the target device generate a key based on information such as the synchronization time and the device's affiliated park information. No key transmission is required between the remote management server and the target device, reducing the risk of key leakage. Furthermore, according to the above encryption method, the key is used byte-by-byte during the encryption process, with irregular inversion, increasing the difficulty of decryption and further ensuring data confidentiality.
[0157] In one embodiment, after extracting the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized, the method may further include:
[0158] Add the third data to be synchronized to the preset transmission failure queue. The third data to be synchronized includes the remaining data to be synchronized after extracting the second data from the first data to be synchronized.
[0159] According to the above implementation method, when data retransmission is required, data that has not been retransmitted can be added to the transmission failure queue. This allows for accurate monitoring of data that has not been successfully transmitted, reducing the risk of data loss.
[0160] In one embodiment, after sending the second data to be synchronized to the target device, the method may further include:
[0161] Obtain the second interface transmission result of the second data to be synchronized.
[0162] Increment the number of transmissions for the first piece of data to be synchronized by one.
[0163] If the second interface transmission result indicates that the second data to be synchronized has failed, the second data to be synchronized is used as the new first data to be synchronized, and the second interface transmission result is used as the new first interface transmission result. If the first interface transmission result indicates that the first data to be synchronized has failed, the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout time of the first data to be synchronized failing, and the data volume of the first data to be synchronized are obtained for the target device, until the second data to be synchronized is successfully transmitted, or the number of times the first data to be synchronized is transmitted reaches a preset number.
[0164] According to the above implementation method, in the event of retransmission failure, data related to network and device conditions can continue to be acquired, and the amount of data to be retransmitted can be adjusted accordingly. This improves the flexibility and success rate of data retransmission.
[0165] In one embodiment, after incrementing the transmission count of the first data to be synchronized by one, the method may further include:
[0166] If the number of transmissions of the first data to be synchronized reaches a preset number, the fourth data to be synchronized is extracted from the second data to be synchronized according to the preset minimum data transmission amount of the target device.
[0167] The fifth data to be synchronized is added to the preset transmission failure queue. The fifth data to be synchronized includes the remaining data to be synchronized after the fourth data to be synchronized is extracted from the second data to be synchronized.
[0168] Send the fourth piece of data to be synchronized to the target device.
[0169] According to the above implementation method, when the number of retransmissions based on network and device conditions reaches a certain value, retransmission can be performed directly according to the preset minimum data transmission volume of the target device. This reduces the number of retransmissions and saves retransmission time.
[0170] In one embodiment, after sending the fourth data to be synchronized to the target device, the method may further include:
[0171] Obtain the transmission result of the third interface for the fourth data to be synchronized.
[0172] If the transmission result of the third interface is used to characterize the failure of the fourth data to be synchronized, the fourth data to be synchronized and the device information of the target device are added to the preset transmission failure queue.
[0173] Based on the target device's device information, retrieve the sixth data to be synchronized that was successfully sent to the target device from the preset successful transmission queue.
[0174] Add the sixth piece of data to be synchronized to the transmission failure queue.
[0175] Remove the target device from the preset queue of transferable devices.
[0176] According to the above implementation method, if retransmission fails when the minimum data transmission amount for the target device is preset, the target device can be considered faulty and unable to perform data transmission operations smoothly. In this case, the retransmitted data and device information can be added to the transmission failure queue, as can the data successfully sent to the target device. The target device can then be removed from the preset list of transmittable devices. This way, even if the target device is faulty, data synchronization with the target device can be avoided, and the data transmitted to the target device can be marked as transmission failure data. Thus, data previously transmitted to the target device can be transmitted to other devices in the list of transmittable devices, ensuring that the final data transmitted to the devices in the list is the full amount of data. This reduces the risk of data loss.
[0177] In one embodiment, the method may further include: upon receiving a usage request for the target device, removing the target device from a preset queue of transmittable devices; and adding the target device to the queue of transmittable devices after a preset removal time has elapsed. This allows for reserving a certain amount of usage time when the target device may be used, thereby improving the user experience.
[0178] In one embodiment, after obtaining the first interface transmission result, the method may further include:
[0179] When the first interface transmission result is used to characterize the successful transmission of the first data to be synchronized, the network time taken for the target device to receive the first data to be synchronized and the device processing time for data entry are obtained.
[0180] Based on the predetermined second transmission period, the network time for the target device to receive the first data to be synchronized, the device processing time for data entry, and the corresponding relationship between the data volume of the first data to be synchronized and the data volume of the seventh data to be synchronized, the data volume of the seventh data to be synchronized is calculated.
[0181] Based on the amount of data to be synchronized in the seventh data, extract the seventh data to be synchronized from the preset data queue to be transmitted.
[0182] According to the second transmission period, the seventh data to be synchronized is sent to the target device.
[0183] In the above embodiments, the second transmission period has a similar meaning to the first transmission period, and its determination process can be similar to the determination process of the first transmission period, which will not be elaborated here.
[0184] In one example, based on the predetermined second transmission period, the network time for the target device to receive the first data to be synchronized, the device processing time for data entry, and the corresponding relationship between the data volume of the first data to be synchronized and the data volume of the seventh data to be synchronized, the data volume of the seventh data to be synchronized can be calculated using the following formula 6-10.
[0185] T 总 =t 网 +t 库 ≤t 预 Formula 6
[0186] In Formula 6, T 总 It can represent the total transmission time, t 库 This can represent the processing time of the first piece of data to be synchronized on the target device. t 网 This can represent the transmission time of the first piece of data to be synchronized in the network. t 预 It can represent the duration of the second transmission period.
[0187] t 库 =t 单条 *Num m’ Formula 7
[0188]
[0189] In formulas 7 and 8, t 单条 The time required to transmit a single piece of data, Num m’ This indicates the number of data blocks to be synchronized in the first phase.
[0190] Combining formulas 6-8, we can obtain formula 9 as follows.
[0191]
[0192] In Formula 9, num p This can represent the amount of data to be synchronized in the seventh data set.
[0193] Formula 9 can be transformed to obtain Formula 10.
[0194]
[0195] num is determined by formula 10 p The largest integer that can be obtained is used as the value of the seventh data to be synchronized.
[0196] According to the above implementation method, if the previous round of data transmission was successful, the amount of data that the target device can transmit in the next round of transmission can be dynamically adjusted based on the network conditions and data volume during the previous round of data transmission. This helps to improve the efficiency and success rate of the next round of data transmission.
[0197] In one embodiment, before retrieving the first data to be synchronized from a preset data queue based on the amount of data to be synchronized, the method may further include:
[0198] If the database to be transmitted contains data to be transmitted and the data queue to be transmitted is not full, extract the data to be transmitted from the database to be transmitted and put it into the data queue to be transmitted.
[0199] If the database to be transmitted does not contain the data to be transmitted, and the queue of data to be transmitted is not full, extract the data from the preset transmission failure queue and put it into the queue of data to be transmitted.
[0200] According to the above implementation method, data to be transmitted from the database to be transmitted can be transmitted first, and then data in the transmission failure queue can be transmitted. In this way, the synchronization data that failed to be transmitted to the device can be effectively managed, reducing the risk of data loss.
[0201] In one embodiment, before reading the first data to be synchronized from a preset data queue based on the amount of data to be synchronized, the method may further include:
[0202] If the database to be transmitted, the transmission failure queue, and the data to be transmitted queue do not contain any data to be synchronized, an instruction message is sent to the target device to instruct the target device to synchronize the received data to be synchronized with other devices in the preset transmittable device queue.
[0203] According to the above implementation method, after the full data transmission is completed, the target device can be instructed to synchronize the received data to be synchronized to other devices in a preset queue of transmittable devices. The target device can be any device in the queue of transmittable devices. Therefore, each device in the queue of transmittable devices can transmit the data to be synchronized received from the remote management server to each other, thereby completing the synchronization of full data among the network devices.
[0204] In one embodiment, the indication information can be used to instruct devices in the transmittable device queue to initiate the inter-device broadcast function to broadcast all the data of this synchronization.
[0205] In one embodiment, the indication information may further include the processing volume corresponding to the target device. In a local area network, the overhead of inter-device communication can be ignored, and only the device processing information and data entry time need to be considered. Thus, the processing volume corresponding to the target device can be calculated using Formula 11.
[0206]
[0207] In Formula 11, t 预 This can represent the duration of the next transmission period, determined based on the result of the last transmission of data to be synchronized to the target device. The process for determining this next transmission period is similar to that for determining the first transmission period, and will not be elaborated upon here. 库 This can indicate the time during which the data was processed by the device when it was last transmitted to the target device for synchronization.
[0208] In one example, after receiving an instruction, devices in the transmissible device queue can initiate an inter-device broadcast function to synchronize data in a specific order. For instance, the transmissible device queue may include devices 1 through m. Device 1 first determines whether it is currently in use. If device 1 is not in use, it initiates its transmission function to transmit the total updated data M obtained from device 1. 1总 Synchronize sequentially to device 2-m. Specifically, when synchronizing to each device, the processing capacity (Num) of each device can be considered. q设 Split the data into Servings, each serving is Num q设 q is an integer from 2 to m. The data is then synchronized to device q. Device q, upon receiving the data, cannot include it in the updated data. If device 1 is in use, transmission is paused; if it is not used within 30 seconds, data transmission resumes. The remaining devices 2 through m also follow similar steps to synchronize and update data with other devices except themselves.
[0209] During data synchronization between devices, a device receives updated data and then needs to perform a data entry operation. If a device receives a usage request from another device while receiving updated data, it can pause the data entry operation after receiving the updated data, and resume the operation after a preset pause duration. This allows for sufficient usable time for user access without interrupting data transmission, thus improving user experience. If a device receives a usage request from another device while performing a data entry operation, it can assess the data entry processing time. If the processing time is less than a preset threshold, the data entry operation continues; otherwise, it pauses until the preset pause duration is reached. This allows for pausing the data entry operation when a longer processing time is anticipated, prioritizing user access and improving user experience.
[0210] Based on the same inventive concept, embodiments of this application also provide an information processing device.
[0211] like Figure 2 As shown, the information processing device 200 may include a first acquisition module 201, a first calculation module 202, a first extraction module 203, and a sending module 204.
[0212] The first acquisition module 201 is used to acquire the first interface transmission result, which is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface.
[0213] The first acquisition module 201 is further configured to acquire, in the case that the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the timeout of the transmission failure, and the total amount of data that failed to be transmitted.
[0214] The first calculation module 202 is used to calculate the amount of data to be synchronized in the second data based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the timeout of transmission failure, and the total amount of data that failed to be transmitted.
[0215] The first extraction module 203 is used to extract the second data to be synchronized from the first data to be synchronized according to the amount of data in the second data to be synchronized.
[0216] The sending module 204 is used to send the second data to be synchronized to the target device.
[0217] The information processing apparatus of this application embodiment is capable of acquiring a first interface transmission result. The first interface transmission result is the transmission result of a remote management server transmitting first data to be synchronized to a target device via an interface. When the first interface transmission result indicates that the first data to be synchronized has failed, the apparatus acquires the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission for the target device. Based on the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout period for failed transmission, and the total amount of data that failed transmission, the apparatus calculates the amount of data to be synchronized second. This allows for dynamic adjustment of the retransmission amount based on network conditions and the target device's equipment status. Then, the second data to be synchronized is extracted from the first data to be synchronized according to the second data to be synchronized amount and sent to the target device. By retransmitting the failed data to be synchronized according to the adjusted data amount, the retransmission amount can be adapted to the current network and equipment conditions. This not only results in a higher data transmission rate during retransmission but also improves the success rate of data retransmission. This helps improve the overall transmission efficiency of all data to be synchronized, thereby shortening the transmission time, reducing the time the device cannot be used by the user, and thus improving the user experience.
[0218] In one embodiment, the first computing module can specifically be used for:
[0219] The sorting weights are calculated based on the successful transmission time, the timeout for unsuccessful transmission, and the timeout for failed transmission.
[0220] Calculate the product of the sorting weight and the total amount of data that failed to be transmitted.
[0221] Add the product to the amount of data that can be transmitted within the minimum expected time range to obtain the amount of data to be synchronized for the second time.
[0222] In one embodiment, the apparatus may further include:
[0223] The second acquisition module is used to acquire, before acquiring the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed transmission within a preset time period, when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized.
[0224] The second calculation module is used to divide the total amount of successfully transmitted data by the total duration of data transmission to obtain the average transmission rate of the target device.
[0225] The second calculation module is also used to calculate the product of the average transmission rate and the preset minimum estimated time to obtain the amount of data that can be transmitted within the minimum estimated time range.
[0226] In one embodiment, the apparatus may further include:
[0227] The third acquisition module is used to acquire the amount of data of the first data to be synchronized before acquiring the transmission result of the first interface.
[0228] The second extraction module is used to extract the first data to be synchronized from the preset data queue to be transmitted based on the amount of data in the first data to be synchronized.
[0229] The transmission module is used to transmit the first data to be synchronized to the target device according to a predetermined first transmission period.
[0230] In one embodiment, the apparatus may further include:
[0231] The fourth acquisition module is used to acquire the usage record of the target device within the synchronization time period window before transmitting the first data to be synchronized to the target device according to the predetermined first transmission period. The usage record includes the time when the target device is used. The synchronization time period window includes the synchronization period and the preset period adjacent to the synchronization period.
[0232] The first determining module is used to determine the expected usage time of the target device during the synchronization period based on the usage records.
[0233] The third calculation module is used to calculate the time interval between the target time and the expected usage time.
[0234] The third calculation module is also used to calculate the duration difference between the time interval and the air transmission time.
[0235] The first determining module is also used to determine the time period with the target time as the starting time and the time difference as the duration when the duration difference meets the preset conditions as the first transmission time period.
[0236] In one embodiment, the apparatus may further include:
[0237] The fifth acquisition module is used to acquire a set of usage counts before acquiring the first usage record of the target device within the synchronization time period window. The set of usage counts includes the usage counts of the target device corresponding to each of the multiple time period windows within the target time period.
[0238] The second determining module is used to determine the time period window corresponding to the smallest number of uses in the set of usage counts as the synchronization time period window.
[0239] In one embodiment, the apparatus may further include:
[0240] The sixth acquisition module is used to acquire the park number to which the target device belongs and the synchronization time period window before transmitting the first data to be synchronized to the target device according to the predetermined first transmission period. The synchronization time period window includes the synchronization period and the preset period adjacent to the synchronization period.
[0241] The generation module is used to generate a target key based on a preset key generation formula, according to the park number and the synchronization time period window.
[0242] The encryption module is used to perform multiple rounds of encryption on the first data to be synchronized using the target key.
[0243] In one embodiment, the apparatus may further include:
[0244] The first adding module is used to extract the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized, and then add the third data to be synchronized to a preset transmission failure queue. The third data to be synchronized includes the remaining data to be synchronized after extracting the second data to be synchronized from the first data to be synchronized.
[0245] In one embodiment, the apparatus may further include:
[0246] The seventh acquisition module is used to acquire the second interface transmission result of the second data to be synchronized after sending the second data to be synchronized to the target device.
[0247] The processing module is used to increment the transmission count of the first data to be synchronized by one.
[0248] The return module is used to, when the second interface transmission result indicates that the second data to be synchronized has failed, take the second data to be synchronized as the new first data to be synchronized, take the second interface transmission result as the new first interface transmission result, and return the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout time of the failure of the first data to be synchronized, and the data volume of the first data to be synchronized when the first interface transmission result indicates that the first data to be synchronized has failed, until the second data to be synchronized is successfully transmitted or the number of transmissions of the first data to be synchronized reaches a preset number.
[0249] In one embodiment, the apparatus may further include:
[0250] The third extraction module is used to add one to the transmission count of the first data to be synchronized, and when the transmission count of the first data to be synchronized reaches a preset number, extract the fourth data to be synchronized from the second data to be synchronized according to the preset minimum data transmission volume of the target device.
[0251] The second adding module is used to add the fifth data to be synchronized to a preset transmission failure queue. The fifth data to be synchronized includes the remaining data to be synchronized after extracting the fourth data from the second data to be synchronized. The fourth data to be synchronized is then sent to the target device.
[0252] In one embodiment, the apparatus may further include:
[0253] The eighth acquisition module is used to acquire the third interface transmission result of the fourth data to be synchronized after sending the fourth data to be synchronized to the target device.
[0254] The third addition module is used to add the fourth data to be synchronized and the device information of the target device to a preset transmission failure queue when the transmission result of the third interface is used to characterize the failure of the fourth data to be synchronized.
[0255] The eighth acquisition module is also used to acquire the sixth data to be synchronized that was successfully sent to the target device from the preset transmission success queue based on the device information of the target device.
[0256] The third module is also used to add the sixth piece of data to be synchronized to the transmission failure queue.
[0257] The deletion module is used to remove the target device from the preset queue of transmittable devices.
[0258] In one embodiment, the apparatus may further include:
[0259] The ninth acquisition module is used to acquire the network time taken by the target device to receive the first data to be synchronized and the device processing time after acquiring the first interface transmission result, provided that the first interface transmission result is used to indicate that the first data to be synchronized is successfully transmitted.
[0260] The fourth calculation module is used to calculate the data volume of the seventh data to be synchronized based on the predetermined second transmission period, the network time taken for the target device to receive the first data to be synchronized, the device processing time for data entry, and the corresponding relationship between the data volume of the first data to be synchronized and the data volume of the seventh data to be synchronized.
[0261] The fourth extraction module is used to extract the seventh data to be synchronized from the preset data queue to be transmitted, based on the amount of data in the seventh data to be synchronized.
[0262] The sending module is also used to send the seventh data to be synchronized to the target device according to the second transmission period.
[0263] In one embodiment, the apparatus may further include:
[0264] The fifth extraction module is used to extract the data to be transmitted from the database to be transmitted and put it into the data to be transmitted queue before extracting the first data to be synchronized from the preset data queue to be transmitted, based on the amount of data to be synchronized. This is done when the database to be transmitted contains the data to be transmitted and the data queue to be transmitted is not full.
[0265] The fifth extraction module is also used to extract data from a preset transmission failure queue and put it into the transmission queue before extracting the first data to be synchronized from the preset transmission data queue according to the amount of the first data to be synchronized, in the case that the data to be synchronized is not included in the transmission database and the transmission data queue is not full.
[0266] In one embodiment, the sending module can also be used for:
[0267] Based on the amount of data to be synchronized, before reading the first data to be synchronized from the preset data queue to be transmitted, if the database to be transmitted, the transmission failure queue, and the data queue to be transmitted do not contain any data to be synchronized, an instruction message is sent to the target device to instruct the target device to synchronize the received data to be synchronized to other devices in the preset transmittable device queue.
[0268] The information processing device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0269] Figure 3 A schematic diagram of the hardware structure of the information processing device provided in an embodiment of this application is shown.
[0270] The information processing device may include a processor 301 and a memory 302 storing computer program instructions.
[0271] Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0272] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 302 is non-volatile solid-state memory.
[0273] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0274] The processor 301 implements any of the information processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0275] As an example, the information processing device may also include a communication interface 303 and a bus 310. Wherein, for example... Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0276] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0277] Bus 310 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0278] The information processing device can execute the information processing method in the embodiments of this application, thereby achieving the combination Figure 1 and Figure 2 The described information processing methods and apparatus.
[0279] Furthermore, in conjunction with the information processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the information processing methods in the above embodiments.
[0280] In addition, in conjunction with the information processing methods in the above embodiments, this application provides a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device performs any of the information processing methods in the above embodiments.
[0281] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0282] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0283] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0284] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0285] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. An information processing method, characterized in that, include: Obtain the first interface transmission result, which is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface; When the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the timeout of transmission failure, and the total amount of data that failed to be transmitted are obtained. The amount of data to be synchronized second is calculated based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed to be transmitted. The second data to be synchronized is extracted from the first data to be synchronized according to the amount of data in the second data to be synchronized. Send the second data to be synchronized to the target device; Based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time for successful transmission, the idle transmission time, the timeout time for transmission failure, and the total amount of data that failed to be transmitted, the amount of data to be synchronized in the second phase is calculated, including: The sorting weight is calculated based on the successful transmission time, the empty transmission time, and the timeout time of the failed transmission. Calculate the product of the sorting weight and the total amount of data that failed to be transmitted; Add the product to the amount of data that can be transmitted within the minimum estimated time range to obtain the amount of data to be synchronized for the second time.
2. The method according to claim 1, characterized in that, Before obtaining the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed transmission when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the method further includes: Obtain the total amount of data successfully transmitted and the total duration of data transmission for the target device within a preset time period; The average transmission rate of the target device is obtained by dividing the total amount of successfully transmitted data by the total duration of the data transmission. The amount of data that can be transmitted within the minimum expected time range is obtained by multiplying the average transmission rate by the preset minimum expected time.
3. The method according to claim 1, characterized in that, Before obtaining the first interface transmission result, the method further includes: Get the data volume of the first data to be synchronized; Based on the amount of data in the first data to be synchronized, extract the first data to be synchronized from the preset data queue to be transmitted; The first data to be synchronized is transmitted to the target device according to a predetermined first transmission period.
4. The method according to claim 3, characterized in that Before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method further includes: Obtain the usage record of the target device within the synchronization time period window. The usage record includes the time when the target device was used. The synchronization time period window includes a synchronization period and a preset period adjacent to the synchronization period. The expected usage time of the target device during the synchronization period is determined based on the usage records. Calculate the time interval between the target time and the expected usage time; Calculate the duration difference between the time interval and the air transmission time; If the duration difference meets the preset conditions, the time period with the target time as the starting time and the duration difference as the duration is determined as the first transmission time period.
5. The method according to claim 4, characterized in that, Before obtaining the first usage record of the target device within the synchronization time period window, the method further includes: Obtain a set of usage counts, which includes the usage counts of the target device corresponding to multiple time period windows within the target time period; The time period window corresponding to the smallest number of uses in the set of usage counts is determined as the synchronization time period window.
6. The method according to claim 3, characterized in that, Before transmitting the first data to be synchronized to the target device according to a predetermined first transmission period, the method further includes: Obtain the park number to which the target device belongs and the synchronization time period window, wherein the synchronization time period window includes a synchronization period and a preset period adjacent to the synchronization period; Based on a preset key generation formula, a target key is generated according to the park number and the synchronization time period window; The first data to be synchronized is encrypted multiple times using the target key.
7. The method according to claim 1, characterized in that, After extracting the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized, the method further includes: The third data to be synchronized is added to a preset transmission failure queue. The third data to be synchronized includes the remaining data to be synchronized after the second data to be synchronized is extracted from the first data to be synchronized.
8. The method according to claim 1, characterized in that After sending the second data to be synchronized to the target device, the method further includes: Obtain the second interface transmission result of the second data to be synchronized; Increment the number of transmissions of the first data to be synchronized by one; If the second interface transmission result indicates that the second data to be synchronized has failed, the second data to be synchronized is used as the new first data to be synchronized, and the second interface transmission result is used as the new first interface transmission result. Then, if the first interface transmission result indicates that the first data to be synchronized has failed, the minimum estimated time range of data that can be transmitted, the successful transmission time, the idle transmission time, the timeout time of the first data to be synchronized failing, and the data volume of the first data to be synchronized are obtained for the target device, until the second data to be synchronized is successfully transmitted, or the number of times the first data to be synchronized is transmitted reaches a preset number.
9. The method according to claim 8, characterized in that, After incrementing the transmission count of the first data to be synchronized by one, the method further includes: If the number of transmissions of the first data to be synchronized reaches a preset number, the fourth data to be synchronized is extracted from the second data to be synchronized according to the preset minimum data transmission amount of the target device; The fifth data to be synchronized is added to a preset transmission failure queue. The fifth data to be synchronized includes the remaining data to be synchronized after the fourth data to be synchronized is extracted from the second data to be synchronized. The fourth data to be synchronized is then sent to the target device.
10. The method according to claim 9, characterized in that, After sending the fourth data to be synchronized to the target device, the method further includes: Obtain the transmission result of the third interface for the fourth data to be synchronized; If the transmission result of the third interface is used to characterize the failure of the fourth data to be synchronized, the fourth data to be synchronized and the device information of the target device are added to a preset transmission failure queue. Based on the device information of the target device, retrieve the sixth data to be synchronized that was successfully sent to the target device from the preset transmission success queue; Add the sixth piece of data to be synchronized to the transmission failure queue; Remove the target device from the preset queue of transmittable devices.
11. The method according to any one of claims 1-10, characterized in that, After obtaining the first interface transmission result, the method further includes: When the first interface transmission result is used to characterize the successful transmission of the first data to be synchronized, the network time taken by the target device to receive the first data to be synchronized and the device processing time for data entry are obtained. Based on the predetermined second transmission period, the network time for the target device to receive the first data to be synchronized, the device processing time for data entry, and the corresponding relationship between the data volume of the first data to be synchronized and the data volume of the seventh data to be synchronized, the data volume of the seventh data to be synchronized is calculated. Based on the amount of data in the seventh data to be synchronized, extract the seventh data to be synchronized from the preset data queue to be transmitted; According to the second transmission period, the seventh data to be synchronized is sent to the target device.
12. The method according to claim 2, characterized in that, Before retrieving the first data to be synchronized from a preset data queue based on the amount of the first data to be synchronized, the method further includes: If the database to be transmitted contains data to be transmitted and the queue of data to be transmitted is not full, extract the data to be transmitted from the database to be transmitted and put it into the queue of data to be transmitted. If the database to be transmitted does not contain data to be transmitted, and the queue of data to be transmitted is not full, data is extracted from a preset transmission failure queue and placed into the queue of data to be transmitted.
13. The method according to claim 12, characterized in that, Before reading the first data to be synchronized from a preset data queue based on the amount of data to be synchronized, the method further includes: If none of the database to be transmitted, the transmission failure queue, and the data to be transmitted queue contain data to be synchronized, an instruction message is sent to the target device to instruct the target device to synchronize the received data to be synchronized with other devices in the preset transmittable device queue.
14. An information processing device, characterized in that, include: The acquisition module is used to acquire the first interface transmission result, which is the transmission result of the remote management server transmitting the first data to be synchronized to the target device through the interface. The acquisition module is further configured to acquire, when the first interface transmission result is used to characterize the failure of the first data transmission to be synchronized, the amount of data that can be transmitted within the minimum estimated time range corresponding to the target device, the transmission time of successful transmission, the idle transmission time, the timeout time of failed transmission, and the total amount of data that failed transmission. The calculation module is used to calculate the amount of data to be synchronized in the second data based on the amount of data that can be transmitted within the minimum estimated time range, the transmission time of successful transmission, the idle transmission time, the timeout time of transmission failure, and the total amount of data that failed to be transmitted. The extraction module is used to extract the second data to be synchronized from the first data to be synchronized according to the amount of the second data to be synchronized; The sending module is used to send the second data to be synchronized to the target device; The calculation module is specifically used to: calculate the sorting weight based on the successful transmission time, the empty transmission time, and the timeout time of the failed transmission; calculate the product of the sorting weight and the total amount of data that failed transmission; and add the product to the amount of data that can be transmitted within the minimum estimated time range to obtain the amount of the second data to be synchronized.
15. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the information processing method as described in any one of claims 1-13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the information processing method as described in any one of claims 1-13.
17. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the information processing method as described in any one of claims 1-13.
Citation Information
Patent Citations
Method and device for transmitting data faster under large flow
CN109309729A
Data synchronization method and related device
WO2020248364A1