Data transmission method, device, equipment and medium

By sorting and differentially analyzing the synchronized data in the Internet of Things, generating and transmitting differentially related data, the problem of frequent transmission of the same data in the Internet of Things is solved, and data transmission efficiency is improved.

CN119766830AActive Publication Date: 2025-04-04HANGZHOU HAOLINK INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510259132.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-04-04
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

In the Internet of Things transmission, when the client uploads data of the same data structure at different times, it frequently transmits the same data, resulting in increased network pressure and increased network overhead, especially inefficient in weak network environments.

Method used

By obtaining the data to be synchronized, the data structure is updated according to the preset sorting strategy, and whether candidate historical synchronization data exists. If it exists, it is determined to refer to the historical synchronization data and the differential correlation data, generate the current transmission data and send it to the server, and the server generates and stores the current synchronization data and its identifier based on these data.

Benefits of technology

It reduces the amount of data transmission between the client and the server, improves data transmission efficiency, and is effective especially in scenarios where the data structure is the same and the difference is small.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766830A_ABST
    Figure CN119766830A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data transmission method, device, equipment and medium. The method includes: obtaining the data to be synchronized, and updating the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data; determining the current data structure of the current synchronization data, and judging whether there is candidate historical synchronization data under the current data structure; if there is, determining the reference historical synchronization data from the candidate historical synchronization data, and determining the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; sending the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; receiving the current data identifier fed back by the server, and storing the current synchronization data and the current data identifier. The efficiency of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of data transmission, and in particular, to a data transmission method, apparatus, device and medium. Background Art

[0002] In IoT transmission, when clients upload data of the same data structure at different times, the uploaded data will have the same parts. Frequent transmission of the same data, especially in a weak network environment, greatly increases network pressure and network overhead. Therefore, it is crucial to reduce the amount of transmitted data and improve data transmission efficiency. Summary of the invention

[0003] The present invention provides a data transmission method, device, equipment and medium to reduce the amount of transmitted data and improve data transmission efficiency.

[0004] According to one aspect of the present invention, a data transmission method is provided, which is applied to a client, and the method comprises:

[0005] Acquire the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain the current synchronized data;

[0006] Determine the current data structure of the current synchronization data, and determine whether there is candidate historical synchronization data under the current data structure;

[0007] If so, determine the reference historical synchronization data from the candidate historical synchronization data, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes the reference data identifier of the reference historical synchronization data, and difference-related data;

[0008] Sending the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data;

[0009] The current data identifier fed back by the server is received, and the current synchronization data and the current data identifier are stored.

[0010] According to another aspect of the present invention, a data transmission method is provided, which is applied to a server, and the method includes:

[0011] Receive current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to a preset sorting strategy, and comparing the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes a reference data identifier of the reference historical synchronization data, and difference-related data;

[0012] Determine reference historical synchronization data from the candidate historical synchronization data according to the reference data identifier, and generate current synchronization data according to the difference association data and the reference historical synchronization data;

[0013] Determine a current data identifier of the current synchronization data, and store the current synchronization data and the current data identifier;

[0014] The current data identifier is sent to the client, so that the client stores the current synchronization data and the current data identifier.

[0015] According to another aspect of the present invention, there is provided a data transmission device, which is configured on a client, and the device comprises:

[0016] The current synchronization data determination module is used to obtain the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data;

[0017] A historical synchronization data judgment module is used to determine the current data structure of the current synchronization data and to judge whether there is candidate historical synchronization data under the current data structure;

[0018] A current transmission data determination module, used to determine the reference historical synchronization data from the candidate historical synchronization data, if any, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes the reference data identifier of the reference historical synchronization data, and difference-related data;

[0019] A current transmission data sending module, used to send the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data;

[0020] The data storage module is used to receive the current data identifier fed back by the server and store the current synchronization data and the current data identifier.

[0021] According to another aspect of the present invention, there is provided a data transmission device, which is configured at a server, and the device comprises:

[0022] A current transmission data receiving module, used to receive the current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to the preset sorting strategy, and the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference association data;

[0023] a current synchronization data generating module, configured to determine reference historical synchronization data from the candidate historical synchronization data according to the reference data identifier, and generate current synchronization data according to the difference association data and the reference historical synchronization data;

[0024] A current data identification determination module, used to determine the current data identification of the current synchronization data, and store the current synchronization data and the current data identification;

[0025] The current data identification sending module is used to send the current data identification to the client, so that the client stores the current synchronization data and the current data identification.

[0026] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0027] one or more processors;

[0028] A memory for storing one or more programs;

[0029] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the data transmission methods provided by the embodiments of the present invention.

[0030] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the data transmission methods provided in the embodiments of the present invention when executed.

[0031] An embodiment of the present invention provides a data transmission scheme, which obtains the data to be synchronized and updates the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data; determines the current data structure of the current synchronization data, and judges whether there is candidate historical synchronization data under the current data structure; if so, determines the reference historical synchronization data from the candidate historical synchronization data, and determines the current transmission data corresponding to the current synchronization data based on the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes a reference data identifier of the reference historical synchronization data, and difference-related data; sends the current transmission data to a server, so that the server generates and stores the current synchronization data based on the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; receives the current data identifier fed back by the server, and stores the current synchronization data and the current data identifier. In the above scheme, the client sends the current transmission data including the reference data identifier and the difference-related data to the server, so that the server generates the current synchronization data based on the current transmission data and the stored candidate historical synchronization data. This ensures that under the current data structure, if the candidate historical synchronization data already exists in the client and the server, the client does not need to send the repeated data again, thereby reducing the amount of data transmitted between the client and the server and improving the efficiency of data transmission.

[0032] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 is a flow chart of a data transmission method provided by Embodiment 1 of the present invention;

[0035] Figure 2 is a flow chart of a data transmission method provided by Embodiment 2 of the present invention;

[0036] Figure 3 is a flow chart of a data transmission method provided by Embodiment 3 of the present invention;

[0037] Figure 4 is a structural schematic diagram of a data transmission device provided in Embodiment 5 of the present invention;

[0038] Figure 5 is a structural diagram of a data transmission device provided by Embodiment 6 of the present invention;

[0039] Figure 6 It is a structural diagram of an electronic device for implementing a data transmission method provided in Embodiment 7 of the present invention. DETAILED DESCRIPTION

[0040] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0041] Embodiment 1

[0042] Figure 1 This is a flowchart of a data transmission method provided in Example 1 of the present invention. This embodiment is applicable to data transmission situations in the Internet of Things. The method can be executed by a data transmission device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the data transmission function.

[0043] See also Figure 1 The data transmission method shown is applied to the client and includes:

[0044] S110: Acquire the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain current synchronized data.

[0045] The data to be synchronized refers to the data that the client and the server need to synchronize and store. The embodiment of the present invention does not limit the form of the data to be synchronized. For example, the data to be synchronized can be displayed in the form of characters, that is, the data to be synchronized can be a string.

[0046] Among them, the preset sorting strategy refers to a pre-set strategy that can be used to sort the sub-data in the data to be synchronized. Exemplarily, the preset sorting strategy can be a dictionary sorting strategy. Specifically, the keys in the data to be synchronized can be sorted according to the dictionary sorting strategy to achieve the update of the data to be synchronized and obtain the current synchronized data. It should be noted that the key-value pairs contained in the current synchronized data and the data to be synchronized are the same. Through the preset sorting strategy, the keys in the data to be synchronized are reordered, and the positions of the key-value pairs in the data to be synchronized are adjusted to obtain the current synchronized data.

[0047] The current synchronization data refers to data obtained after the data to be synchronized is updated according to a preset sorting strategy.

[0048] Specifically, the client obtains the data to be synchronized, and sorts the keys in the data to be synchronized according to a preset sorting strategy to obtain the current synchronized data.

[0049] S120: Determine the current data structure of the current synchronization data, and judge whether there is candidate historical synchronization data under the current data structure.

[0050] The current data structure refers to the data structure of the current synchronization data, that is, the data structure of the data to be synchronized. Exemplarily, there are multiple candidate data structures in the client, and the current data structure of the data to be synchronized is determined from the candidate data structures. The candidate data structure refers to a data structure pre-stored in the client.

[0051] The candidate historical synchronization data refers to the synchronization data that has been stored in the client and the server and belongs to the current data structure.

[0052] Specifically, the client determines the current data structure of the current synchronization data, and determines whether candidate historical synchronization data already exists under the current data structure, that is, determines whether the current synchronization data is the first synchronization data belonging to the current data structure.

[0053] S130: If so, determine the reference historical synchronization data from the candidate historical synchronization data, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data.

[0054] The currently transmitted data includes a reference data identifier that refers to the historical synchronization data, and difference-related data.

[0055] The reference historical synchronization data refers to candidate historical synchronization data with a smaller difference from the current synchronization data. Preferably, the reference historical synchronization data may be candidate historical synchronization data with a smallest difference from the current synchronization data.

[0056] Exemplarily, the data similarity between each candidate historical synchronization data and the current synchronization data is determined, and the reference historical synchronization data is determined from the candidate historical synchronization data according to the data similarity. The data similarity can be used to quantify the similarity between the candidate historical synchronization data and the current synchronization data.

[0057] The current transmission data refers to the data sent by the client to the server. The reference data identifier can uniquely represent the identity of the reference historical synchronization data. The difference-related data refers to the related data that differs between the current synchronization data and the reference historical synchronization data.

[0058] Specifically, if there are candidate historical synchronization data under the current data structure, the client determines the reference historical synchronization data with the smallest difference between the candidate historical synchronization data and the current synchronization data; compares the reference historical synchronization data with the current synchronization data to determine the difference-related data; and determines the current transmission data based on the reference data identifier and the difference-related data of the reference historical synchronization data.

[0059] S140: Send the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data.

[0060] The current data identifier can uniquely represent the identity of the current synchronization data.

[0061] Specifically, the client sends the current synchronization data to the server; the server generates the current synchronization data based on the current synchronization data and the stored candidate historical synchronization data; the server determines the current data identifier of the current synchronization data, and stores the current synchronization data and the current data identifier in correspondence; the server sends the current data identifier to the client.

[0062] S150: Receive the current data identifier fed back by the server, and store the current synchronization data and the current data identifier.

[0063] Specifically, the client receives the current data identifier fed back by the server; the client stores the current synchronization data and the current data identifier in correspondence.

[0064] An embodiment of the present invention provides a data transmission scheme, which obtains the data to be synchronized and updates the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data; determines the current data structure of the current synchronization data, and judges whether there is candidate historical synchronization data under the current data structure; if so, determines the reference historical synchronization data from the candidate historical synchronization data, and determines the current transmission data corresponding to the current synchronization data based on the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes a reference data identifier of the reference historical synchronization data, and difference-related data; sends the current transmission data to a server, so that the server generates and stores the current synchronization data based on the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; receives the current data identifier fed back by the server, and stores the current synchronization data and the current data identifier. In the above scheme, the client sends the current transmission data including the reference data identifier and the difference-related data to the server, so that the server generates the current synchronization data based on the current transmission data and the stored candidate historical synchronization data. This ensures that under the current data structure, if the candidate historical synchronization data already exists in the client and the server, the client does not need to send the repeated data again, thereby reducing the amount of data transmitted between the client and the server and improving the efficiency of data transmission.

[0065] On the basis of the above technical solution, after determining whether there is candidate historical synchronization data under the current data structure, the method also includes: if not, sending the current synchronization data to the server, so that the server receives and stores the current synchronization data, and determines the current data identifier of the current synchronization data; receiving the current data identifier fed back by the server, and storing the current synchronization data and the current data identifier.

[0066] Specifically, if there is no candidate historical synchronization data under the current data structure in the client, it means that the same candidate historical synchronization data does not exist in the server. At this time, the client needs to send the current synchronization data directly to the server; the server determines the current data identifier of the current synchronization data, and stores the current data identifier and the current synchronization data correspondingly; the server sends the current data identifier to the client; the client stores the current data identifier and the current synchronization data correspondingly.

[0067] It can be understood that if there is no candidate historical synchronization data under the current data structure of the client, the current synchronization data is directly sent to the server, so that the server stores at least one synchronization data that can be used for subsequent reference, thereby realizing the necessary transmission of synchronization data and improving the effectiveness of data transmission between the client and the server.

[0068] Embodiment 2

[0069] Figure 2It is a flow chart of a data transmission method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "determining the current transmission data corresponding to the current synchronization data based on the reference historical synchronization data and the current synchronization data" into "determining the initial data difference position and the corresponding data difference state between the reference historical synchronization data and the current synchronization data; determining the initial data difference value of the corresponding initial data difference position based on the data difference state, and generating difference-related data including the initial data difference position and the initial data difference value; determining the reference data identifier of the reference historical synchronization data, and determining the current transmission data corresponding to the current synchronization data based on the reference data identifier, the difference-related data and the preset data separator" to improve the determination mechanism of the current transmission data. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments.

[0070] See also Figure 2 The data transmission method shown includes:

[0071] S210: Acquire the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain current synchronized data.

[0072] S220: Determine the current data structure of the current synchronization data, and determine whether there is candidate historical synchronization data under the current data structure.

[0073] S230: If so, determine the reference historical synchronization data from the candidate historical synchronization data, and determine the initial data difference position and the corresponding data difference state between the reference historical synchronization data and the current synchronization data.

[0074] The initial data difference position refers to the position of data that differs between the reference historical synchronization data and the current synchronization data. Exemplarily, the initial data difference position may be a difference position number, such as the data at position 52 in the current synchronization data differs from the reference historical synchronization data.

[0075] The data difference state can be understood as a situation where there is a difference between the current synchronization data and the reference historical synchronization data. Exemplarily, the data difference state includes a data missing state, a data added state, and a data replaced state.

[0076] The data missing state may indicate that the current synchronization data is missing at least some data compared to the reference historical synchronization data. The data added state may indicate that the current synchronization data is increased at least some data compared to the reference historical synchronization data. The data replacement state may indicate that the data at a certain initial data difference position in the current synchronization data is different from the data at the corresponding initial data difference position in the reference historical synchronization data.

[0077] It can be understood that the data difference state includes at least one of a data missing state, a data added state and a data replaced state, which improves the diversity and richness of the data difference state.

[0078] Specifically, if it exists, the client compares the candidate historical synchronization data with the current synchronization data respectively, and determines the candidate historical synchronization data with the smallest difference as the reference historical synchronization data; the client determines the initial data difference position where there is a difference between the reference historical synchronization data and the current synchronization data, and the data difference state corresponding to the initial data difference position.

[0079] S240 . Determine an initial data difference value corresponding to the initial data difference position according to the data difference state, and generate difference-associated data including the initial data difference position and the initial data difference value.

[0080] The initial data difference value refers to the difference in value between the current synchronization data and the reference historical synchronization data at the initial difference data position.

[0081] In an optional embodiment, generating difference-associated data including initial data difference positions and initial data difference values ​​includes: determining whether there are continuous initial data difference positions among the initial data difference positions whose data difference state is a data replacement state, and if so, merging the continuous initial data difference positions to obtain candidate data difference positions; merging the initial data difference values ​​corresponding to the candidate data difference positions to obtain candidate data difference values; and determining the difference-associated data based on the candidate data difference positions, the candidate data difference values, the unmerged initial data difference positions, and the initial data difference values.

[0082] The candidate data difference position refers to a data difference position obtained by merging at least two initial data difference positions, and the candidate data difference value refers to a data difference value obtained by merging initial data difference values ​​corresponding to the candidate data difference position.

[0083] Specifically, determine whether there are at least two adjacent initial data difference positions in the initial data difference positions whose data difference state is the data replacement state; if so, merge the adjacent initial data difference positions to obtain a candidate data difference position, that is, use the previous initial data difference position in the continuous initial data difference positions as the candidate data difference position, and replace the continuous initial data difference positions with the candidate data difference position; merge the initial data difference values ​​corresponding to the candidate data difference positions to obtain the candidate data difference values ​​corresponding to the candidate data difference positions; and generate difference-related data including at least two of the candidate data difference positions, the candidate data difference values, the unmerged initial data difference positions, and the unmerged initial data difference values.

[0084] For example, if the initial data difference positions whose data difference state is the data replacement state include 52, 66, 67 and 98, the initial data difference value corresponding to the initial data difference position 52 is A, the initial data difference value corresponding to the initial data difference position 66 is B, the initial data difference value corresponding to the initial data difference position 67 is C, and the initial data difference value corresponding to the initial data difference position 98 is D, then it is determined that there are continuous initial data difference positions, namely 66 and 67, and the initial data difference positions 66 and 67 are merged to obtain the candidate data difference position 66; the initial data difference values ​​B and C corresponding to the candidate data difference position are merged to obtain the candidate data difference value BC; and the candidate data difference position 66, the candidate data difference value BC, the unmerged initial data difference positions 52 and 98, and the unmerged initial data difference values ​​A and D are generated to generate difference-associated data.

[0085] It can be understood that by setting the data difference state to a data replacement state and merging consecutive initial data difference positions to obtain candidate data difference positions, and then merging the initial data difference values ​​corresponding to the candidate data difference positions to obtain candidate data difference values, the amount of data in the difference-associated data is further reduced, thereby reducing the amount of data of the current transmission data generated subsequently.

[0086] It should be noted that if the data difference state is a data missing state, a preset data missing symbol is added before the initial data difference position; if the data difference state is a data added state, a preset data added symbol is added before the initial data difference position. The preset data missing symbol refers to a pre-set symbol that can be used to indicate that there is data missing at a certain initial data difference position. The preset data added symbol refers to a pre-set symbol that can be used to indicate that there is data added at a certain initial data difference position.

[0087] The embodiment of the present invention does not impose any limitation on the setting of the preset data missing symbol and the preset data addition symbol, which can be set by the technician according to experience or needs. Exemplarily, the preset data missing symbol can be represented by "-". If the initial data difference positions of the data missing state are continuous, they are merged and the format of "-starting position number-ending position number" is used. Among them, the starting position number refers to the data difference state is the data missing state, and the initial data difference position that ranks first in the continuous initial data difference positions. The ending position number refers to the data difference state is the data missing state, and the initial data difference position that ranks last in the continuous initial data difference positions. Exemplarily, the preset data addition symbol can be represented by "+".

[0088] S250: Determine a reference data identifier of the reference historical synchronization data, and determine current transmission data corresponding to the current synchronization data according to the reference data identifier, the difference-related data and the preset data separator.

[0089] The preset data separator is a pre-set symbol that can be used to separate data. The embodiment of the present invention does not limit the preset data separator, which can be set by technicians based on experience or needs. Exemplarily, the preset data separator can be "|".

[0090] Exemplarily, the data format in the current transmission data may be a reference data identifier, a preset data separator, difference-related data, and a preset data separator. For example, the current transmission data may be 1|52,4|127,9|147,3|176,38; wherein 1 represents the reference data identifier of the reference historical synchronization data; 52, 127, and 147 represent the initial data difference position; 176 represents the candidate data difference position; 4, 9, and 3 represent the initial data difference values ​​corresponding to the corresponding initial data difference positions; and 38 represents the candidate data difference value corresponding to the candidate data difference position.

[0091] S260: Send the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data.

[0092] S270: Receive the current data identifier fed back by the server, and store the current synchronization data and the current data identifier.

[0093] The embodiment of the present invention provides a data transmission scheme, which refines the operation of determining the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data into determining the initial data difference position and the corresponding data difference state between the reference historical synchronization data and the current synchronization data; determining the initial data difference value of the corresponding initial data difference position according to the data difference state, and generating difference association data including the initial data difference position and the initial data difference value; determining the reference data identifier of the reference historical synchronization data, and determining the current transmission data corresponding to the current synchronization data according to the reference data identifier, the difference association data and the preset data separator, thereby improving the determination mechanism of the current transmission data. The above scheme improves the accuracy of the determined current transmission data by determining the initial data difference position and the data difference state, and then determining the initial data difference value according to the data difference state, generating difference association data including the initial data difference position and the initial data difference value, and determining the current transmission data corresponding to the current synchronization data according to the reference data identifier, the difference association data and the preset data separator.

[0094] Embodiment 3

[0095] Figure 3 This is a flowchart of a data transmission method provided in Embodiment 3 of the present invention. This embodiment is applicable to data transmission situations in the Internet of Things. The method can be executed by a data transmission device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the data transmission function.

[0096] See also Figure 3 The data transmission method shown is applied to the server and includes:

[0097] S310: Receive current transmission data sent by the client.

[0098] The currently transmitted data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to a preset sorting strategy and comparing it with the reference historical synchronization data determined from the candidate historical synchronization data.

[0099] The currently transmitted data includes reference data identifiers of reference historical synchronization data and difference-related data.

[0100] Among them, the currently transmitted data refers to the data sent by the client to the server. The data to be synchronized refers to the data that the client and the server need to synchronize and store. The embodiment of the present invention does not impose any limitation on the form of the data to be synchronized. For example, the data to be synchronized can be displayed in the form of characters, that is, the data to be synchronized can be a string. The currently synchronized data refers to the data obtained after the data to be synchronized is updated according to the preset sorting strategy.

[0101] Among them, the preset sorting strategy refers to a pre-set strategy that can be used to sort the sub-data in the data to be synchronized. Exemplarily, the preset sorting strategy can be a dictionary sorting strategy. Specifically, the keys in the data to be synchronized can be sorted according to the dictionary sorting strategy to achieve the update of the data to be synchronized and obtain the current synchronized data. It should be noted that the key-value pairs contained in the current synchronized data and the data to be synchronized are the same. Through the preset sorting strategy, the keys in the data to be synchronized are reordered, and the positions of the key-value pairs in the data to be synchronized are adjusted to obtain the current synchronized data.

[0102] The candidate historical synchronization data refers to the synchronization data that has been stored in the client and the server and belongs to the current data structure. The reference historical synchronization data refers to the candidate historical synchronization data that has a smaller difference with the current synchronization data. Preferably, the reference historical synchronization data can be the candidate historical synchronization data that has the smallest difference with the current synchronization data.

[0103] The reference data identifier can uniquely represent the identity of the reference historical synchronization data. The difference-related data refers to the related data that has differences between the current synchronization data and the reference historical synchronization data.

[0104] Specifically, the client obtains the data to be synchronized, and sorts the keys in the data to be synchronized according to a preset sorting strategy to obtain the current synchronized data; the client determines the current data structure of the current synchronized data, and determines whether there is candidate historical synchronization data under the current data structure, that is, determines whether the current synchronized data is the first synchronization data belonging to the current data structure; if there is candidate historical synchronization data under the current data structure, the client determines the reference historical synchronization data with the smallest difference from the current synchronization data from the candidate historical synchronization data; compares the reference historical synchronization data with the current synchronization data to determine the difference-related data; determines the current transmission data based on the reference data identifier and the difference-related data of the reference historical synchronization data; the client sends the current transmission data to the server; and the server receives the current transmission data.

[0105] S320: Determine reference historical synchronization data from candidate historical synchronization data according to the reference data identifier, and generate current synchronization data according to the difference-related data and the reference historical synchronization data.

[0106] Specifically, the server determines the reference historical synchronization data from the stored candidate historical synchronization data according to the current parameter data identifier; and generates the current synchronization data according to the difference association data and the reference historical synchronization data.

[0107] It should be noted that when the server generates current synchronization data based on reference historical synchronization data and difference-related data, the current synchronization data will not replace the reference historical synchronization data, that is, the reference historical synchronization data is still retained and a new current synchronization data is generated.

[0108] S330: Determine the current data identifier of the current synchronization data, and store the current synchronization data and the current data identifier.

[0109] The current data identifier can uniquely represent the identity of the current synchronization data.

[0110] Specifically, the server determines the current data identifier of the current synchronization data, and stores the current synchronization data and the current data identifier in correspondence with each other.

[0111] S340: Send the current data identifier to the client, so that the client stores the current synchronization data and the current data identifier.

[0112] Specifically, the server sends the current data identifier to the client; the client receives the current data identifier fed back by the server; and the client stores the current synchronization data and the current data identifier in correspondence.

[0113] The embodiment of the present invention provides a data transmission scheme, which receives the current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to the preset sorting strategy, and the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference associated data; according to the reference data identifier, the reference historical synchronization data is determined from the candidate historical synchronization data, and the current synchronization data is generated according to the difference associated data and the reference historical synchronization data; the current data identifier of the current synchronization data is determined, and the current synchronization data and the current data identifier are stored; the current data identifier is sent to the client so that the client stores the current synchronization data and the current data identifier. In the above scheme, the client sends the current transmission data including the reference data identifier and the difference associated data to the server, and the server generates the current synchronization data according to the current transmission data and the stored candidate historical synchronization data, so that under the current data structure, if the candidate historical synchronization data already exists in the client and the server, the client does not need to send the repeated part of the data again, which reduces the amount of data transmitted between the client and the server and improves the efficiency of data transmission.

[0114] Embodiment 4

[0115] The embodiment of the present invention provides an optional example of data transmission based on the above embodiment. It should be noted that for the parts not described in detail in the embodiment of the present invention, reference can be made to the descriptions of other embodiments.

[0116] For example, if the real-time data (i.e. data to be synchronized) transmitted by the environmental monitoring device (i.e. client) to the server (i.e. service end) for the first time is {"deviceCode":"YS20230224020","externalNo":"JUCHENG","deviceTime":"1732258632000","noise":"25.8","pmTwoFive":"23.2","pmTen":"32.8","tsp":"47.4","temperature":"9.8","humidity":"55.0","windSpeed":"1.0","windAngle":"45.0"}; 10 seconds later, the real-time data transmitted to the server for the second time is {"deviceCode":"YS20230224020","externalNo":"JUCHENG","deviceTime":"1732258632000","noise":"25.8","pmTwoFive":"23.2","pmTen":"32.8","tsp":"47.4","temperature":"9.8","humidity":"55.0","windSpeed":"1.0","windAngle":"45.0"}. 0224020","externalNo":"JUCHENG","deviceTime":"1732258642000","noise":"25.8","pmTwoFive":"23.3","pmTen":"32.9","tsp":"38.4","temperature":"9.8","humidity":"55.0","windSpeed":"1.0","windAngle":"45.0"}; Comparing the two to-be-synchronized data, only the following key values ​​have changed, namely"deviceTime":"1732258632000","pmTwoFive":"23.2","pmTen":"32.8","tsp":"47.4"

[0117] "deviceTime":"1732258642000","pmTwoFive":"23.3","pmTen":"32.9","tsp":"38.4".

[0118] In the data transmission scheme provided by the embodiment of the present invention, when the client transmits real-time data to the server for the first time, all keys are first sorted according to the dictionary to obtain the following json (JavaScript Object Notation, JS object notation) string (i.e., current synchronization data): {"deviceCode":"YS20230224020","deviceTime":"1732258632000","externalNo":"JUCHENG","humidity":"55.0","noise":"25.8","pmTen":"32.8","pmTwoFive":"23.2","temperature":"9.8","tsp":"47.4","windAngle":"45.0","windSpeed":"1.0"}; the client sends the above json string to the server, and the server saves the current transmission data and the current data identifier 1 at the same time after receiving it; the server returns a normal reception information signal and the current data identifier to the client, and the client also saves the current data identifier 1 and the current synchronization data after receiving the signal.

[0119] Furthermore, when the client sends data for the second time, all keys in the data to be synchronized are sorted by dictionary to obtain the following JSON string: {"deviceCode":"YS20230224020","deviceTime":"1732258642000","externalNo":"JUCHENG","humidity":"55.0","noise":"25.8","pmTen":"32.9","pmTwoFive":"23.3","temperature":"9.8","tsp":"38.4","windAngle":"45.0","windSpeed":"1.0"}; Compare the two JSON strings to find the difference position number (that is, the initial data difference position) and the difference value (initial data difference value), and obtain the following Table 1.

[0120] Table 1 Differences between the current synchronization data and the reference historical synchronization data for the second data transmission

[0121] Among them, the initial data difference positions corresponding to sequence numbers 4 and 5 are continuous positions and can be merged for processing. The current transmission data is assembled through the following format. Reference data identifier | difference position number 1, initial data difference value | difference position number 2, initial data difference value | difference position number n, initial data difference value. Exemplarily, the current transmission data corresponding to Table 1 can be 1|52,4|127,9|147,3|176,38. After receiving the current transmission data, the server finds the corresponding reference historical synchronization data through the reference data identifier 1, and then obtains the complete data through the replacement method, that is, generates the current synchronization data.

[0122] It should be noted that if the initial data difference value includes "|" and / or ",", in order to avoid misunderstanding on the server side, it is necessary to add a preset escape character before the "|" and "," in the initial data difference value. Among them, the preset escape character can be pre-set and used to represent a character with a special meaning in the current transmission data. The embodiment of the present invention does not impose any limitation on the setting of the preset escape character, which can be set by the technician according to experience or needs. Exemplarily, the preset escape character can be "\".

[0123] Furthermore, when the client sends data for the third time, all keys in the data to be synchronized are sorted dictionary-wise to obtain the current synchronization data {"deviceCode":"YS20230224020","deviceTime":"1732258652000","externalNo":"JUCHENG","humidity":"55.0","noise":"25","pmTen":"32.9","pmTwoFive":"23.3","temperature":"9.8","tsp":"38.4","windAngle":"45.0","windSpeed":"1","zsite":"101,35"}; the reference historical synchronization data is determined from the candidate historical synchronization data under the current data structure; the current synchronization data is compared with the reference historical synchronization data to find the difference position number and difference value, and the following Table 2 is obtained.

[0124] Table 2 Differences between the current synchronization data and the reference historical synchronization data for the third data transmission

[0125] Through the above table, we get 2|52,5|-112-113|215,"\,|+217,"zsite":"101\,35. Among them, 2 represents the reference data identifier of the reference historical synchronization data; 52, -112-113, 215 and +217 all represent the initial data difference position; -112-113 represents the initial data difference position with missing data; +217 represents the initial data difference position with added data; 5, "\,", "zsite":"101\,35 represent the initial data difference value; \ represents the preset escape character. After receiving the current transmission data, the server finds the corresponding reference historical synchronization data through the reference data identifier 2, and then obtains the complete data through the replacement method, that is, generates the current synchronization data.

[0126] The data transmission solution provided by the embodiment of the present invention can greatly reduce the amount of data transmitted and improve data transmission efficiency. At the same time, the embodiment of the present invention has better effects on data with the same data structure and smaller data differences, especially in the scenario of hardware data reporting server.

[0127] Embodiment 5

[0128] Figure 4 This is a schematic diagram of the structure of a data transmission device provided in Embodiment 5 of the present invention. This embodiment is applicable to data transmission in the Internet of Things. The method can be executed by a data transmission device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries a data transmission function.

[0129] like Figure 4 As shown, the device is configured on the client, and includes: a current synchronization data determination module 410, a historical synchronization data judgment module 420, a current transmission data determination module 430, a current transmission data sending module 440 and a data storage module 450. Among them,

[0130] The current synchronization data determination module 410 is used to obtain the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data;

[0131] The historical synchronization data judgment module 420 is used to determine the current data structure of the current synchronization data and to judge whether there is candidate historical synchronization data under the current data structure;

[0132] The current transmission data determination module 430 is used to determine the reference historical synchronization data from the candidate historical synchronization data, if any, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference association data;

[0133] The current transmission data sending module 440 is used to send the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data;

[0134] The data storage module 450 is used to receive the current data identifier fed back by the server, and store the current synchronization data and the current data identifier.

[0135] An embodiment of the present invention provides a data transmission scheme, which obtains the data to be synchronized and updates the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data; determines the current data structure of the current synchronization data, and judges whether there is candidate historical synchronization data under the current data structure; if so, determines the reference historical synchronization data from the candidate historical synchronization data, and determines the current transmission data corresponding to the current synchronization data based on the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes a reference data identifier of the reference historical synchronization data, and difference-related data; sends the current transmission data to a server, so that the server generates and stores the current synchronization data based on the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; receives the current data identifier fed back by the server, and stores the current synchronization data and the current data identifier. In the above scheme, the client sends the current transmission data including the reference data identifier and the difference-related data to the server, so that the server generates the current synchronization data based on the current transmission data and the stored candidate historical synchronization data. This ensures that under the current data structure, if the candidate historical synchronization data already exists in the client and the server, the client does not need to send the repeated data again, thereby reducing the amount of data transmitted between the client and the server and improving the efficiency of data transmission.

[0136] Optionally, the current transmission data determination module 430 includes:

[0137] a data difference state determining unit, configured to determine an initial data difference position and a corresponding data difference state between the reference historical synchronization data and the current synchronization data;

[0138] a difference-associated data determining unit, configured to determine an initial data difference value of a corresponding initial data difference position according to the data difference state, and generate difference-associated data including the initial data difference position and the initial data difference value;

[0139] The current transmission data determination unit is used to determine the reference data identifier of the reference historical synchronization data, and determine the current transmission data corresponding to the current synchronization data according to the reference data identifier, the difference association data and the preset data separator.

[0140] Optionally, the data difference state includes a data missing state, a data added state and a data replaced state.

[0141] Optionally, the difference-related data determining unit is specifically configured to:

[0142] Determine whether there are continuous initial data difference positions among the initial data difference positions whose data difference state is a data replacement state, and if so, merge the continuous initial data difference positions to obtain candidate data difference positions;

[0143] Merging the initial data difference values ​​corresponding to the candidate data difference positions to obtain the candidate data difference values;

[0144] Determine difference-associated data according to the candidate data difference positions, the candidate data difference values, the unmerged initial data difference positions, and the initial data difference values.

[0145] Optionally, after determining whether candidate historical synchronization data exists under the current data structure, the device further includes:

[0146] A current data identification determination module, used for sending the current synchronization data to the server if it does not exist, so that the server receives and stores the current synchronization data, and determines the current data identification of the current synchronization data;

[0147] The current data identifier receiving module is used to receive the current data identifier fed back by the server, and store the current synchronization data and the current data identifier.

[0148] The data transmission device provided in the embodiment of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each data transmission method.

[0149] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the data to be synchronized and the candidate historical synchronization data are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0150] Embodiment 6

[0151] Figure 5This is a structural diagram of a data transmission device provided in Example 6 of the present invention. This embodiment can be applicable to data transmission situations in the Internet of Things. The method can be executed by a data transmission device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the data transmission function.

[0152] like Figure 5 As shown, the device is configured at the server end, and includes: a current transmission data receiving module 510, a current synchronization data generating module 520, a current data identification determining module 530 and a current data identification sending module 540. Among them,

[0153] The current transmission data receiving module 510 is used to receive the current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to the preset sorting strategy, and the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference association data;

[0154] The current synchronization data generating module 520 is used to determine the reference historical synchronization data from the candidate historical synchronization data according to the reference data identifier, and generate the current synchronization data according to the difference association data and the reference historical synchronization data;

[0155] A current data identification determination module 530, configured to determine the current data identification of the current synchronization data, and store the current synchronization data and the current data identification;

[0156] The current data identification sending module 540 is used to send the current data identification to the client, so that the client stores the current synchronization data and the current data identification.

[0157] The embodiment of the present invention provides a data transmission scheme, which receives the current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to the preset sorting strategy, and the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference associated data; according to the reference data identifier, the reference historical synchronization data is determined from the candidate historical synchronization data, and the current synchronization data is generated according to the difference associated data and the reference historical synchronization data; the current data identifier of the current synchronization data is determined, and the current synchronization data and the current data identifier are stored; the current data identifier is sent to the client so that the client stores the current synchronization data and the current data identifier. In the above scheme, the client sends the current transmission data including the reference data identifier and the difference associated data to the server, and the server generates the current synchronization data according to the current transmission data and the stored candidate historical synchronization data, so that under the current data structure, if the candidate historical synchronization data already exists in the client and the server, the client does not need to send the repeated part of the data again, which reduces the amount of data transmitted between the client and the server and improves the efficiency of data transmission.

[0158] The data transmission device provided in the embodiment of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each data transmission method.

[0159] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the data to be synchronized and the candidate historical synchronization data are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0160] Embodiment 7

[0161] Figure 6 1 is a schematic diagram of the structure of an electronic device for implementing a data transmission method provided by Embodiment 7 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0162] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0163] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0164] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data transmission method.

[0165] In some embodiments, the data transmission method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data transmission method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data transmission method in any other appropriate manner (e.g., by means of firmware).

[0166] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0167] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0168] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0169] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0170] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0171] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0172] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0173] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission method, characterized in that: Applied to a client, the method comprises: Acquire the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain the current synchronized data; Determine the current data structure of the current synchronization data, and determine whether there is candidate historical synchronization data under the current data structure; If so, determine the reference historical synchronization data from the candidate historical synchronization data, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes the reference data identifier of the reference historical synchronization data, and difference-related data; Sending the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; The current data identifier fed back by the server is received, and the current synchronization data and the current data identifier are stored.

2. The method according to claim 1, characterized in that The determining, according to the reference historical synchronization data and the current synchronization data, the current transmission data corresponding to the current synchronization data comprises: Determining an initial data difference position and a corresponding data difference state between the reference historical synchronization data and the current synchronization data; Determine an initial data difference value of a corresponding initial data difference position according to the data difference state, and generate difference association data including the initial data difference position and the initial data difference value; A reference data identifier of the reference historical synchronization data is determined, and current transmission data corresponding to the current synchronization data is determined according to the reference data identifier, the difference association data and a preset data separator.

3. The method according to claim 2, characterized in that The data difference status includes a data missing status, a data added status and a data replaced status.

4. The method according to claim 3, characterized in that The generating of difference associated data including the initial data difference position and the initial data difference value comprises: Determine whether there are continuous initial data difference positions among the initial data difference positions whose data difference state is a data replacement state, and if so, merge the continuous initial data difference positions to obtain candidate data difference positions; Merging the initial data difference values ​​corresponding to the candidate data difference positions to obtain the candidate data difference values; Determine difference-associated data according to the candidate data difference positions, the candidate data difference values, the unmerged initial data difference positions, and the initial data difference values.

5. The method according to claim 1, characterized in that After determining whether there is candidate historical synchronization data under the current data structure, the method further includes: If not, sending the current synchronization data to the server, so that the server receives and stores the current synchronization data, and determines the current data identifier of the current synchronization data; Receive the current data identifier fed back by the server, and store the current synchronization data and the current data identifier.

6. A data transmission method, characterized in that: Applied to the server, the method includes: Receive current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to a preset sorting strategy, and comparing the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes a reference data identifier of the reference historical synchronization data, and difference-related data; Determine reference historical synchronization data from the candidate historical synchronization data according to the reference data identifier, and generate current synchronization data according to the difference association data and the reference historical synchronization data; Determine a current data identifier of the current synchronization data, and store the current synchronization data and the current data identifier; The current data identifier is sent to the client, so that the client stores the current synchronization data and the current data identifier.

7. A data transmission device, characterized in that: Configured on the client, the device includes: The current synchronization data determination module is used to obtain the data to be synchronized, and update the data to be synchronized according to a preset sorting strategy to obtain the current synchronization data; A historical synchronization data judgment module is used to determine the current data structure of the current synchronization data and to judge whether there is candidate historical synchronization data under the current data structure; A current transmission data determination module, used to determine the reference historical synchronization data from the candidate historical synchronization data, if any, and determine the current transmission data corresponding to the current synchronization data according to the reference historical synchronization data and the current synchronization data; wherein the current transmission data includes the reference data identifier of the reference historical synchronization data, and difference-related data; A current transmission data sending module, used to send the current transmission data to the server, so that the server generates and stores the current synchronization data according to the current transmission data and the candidate historical synchronization data, and determines the current data identifier of the current synchronization data; The data storage module is used to receive the current data identifier fed back by the server and store the current synchronization data and the current data identifier.

8. A data transmission device, characterized in that: Configured at the server end, the device includes: A current transmission data receiving module, used to receive the current transmission data sent by the client; wherein the current transmission data is the current synchronization data obtained by the client updating the acquired data to be synchronized according to the preset sorting strategy, and the reference historical synchronization data determined from the candidate historical synchronization data; the current transmission data includes the reference data identifier of the reference historical synchronization data, and the difference association data; a current synchronization data generating module, configured to determine reference historical synchronization data from the candidate historical synchronization data according to the reference data identifier, and generate current synchronization data according to the difference association data and the reference historical synchronization data; A current data identification determination module, used to determine the current data identification of the current synchronization data, and store the current synchronization data and the current data identification; The current data identification sending module is used to send the current data identification to the client, so that the client stores the current synchronization data and the current data identification.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a data transmission method as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a data transmission method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • File monitoring and message pushing based real-time synchronization system

    CN105740418A

  • Data transmission method and device

    CN110636009A

  • Cloud object storage synchronization method and device, computer equipment and storage medium

    CN113282540A

  • Method and device for updating maintenance and measurement data

    CN118132576A

  • Model parameter scheduling method and device

    CN118133928A