A method of data synchronization

By using the SIM card as a relay station during data synchronization, and by matching and segmenting data segments using a preset data structure and data identifier, the problem of inflexibility in data synchronization between different business platforms or systems is solved, and efficient and stable data synchronization is achieved.

CN119052262BActive Publication Date: 2026-04-28CHINA MOBILE INTERNET CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE INTERNET CO LTD
Filing Date
2024-08-06
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The flexibility of data synchronization between different business platforms or systems is limited, and the use of different synchronization protocols or technologies by existing synchronization software makes data synchronization inconvenient.

Method used

Using the SIM card as a relay station, it receives data from the business platform and stores it according to a preset data structure. It then sends data to the cloud server for synchronization, uses different data structures to process initial and non-initial synchronization data, uses data identifier matching and offset information to segment data segments, and uses hash values ​​and index information for data storage and synchronization.

Benefits of technology

It improves the flexibility and efficiency of data synchronization between different business platforms or systems, reduces duplicate data transmission and errors, and optimizes the data synchronization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052262B_ABST
    Figure CN119052262B_ABST
Patent Text Reader

Abstract

The application discloses a data synchronization method. The method comprises the following steps: receiving data to be synchronized sent by a service platform; storing the data to be synchronized according to a preset data structure; and sending data of the preset data structure to a cloud server, so that the cloud server performs data synchronization based on the data of the preset data structure. According to the embodiment of the application, the received data to be synchronized is stored in a SIM card according to a preset data structure, and is forwarded to a cloud server, so that the SIM card can be used as a transfer station for data synchronization, and data synchronization of different service platforms or systems is realized. A new scheme is provided for data synchronization of different service platforms or systems, and the flexibility of data synchronization is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and in particular relates to a method for data synchronization. Background Technology

[0002] With the widespread adoption of mobile devices and the development of social media, users are generating increasingly more data on their devices. Since mobile devices have limited storage space, users can use synchronization software to sync important data to cloud servers, thus ensuring that this data is not lost.

[0003] However, the use of different synchronization protocols or technologies by different synchronization software limits the flexibility of data synchronization between different business platforms or systems. Therefore, improving the flexibility of data synchronization between different business platforms or systems is a technical problem that urgently needs to be solved by relevant technical personnel. Summary of the Invention

[0004] This application provides a data synchronization method that can improve the flexibility of data synchronization.

[0005] In a first aspect, embodiments of this application provide a data synchronization method applied to a user identification SIM card. The method includes: receiving data to be synchronized sent by a service platform; storing the data to be synchronized according to a preset data structure; and sending the data with the preset data structure to a cloud server for the cloud server to perform data synchronization based on the data with the preset data structure.

[0006] In one embodiment, the data to be synchronized further includes a data identifier; the preset data structure includes a first data structure and a second data structure; before storing the data to be synchronized according to the preset data structure, the method further includes: matching the data identifier with data identifiers in a pre-stored list in the SIM card; storing the data according to the preset data structure, including: if it is determined that the data identifier matches the data identifiers in the list, storing the data to be synchronized according to the first data structure; if it is determined that the data identifier does not match the data identifiers in the list, storing the data to be synchronized according to the second data structure.

[0007] In one embodiment, the format of the second data structure includes second index information, a second hash value, and a second target data segment; when it is determined that the data identifier does not match the data identifier in the list, the data to be synchronized is stored according to the second data structure, including: dividing the data according to a first preset step size to obtain several second target data segments; determining the second index information of each second target data segment and the second hash value corresponding to each second target data segment; and storing the second target data segment, the second hash value, and the second index information.

[0008] In one embodiment, the format of the first data structure includes first index information, a first hash value, and a first target data segment. When it is determined that a data identifier matches a data identifier in a list, the data to be synchronized is stored according to the first data structure, including: when it is determined that a data identifier matches a data identifier in a list, obtaining historical stored data corresponding to the data identifier; determining offset information between the data to be synchronized and the historical stored data; dividing the data to be synchronized into several first target data segments based on the offset information, and determining the first index information and the first hash value corresponding to each first target data segment, the first index information including start index information and end index information; and when it is determined that a data segment does not meet a first preset condition, storing the first target data segment, start index information, end index information, and first hash value.

[0009] In one embodiment, determining the offset information between the data to be synchronized and historical stored data includes: determining a first offset information between the data to be synchronized and historical stored data; dividing the data to be synchronized into several third target data segments according to a second preset step size; determining one or more offset information corresponding to each third target data segment; accumulating the offset information corresponding to each third target data segment to obtain a second offset information; determining the target offset information corresponding to each third target data segment when the first offset information equals the second offset information; and using the target offset information as the offset information between the data to be synchronized and historical stored data when the third target data segment corresponding to the target offset information satisfies a second preset condition.

[0010] In one embodiment, the first preset condition includes at least one of the following: the data length corresponding to the data segment is the same as the data length corresponding to the historical stored data; or the hash value of the data segment is the same as the hash value of the historical stored data; or the starting index information of the data segment is the same as the index information of the historical stored data.

[0011] In one implementation, the method further includes storing the data identifier in the list if it is determined that the data identifier does not match the data identifier in the list.

[0012] In one embodiment, before receiving the data to be synchronized sent by the service platform, the method further includes: receiving the target data parameters corresponding to the data to be synchronized sent by the service platform; and receiving the data to be synchronized sent by the service platform if the target data parameters meet the SIM card data synchronization requirements.

[0013] In one embodiment, the target data parameters include the data volume of the data to be synchronized and an application identifier; before receiving the data to be synchronized sent by the service platform, if the target data parameters meet the SIM card data synchronization requirements, the method further includes: determining the target application based on the application identifier; calculating the available space size of the SIM card using the target application; and determining that the target data parameters meet the SIM card data synchronization requirements if the data volume of the data to be synchronized is less than or equal to the available space size of the SIM card.

[0014] Secondly, embodiments of this application provide a data synchronization method applied to a cloud server, the method comprising: receiving data with a preset data structure sent by a SIM card; and performing data synchronization based on the data with the preset data structure.

[0015] Thirdly, embodiments of this application provide a data synchronization apparatus, the apparatus comprising:

[0016] The first receiving module is used to receive data to be synchronized sent by the business platform;

[0017] The storage module is used to store the data to be synchronized according to a preset data structure;

[0018] The sending module is used to send data with a preset data structure to the cloud server so that the cloud server can perform data synchronization based on the data with the preset data structure.

[0019] Fourthly, embodiments of this application provide a data synchronization apparatus, the apparatus comprising:

[0020] The second receiving module is used to receive data with a preset data structure sent by the SIM card;

[0021] The synchronization module is used to synchronize data based on a preset data structure.

[0022] Fifthly, embodiments of this application provide a data synchronization device, the device comprising: a processor and a memory storing computer program instructions; the processor executing the computer program instructions to implement the data synchronization method of the first aspect or any embodiment of the first aspect, or to implement the data synchronization method of the second aspect or any embodiment of the second aspect.

[0023] Sixthly, a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement a data synchronization method of the first aspect or any embodiment of the first aspect, or implement a data synchronization method of the second aspect or any embodiment of the second aspect.

[0024] In a seventh aspect, 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 a data synchronization method as described in the first aspect or any embodiment of the first aspect, or to implement a data synchronization method as described in the second aspect or any embodiment of the second aspect.

[0025] The data synchronization method of this application stores the received data to be synchronized in a SIM card according to a preset data structure and forwards it to a cloud server, enabling the SIM card to act as a relay station for data synchronization and realizing data synchronization between different business platforms or systems. This provides a new solution for data synchronization between different business platforms or systems and improves the flexibility of data synchronization. Attached Figure Description

[0026] 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.

[0027] Figure 1 A flowchart illustrating a data synchronization method according to an embodiment of this application is shown;

[0028] Figure 2 This illustration shows a schematic diagram of the offset state of various segments in the data to be synchronized according to an embodiment of this application;

[0029] Figure 3 A flowchart illustrating another data synchronization method provided in one embodiment of this application is shown;

[0030] Figure 4 This is a schematic diagram of the structure of a data synchronization device provided in another embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the structure of a data synchronization device provided in another embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the structure of a data synchronization device provided in another embodiment of this application. Detailed Implementation

[0033] 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.

[0034] 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.

[0035] With the widespread adoption of mobile devices and the development of social media, users are generating increasingly more data on their devices. Due to the limited storage space on mobile devices, users can use synchronization software to transfer important data to cloud servers. In related technologies, synchronization software can use protocols such as FTPS (File Transfer Protocol Secure) or SFTP (Secure File Transfer Protocol) to transfer data from the client to the cloud server during data synchronization. Furthermore, encryption protocols, such as Secure Sockets Layer (SSL) and Transport Layer Security (TLS), can be used to protect the confidentiality and integrity of data transmission.

[0036] Furthermore, it is understandable that different synchronization software uses different synchronization protocols or technologies, which limits the flexibility of data synchronization between different business platforms or systems. Therefore, how to improve the flexibility of data synchronization between different business platforms or systems is a technical problem that relevant technical personnel urgently need to solve.

[0037] To address the problems of the prior art, embodiments of this application provide a data synchronization method. The data synchronization method provided by embodiments of this application is described below.

[0038] Figure 1 A flowchart illustrating a data synchronization method according to an embodiment of this application is shown. Figure 1 As shown, the data synchronization method includes the following steps:

[0039] S110, the SIM card receives data to be synchronized from the service platform.

[0040] S120, the SIM card stores the data to be synchronized according to a preset data structure.

[0041] S130, the SIM card sends data with a preset data structure to the cloud server.

[0042] S140, the cloud server receives data with a preset data structure sent by the SIM card, and performs data synchronization based on the data with the preset data structure.

[0043] In some embodiments, in S110, before the SIM card receives the data to be synchronized sent by the service platform, the SIM card can first establish a data transmission channel with the service platform so that the data to be synchronized can be transmitted through the data channel.

[0044] For example, before sending the data to be synchronized to the SIM card, the service platform can first establish a BIP (Bearer Independent Protocol) transmission channel with the SIM card. The process of establishing the BIP channel between the service platform and the SIM card can include the following steps: The service platform initiates a BIP connection establishment request to the BIP gateway platform, wherein the connection establishment request may include user identity information, etc. The BIP gateway platform queries whether the service platform has BIP connection establishment authorization. The BIP gateway platform responds to the BIP connection establishment request to the service platform. The BIP gateway platform generates a BIP connection establishment data SMS and sends it to the mobile equipment (ME). The ME sends a PP-Download command to the SIM card, and the SIM card uses a key to parse the connection establishment data SMS. The SIM card sends a Send-SMS command to the ME, and the ME sends a BIP connection establishment SMS response to the BIP gateway platform. The SIM card sends an OPEN-CHANNEL command to the ME, opening the BIP channel between the ME and the BIP gateway platform. A TCP connection and TLS handshake are established between the ME and the BIP gateway platform. The SIM card sends an HTTP request to the BIP gateway platform. Upon receiving the request, the BIP gateway platform sends a BIP connection notification to the service platform.

[0045] In this embodiment, the SIM card can receive data to be synchronized from the service platform via a data transmission channel. This data to be synchronized may be file data. It is understood that this embodiment limits the specific content of the data to be synchronized.

[0046] Furthermore, in some embodiments, in S120, after the SIM receives the data to be synchronized sent by the service platform, it can store the data to be synchronized according to a preset data structure.

[0047] In this embodiment, the preset data structure may include the data structure and data content of the data to be synchronized. The preset data structure may include one or more data structures. Furthermore, different types of data to be synchronized can be stored using different data structures.

[0048] In this embodiment of the application, the data to be synchronized may include a data identifier. The data identifier can be used to indicate the identity information of the data to be synchronized. In one example, when the data to be synchronized is file data, the identifier of the file data can be represented by a File Identity Document (FID).

[0049] In one example, the business platform sends the data to be synchronized and the application processing instructions for FID to the BIP gateway platform in the form of a BIP connection notification response. The BIP gateway platform generates the corresponding Hypertext Transfer Protocol Secure (HTTPS) formatted data and sends an HTTP response to the SIM card. The SIM card uses a key, such as SCP81, to parse the application processing instructions and sends the application processing data instructions to the corresponding card application's Supplementary Security Domain (SSD). The SSD interacts with the data synchronization applet through corresponding instructions. The data synchronization applet stores the synchronized data in a separate storage space and returns the instruction execution result to the SSD. Further, the SSD encapsulates the instruction execution result into an HTTP request and sends it to the BIP gateway platform, which then sends the execution result response to the business platform. If the business platform's data transmission synchronization is not complete, the above process is repeated; if the business platform's data transmission synchronization is complete, it sends a BIP channel closure request to the BIP gateway platform, which then closes the HTTPS connection to the SIM card. The SIM card sends a channel close command (CLOSE CHANNEL) to the ME, and the ME closes the TCP connection between itself and the BIP gateway platform.

[0050] In this embodiment of the application, before the SIM card stores data according to different preset data structures, the data identifier in the received data to be synchronized can be matched with the data identifier in the list pre-stored in the SIM card, thereby determining the type of data to be synchronized.

[0051] In one example, the SIM card can iterate through a list, matching data identifiers with data identifiers pre-stored in the SIM card's list. In another example, the list could be a pre-stored file list (FID LIST) on the SIM card, and the type of data to be synchronized can be determined by checking if the FID is in the FID LIST.

[0052] In this embodiment, the data type to be synchronized may include initial synchronization type and non-initial synchronization type. The non-initial synchronization type data to be synchronized may be secondary synchronization data or multiple synchronization data. It is understood that the non-initial synchronization type data to be synchronized may be a correction or update of already synchronized data.

[0053] In this embodiment, if the data identifier of the data to be synchronized matches the data identifier in the SIM card's list, the data type to be synchronized can be determined to be a non-initial synchronization type. If the data identifier of the data to be synchronized does not match the data identifier in the SIM card's list, the data type to be synchronized can be determined to be an initial synchronization type.

[0054] In this embodiment of the application, the SIM card can store the data to be synchronized in different formats for different types of data. In one example, this embodiment of the application can use a Redundant Data Caching Mechanism (RDCM) to store the data to be synchronized sent by the business platform according to the corresponding data format, so that it is not necessary to repeatedly retrieve data from the cloud server in the future, avoiding the process of repeated retrieval and improving convenience.

[0055] In this embodiment of the application, if it is determined that the data identifier matches the data identifier in the list, the SIM card can store the data according to the first data structure.

[0056] In this embodiment of the application, if the data identifier matches the data identifier in the list, it can be determined that there is a data identifier to be synchronized in the data list. That is, the data to be synchronized is a non-initial type of data to be synchronized. At this time, the SIM card can store the data to be synchronized according to the first data structure.

[0057] In this embodiment, the format of the first data structure may include a first target data segment of the data to be synchronized, first index information, and a first hash value. It is understood that the first target data segment may be one or more data segments from the data to be synchronized, and these one or more data segments may be data segments distinct from historically stored data. The first index information can be used to indicate the location of the first target data segment within the data to be synchronized. The first hash value can serve as an identifier representing the first target data, used to determine whether one or more data segments from the data to be synchronized can be considered as the first target data.

[0058] In this embodiment of the application, when it is determined that the data identifier matches the data identifier in the list, the data to be synchronized can be stored through the following steps: when it is determined that the data identifier matches the data identifier in the data list, obtain the historical stored data corresponding to the data identifier; determine the offset information between the data corresponding to the data to be synchronized and the historical stored data; based on the offset information, divide the data corresponding to the data to be synchronized into several first target data segments, for example, p first target data segments, where p is an integer, and determine the first index information and the first hash value corresponding to each first target data segment, the first index information including the start index information and the end index information; when it is determined that the data segment does not meet the preset conditions, store the first target data segment, the start index information, the end index information, and the first hash value.

[0059] In this embodiment of the application, if it is determined that a data identifier matches a data identifier in the list, the SIM card can retrieve the historical stored data corresponding to the data identifier from the storage space. The historical stored data can be data stored in the SIM card before the data to be synchronized is retrieved.

[0060] In this embodiment, the SIM card can compare the data to be synchronized with historical stored data to determine the offset between the two. The offset can be used to indicate the offset state of the data between the data to be synchronized and the historical stored data. That is, it can be understood that when determining the offset between the data to be synchronized and the historical stored data, the actual data of the two data sets can be disregarded, and only the positional relationship of the data changes between them can be considered.

[0061] In this embodiment, the method for segmenting the data to be synchronized can be determined by determining the offset between the data to be synchronized and the historical stored data. Specifically, the data to be synchronized can be pre-segmented to obtain multiple data segments, and the offset corresponding to each data segment can be determined to determine the offset of the data to be synchronized. Based on the offset, the first target data segment after segmentation of the data to be synchronized is determined, and the first index information and the first hash value corresponding to each first target data segment are also determined.

[0062] In this embodiment, the offset information between the data to be synchronized and the historically stored data can be determined as follows: First offset information is determined between the data to be synchronized and the historically stored data. The first offset information can be the difference between the data volume corresponding to the data to be synchronized and the data volume corresponding to the historically stored data. The data to be synchronized is divided into several third target data segments according to a second preset step size. The second preset step size can be the same as the first preset step size, or the second step size can be set by a technician. Further, one or more offset information corresponding to each third target data segment is determined, and the offset information corresponding to each third target data segment is accumulated to obtain second offset information. When the first offset information equals the second offset information, target offset information corresponding to each third target data segment is determined; when the third target data segment corresponding to the target offset information satisfies a second preset condition, the target offset information is used as the offset information between the data to be synchronized and the historically stored data.

[0063] In one example, if the length of the data Y to be synchronized is n′, and the length of the historical data X is n, assuming the total offset z in the data Y to be synchronized is n′-n, let the number of insertions be θ1 and the number of deletions be θ2, and let z = θ1 - θ2 = n′-n. Divide the data Y to be synchronized into p segments. The data Y to be synchronized can be divided equally or non-equally. Establish a state diagram describing all possible offset states of the p segments, such as... Figure 2 As shown, Figure 2 This illustration shows a schematic diagram of the offset state of various segments in the data to be synchronized according to an embodiment of this application. Figure 2 It can be used to estimate the number of inserted or deleted data segments in the data Y to be synchronized. Figure 2 In the diagram, rows and columns can represent individual segments of data to be synchronized and the offset status of each segment, respectively. The variable σ i,j This represents the offset state of the i-th row and j-th column. Each edge μ in the state graph... i,α→β (σ i-1,α , σ i,β The ) indicates that the offset of the i-th segment is (β-α). For example... Figure 2As shown, the offset of the first segment is -m, the offset of the second segment is 0, and the offset of the p-th segment is m.

[0064] Furthermore, dynamic programming algorithms can be used to... Figure 2 In the state diagram shown, the path whose sum of all offsets is z is determined by the following formula (1):

[0065]

[0066] Wherein, where ε i = (β-α), α, β∈μ i,α→β Furthermore, it is understandable that the offset vector for each path can be represented by ε, and ε = (ε1, ε2, ε3, ..., ε...). p ).

[0067] Furthermore, the Longest Common Subsequence (LCS) algorithm can be used to determine the segmentation method that best matches the historical stored data. That is, the segment offset vector with the longest common subsequence can be selected, denoted as ε. max =(ε1,ε2,ε3,...,ε p In this segmentation method, the p segments of the data Y to be synchronized best match the historical data X, yielding a sequence with the minimum amount of difference. In one example, the process of determining the most suitable segmentation of the data to be synchronized using the LCS algorithm may include the following steps: First, determine the traversal offset, the segment of each data to be synchronized, and the segment of the historical data. Then, use the LCS algorithm to calculate X... i Find the longest common subsequence of Yi, denoted as dp. i Let dp(dp1[], dp2[], ..., dp[]) be the matching sequence of historical data X and data Y to be synchronized. p []). Further, find the longest matching sequence with historical data X, denoted as dp. max (dp1[], dp2[], ..., dp p []), the corresponding piecewise offset vector is denoted as ε. max =(ε1,ε2,ε3,...,ε p According to the offset vector ε=(ε1,ε2,ε3,...,ε) p Divide Y into p segments Y1, Y2, ..., Y... p Each segment of data Y to be synchronized can be represented by the following formula (2):

[0068]

[0069] Among them, Y jcan represent the j-th segment of the data Y to be synchronized; k can represent the amount of data in each segment, that is, formula (2) can be understood as the starting position of the j-th segment being (j-1)k+ε. j-1 The ending position is jk+ε j In this way, the starting index information of each segment can be identified. i For (j-1)k+ε j-1 End of index information i+1 For jk+ε j .

[0070] In this embodiment of the application, a hash function can be used to determine the first hash value corresponding to each first target data segment.

[0071] In this embodiment of the application, after obtaining the start index information, end index information and first hash value corresponding to each first target data segment in the data to be synchronized, the SIM card can determine whether the first target data segment meets the first preset condition by obtaining the start index information, end index information and first hash value. If the first target data segment does not meet the first preset condition, the first target data segment, start index information, end index information and first hash value are stored.

[0072] The first preset condition can be used to determine whether the first target data segment matches the corresponding data segment of historical data. The first preset condition can include any of the following: the data length of the data segment is the same as the data length of the historical stored data; or the hash value of the data segment is the same as the hash value of the historical stored data; or the starting index information of the data segment is the same as the index information of the historical stored data. In one example, the historical data can be divided into p segments, each segment having a length of q, and each data segment is denoted as X. i Among them, X i Including X1, X2, ..., X p For each X i Constructing the basic structure M of the message i =(S i H i ), where S i Let H be the starting index of the i-th segment of the sequence. i Let S be the hash value of the i-th data segment. If the SIM card determines the index information S of the historical data segments... i Not equal to index i , or S i+1 Not equal to index i+1 Then the first target data segment Y i The data segment does not match the historical data; that is, the first target data segment is an unsynchronized data segment. In another example, if Y... iThe length is q, and the SIM card-side data synchronization applet calculates Y. i hash value H′ i and with X i Hash value H i Compare, if H′ i Not equal to H i Then the first target data segment Y i Data segment X of historical data i A mismatch means that the first target data segment is an unsynchronized data segment. In another example, if Y... i If the length of the first target data segment Y is not equal to q, then... i Data segment X of historical data i Mismatch means that the first target data segment is an unsynchronized data segment.

[0073] In this embodiment, if it is determined that the first target data segment does not meet the first preset condition, the first target data segment, start index information, end index information, and first hash value are stored. In one example, for an unsynchronized first target data segment, the SIM card constructs a synchronization message E. i =(index) i index i+1 Y i H′ i For the synchronous data segment construction message E i =(S i ); and set the data synchronization format to data type=1, and the data synchronization content to data content=E.

[0074] In this embodiment of the application, by obtaining the historical storage data of the data to be synchronized and by obtaining the offset information between the data to be synchronized and the historical storage data, the data to be synchronized can be divided into parts consistent with the historical storage data to the greatest extent, thereby obtaining the difference data segments between the data to be synchronized and the historical storage data, and storing the data to be synchronized in a first data format of start index information, end index information, and first hash value.

[0075] In this embodiment, the longest common subsequence segmentation is predicted using offset information, replacing the fixed-length segmentation algorithm in conventional data synchronization. This divides the data to be synchronized into segments that match historical stored data as closely as possible, significantly reducing transmitted discrepancies and improving synchronization speed. Furthermore, the SIM card can locate discrepancy segments using the checksum (hash value) of the data segments, rather than calculating the checksum of the data segments to be synchronized byte by byte, thus optimizing the efficiency of SIM card synchronization optimization processing.

[0076] In this embodiment of the application, if it is determined that the data identifier does not match the data identifier in the list, the SIM card can store the data according to the second data structure and store the data identifier in the list.

[0077] In this embodiment of the application, if the data identifier does not match the data identifier in the list, it can be determined that there is no data identifier for the data to be synchronized in the data list, that is, the data to be synchronized is the initial type of data to be synchronized.

[0078] In this embodiment, the format of the second data structure may include second index information, a second hash value, and a second target data segment. It is understood that the second target data segment may be one or more data segments from the data to be synchronized. The second index information can be used to indicate the location of the second target data segment within the data to be synchronized. The second hash value can serve as an identifier representing the second target data, and it is understood that different second target data segments correspond to different second hash values.

[0079] In this embodiment, when it is determined that the data identifier does not match the data identifier in the list, the data to be synchronized can be stored through the following steps: The data is divided into n second target data segments according to a first preset step size. The length of the first preset step size can be q. The second index information and the second hash value corresponding to each second target data segment are determined. The second target data segments, the second hash values, and the second index information are stored. In one example, the SIM card can divide the data K to be synchronized of length f into n second target data segments (K1, K2, ..., K...). n Each segment has a length of q and satisfies f = pq. For each K... i Constructing the basic structure M of the message i =(S i H i ), where S i Let H be the starting index of the i-th segment of the sequence. i Let K be the hash value of the i-th segment. i Add index content (FID, M). Where FID is the data identifier; M is the basic structure. i The set of data synchronization parameters. SIM card settings: data type = 0, data content = K.

[0080] In this embodiment of the application, the SIM card can store data identifiers that do not match the data identifiers in the data list in the data list of the SIM card.

[0081] In this embodiment of the application, the data segment of the data to be synchronized is stored in a second data format according to the second index information and the second hash value, so that in the subsequent process, there is no need to obtain the corresponding data from the server, which improves the data synchronization efficiency and can also reduce data loss and errors during the interaction process.

[0082] In this embodiment, the data type of the data to be synchronized is determined by matching the data identifier of the data to be synchronized with a list in the SIM card. After determining the different types of data, the data to be synchronized is stored according to the corresponding data structure, enabling analysis and processing of the data to be synchronized on the SIM card. Furthermore, the SIM card can flexibly access multiple service platforms, providing a synchronization data relay station with good compatibility and scalability for the service platforms.

[0083] In this embodiment of the application, after storing data according to different data structures, the SIM card can send data with different data structures to the cloud server.

[0084] In some embodiments, in S130, the SIM card can send data with a preset data structure to the cloud server. The preset data structure includes a first data structure and a second data structure. It is understood that before the SIM card sends data to the cloud server, a data transmission channel needs to be established between the SIM card and the cloud server. This data transmission channel can be a BIP transmission channel. In one example, the process of establishing a BIP data channel between the SIM card and the cloud server may include the following steps: First, the SIM card sends a data synchronization response to the service platform. After receiving this response, the service platform notifies the cloud server to initiate a BIP connection request to the SIM card. The cloud server initiates a BIP connection establishment request to the BIP gateway; the BIP gateway platform sends an SMS data message, including the BIP connection establishment request, to the ME; the ME sends a PP-Download command to the SIM card data synchronization applet; the SIM card data synchronization applet parses the SMS data message and interacts with the SSD through corresponding commands, including ConnectionServer.createSCP81Connection() and SCP81Connection.open(); the SSD sends an OPEN-CHANNEL command to the ME, opening the BIP transmission channel from the SIM card to the ME; a TCP connection is established between the ME and the BIP gateway platform; a TLS handshake is completed between the SSD and the BIP gateway platform; the SIM card data synchronization applet interacts with the SSD through the eventObserved() and SCP81Connection.sendData() commands; the SSD sends an HTTPS Request (carrying a task identifier) ​​to the BIP gateway platform. Furthermore, the BIP gateway platform sends a BIP connection establishment request response to the cloud server, completing the establishment of the BIP transmission channel between the BIP gateway platform and the SIM card. Furthermore, the cloud server sends application processing data instructions to the SIM card via the BIP gateway platform, enabling encrypted data transmission from the SIM card to the synchronization server.In one example, the cloud server sends application processing instructions to the BIP gateway platform in the form of a BIP connection notification response. The BIP gateway platform generates corresponding HTTPS format data and sends an HTTP response to the SIM card. The SIM card's SSD uses the SCP81 key to parse the application instructions. The SIM card's SSD and data synchronization applet transmit synchronized data (including parameters such as data type and data content) through instructions such as eventObserved(DataReceived), DataReceived.copyReceivedData(), and SCP81Connection.sendData(). The SIM card encapsulates the synchronized data into an HTTPS request and sends it to the BIP gateway platform, which then transmits it to the cloud server. The cloud server receives the synchronized data and determines whether it has been fully received. If not, it repeats the above steps. Otherwise, the cloud server sends a command to close the BIP channel to the BIP gateway platform, which closes the HTTPS connection with the SIM card. The SIM card sends a CLOSECHANNEL command to close the BIP channel with the ME and closes the TCP connection between the ME and the BIP gateway platform.

[0085] In this embodiment, communication between the SIM card and the cloud server or service platform offers good stability and security. That is, the data transmission channel established between the SIM card and the cloud server / service platform has high stability, thus ensuring relatively stable data transmission between the service platform, SIM card, and cloud server during data synchronization. This guarantees the stability of data synchronization.

[0086] In some embodiments, in S140, the cloud server can receive data with a preset data structure sent by the SIM card and perform data synchronization based on the data with the preset data structure.

[0087] In this embodiment of the application, if the cloud server determines that the data structure of the data is the first structure, it can determine that the data to be synchronized is non-initial data to be synchronized; if the cloud server determines that the data structure of the data to be synchronized is the second structure, it can determine that the data to be synchronized is initial data to be synchronized.

[0088] In this embodiment of the application, the cloud server can synchronize data to be synchronized based on different data types.

[0089] In one example, the cloud server can determine whether the data to be synchronized is of the initial synchronization type based on the data type. If the data is determined to be of the initial synchronization type, the data with data content = K is stored in the server's data system, and the data ID is updated in the list. If the data is determined to be non-initial synchronization type, the corresponding old version data, denoted as data Z, can be found in the cloud server's data system based on the data ID. The data content = E is then checked. i The length of elements in the order (1≤i≤v) is E_i.length. i If length = 1, then Z i Synchronized, determine the next data segment; if E i If length = 4, then Z i The data was not synchronized; the cloud server located the index corresponding to data Z. i index i+1 Position, insert data segment Y i .

[0090] In this embodiment, the SIM card is used as an intermediate carrier for data synchronization, enabling data synchronization to the cloud server without the need for additional application software installation, thus saving storage space on the mobile terminal. Furthermore, different data structures are used to store different types of data, including initial synchronization data and non-initial synchronization data. That is, it is understood that this application can synchronize data for analysis and optimization, thereby improving data transmission efficiency and stability, and reducing data loss and errors during transmission.

[0091] Furthermore, in this embodiment of the application, before receiving the data to be synchronized sent by the service platform, the SIM card can determine whether it meets the data synchronization requirements.

[0092] To ensure that the SIM card can receive the data to be synchronized, as another implementation method of this application, this application also provides another implementation method for data synchronization, as detailed in the following embodiments.

[0093] Figure 3 A flowchart illustrating another data synchronization method provided in one embodiment of this application is shown. Figure 3 As shown, before receiving the data to be synchronized sent by the business platform, the data synchronization method also includes the following steps:

[0094] S150, the SIM card receives the target data parameters corresponding to the data to be synchronized sent by the service platform.

[0095] In this embodiment of the application, the target data parameter may include data volume information corresponding to the data to be synchronized, such as the data size of the data to be synchronized.

[0096] In this embodiment, the target data parameters may further include the application identifier corresponding to the applet. The application identifier (Applet Identity Document, AID) can be used to represent the identity information corresponding to the applet on the SIM card. It is understood that one or more applets can exist in the SIM card, and each applet can perform different functions.

[0097] In this embodiment, the SIM card can receive target data parameters corresponding to the data to be synchronized sent by the service platform through a data transmission channel established with the service platform. It is understood that after the service platform establishes a BIP channel with the SIM, the service platform can send the target data parameters corresponding to the data to be synchronized to the SIM card. These target data parameters enable the SIM to determine whether it can receive the data to be synchronized.

[0098] S160: If the target data parameters meet the SIM card data synchronization requirements, the system receives the data to be synchronized from the service platform. In this embodiment, the SIM card can call the corresponding Applet, such as a data synchronization Applet, based on the application identifier in the target data parameters. The data synchronization Applet then queries the available space on the SIM card. Based on the amount of data in the target data parameters and the available space on the SIM card, the system determines whether the SIM card meets the data synchronization requirements, i.e., whether the SIM card has sufficient space to store the information to be synchronized.

[0099] In one example, the service platform can encapsulate the application identifier corresponding to the SIM card applet for data synchronization, as well as information such as the size of the data to be synchronized, into an Application Protocol Data Unit (APDU) instruction and send it to the SIM card via the BIP channel. The SIM card selects the data synchronization applet based on the AID. The SIM card sends the APDU instruction to the data synchronization applet, which parses the APDU instruction, queries the available space on the SIM card, and determines whether the available space meets the requirements of this data synchronization transmission.

[0100] In this embodiment, if the target data parameters meet the SIM card data synchronization requirements, the SIM card receives the data to be synchronized sent by the service platform. That is, when there is sufficient space on the SIM card, it can receive the data to be synchronized sent by the service platform.

[0101] In this embodiment of the application, the SIM card determines whether it meets the data synchronization requirements by using target data parameters, thereby ensuring that the data to be synchronized can be transmitted when the SIM card meets the data synchronization requirements, and ensuring the integrity of the data transmission process.

[0102] Based on the data synchronization method provided in the above embodiments, this application also provides specific implementations of a data synchronization device. Please refer to the following embodiments.

[0103] First see Figure 4 , Figure 4 This is a schematic diagram of the structure of a file synchronization device provided in another embodiment of this application. The file synchronization device 400 provided in this embodiment of the application includes the following units:

[0104] The first receiving module 401 is used to receive data to be synchronized sent by the business platform.

[0105] Storage module 402 is used to store data according to a preset data structure.

[0106] The sending module 403 is used to send data with a preset data structure to the cloud server so that the cloud server can perform data synchronization based on the data with the preset data structure.

[0107] In one embodiment, the data to be synchronized further includes a data identifier; the preset data structure includes a first data structure and a second data structure; before storing the data according to the preset data structure, the storage module 402 is further configured to: match the data identifier with the data identifiers in a list pre-stored in the SIM card; the storage module 402 stores the data according to the preset data structure in the following manner: if it is determined that the data identifier matches the data identifiers in the list, the data is stored according to the first data structure; if it is determined that the data identifier does not match the data identifiers in the list, the data is stored according to the second data structure.

[0108] In one embodiment, the format of the second data structure includes second index information, a second hash value, and a second target data segment; the storage module 402 stores the data according to the second data structure in the following manner when it is determined that the data identifier does not match the data identifier in the list: the data is divided into n second target data segments; the second index information of each second target data segment and the second hash value corresponding to each second target data segment are determined respectively; the second target data segment, the second hash value, and the second index information are stored.

[0109] In one embodiment, the format of the first data structure includes first index information, a first hash value, and a first target data segment. The storage module 402 stores data according to the first data structure in the following manner when it is determined that the data identifier matches the data identifier in the list: When it is determined that the data identifier matches the data identifier in the list, it obtains the historical stored data corresponding to the data identifier; it determines the offset information between the data corresponding to the data to be synchronized and the historical stored data; based on the offset information, it divides the data corresponding to the data to be synchronized into p first target data segments, and determines the first index information and the first hash value corresponding to each first target data segment, the first index information including start index information and end index information; when it is determined that the data segment does not meet the preset conditions, it stores the first target data segment, the start index information, the end index information, and the first hash value.

[0110] In one embodiment, the storage module 402 is further configured to: store the data identifier in the list if it is determined that the data identifier does not match the data identifier in the list.

[0111] In one embodiment, before receiving the data to be synchronized sent by the service platform, the first receiving module 401 is further configured to: receive the target data parameters corresponding to the data to be synchronized sent by the service platform; determine whether the target data parameters meet the SIM card data synchronization requirements; and receive the data to be synchronized sent by the service platform if the target data parameters meet the SIM card data synchronization requirements.

[0112] Based on the data synchronization method provided in the above embodiments, this application also provides specific implementations of a data synchronization device. Please refer to the following embodiments.

[0113] First see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data synchronization device provided in another embodiment of this application. The data synchronization device 500 provided in this embodiment of the application includes the following units:

[0114] The second receiving module 501 is used to receive data with a preset data structure sent by the SIM card.

[0115] Synchronization module 502 is used to synchronize data based on a preset data structure.

[0116] Figure 6 A schematic diagram of the hardware structure of the data synchronization method provided in an embodiment of this application is shown.

[0117] The data synchronization device may include a processor 601 and a memory 602 storing computer program instructions.

[0118] Specifically, the processor 601 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.

[0119] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 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 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.

[0120] 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.

[0121] The processor 601 implements any of the data synchronization methods described in the above embodiments by reading and executing computer program instructions stored in the memory 602.

[0122] In one example, the data synchronization device may further include a communication interface 603 and a bus 610. Wherein, as... Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.

[0123] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0124] Bus 610 includes hardware, software, or both, that couples components of a device that synchronizes data 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 610 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.

[0125] This data synchronization device can utilize the data synchronization method described in the embodiments of this application for a SIM card, thereby achieving a combination of... Figure 1 , Figure 4 and Figure 5 The methods and apparatus for data synchronization are described.

[0126] Furthermore, in conjunction with the data synchronization methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data synchronization methods in the above embodiments.

[0127] This application also provides a computer program product, including a computer program, which, when executed, implements any of the data synchronization methods described in the above embodiments.

[0128] 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.

[0129] The functional blocks shown in the above block 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.

[0130] 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.

[0131] 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.

[0132] The above are merely specific embodiments 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. A method of data synchronization, characterized by, The method applied to a user identification SIM card comprises: receiving data to be synchronized sent by a service platform; storing the data to be synchronized according to a preset data structure; sending data of the preset data structure to a cloud server for data synchronization based on the data of the preset data structure; the data to be synchronized further comprises data identification; the preset data structure comprises a first data structure and a second data structure; before the storing of the data to be synchronized according to the preset data structure, the method further comprises: matching the data identification with data identification in a list pre-stored in the SIM card; the storing of the data to be synchronized according to the preset data structure comprises: in a case where it is determined that the data identification matches the data identification in the list, storing the data to be synchronized according to the first data structure; in a case where it is determined that the data identification does not match the data identification in the list, storing the data to be synchronized according to the second data structure.

2. The method of claim 1, wherein, the format of the second data structure comprises second index information, a second hash value and a second target data segment; the storing of the data to be synchronized according to the second data structure in the case where it is determined that the data identification does not match the data identification in the list comprises: segmenting the data to be synchronized according to a first preset step to obtain a plurality of second target data segments; determining the second index information of each second target data segment and the second hash value corresponding to each second target data segment respectively; storing the second target data segment, the second hash value and the second index information.

3. The method of claim 1, wherein, the format of the first data structure comprises first index information, a first hash value and a first target data segment; the storing of the data to be synchronized according to the first data structure in the case where it is determined that the data identification matches the data identification in the list comprises: in the case where it is determined that the data identification matches the data identification in the list, obtaining historical stored data corresponding to the data identification; determining offset information between the data to be synchronized and the historical stored data; based on the offset information, segmenting the data to be synchronized into a plurality of first target data segments and determining the first index information and the first hash value corresponding to each first target data segment, the first index information comprising start index information and end index information; in a case where it is determined that the data segment does not satisfy a first preset condition, storing the first target data segment, the start index information, the end index information and the first hash value.

4. The method of claim 3, wherein, the determination of the offset information between the data to be synchronized and the historical stored data comprises: determining first offset information between the data to be synchronized and the historical stored data; segmenting the data to be synchronized according to a second preset step to obtain a plurality of third target data segments; determining one or more offset information corresponding to each third target data segment respectively; accumulating the offset information corresponding to each third target data segment to obtain second offset information; in a case where the first offset information is equal to the second offset information, determining target offset information corresponding to each third target data segment; In a case where a third target data segment corresponding to the target offset information satisfies a second preset condition, the target offset information is taken as offset information between the data to be synchronized and the historical stored data.

5. The method of claim 4, wherein, The first preset condition includes at least one of the following: The data length corresponding to the data segment is the same as the data length corresponding to the historical stored data; or The hash value of the data segment is the same as the hash value of the historical stored data; or The starting index information of the data segment is the same as the index information of the historical stored data.

6. The method of claim 1, wherein, Further comprising: In a case where it is determined that the data identifier does not match the data identifiers in the list, the data identifier is stored in the list.

7. The method of data synchronization according to claim 1, wherein, Before receiving the data to be synchronized sent by the service platform, the method further comprises: Receiving a target data parameter corresponding to the data to be synchronized sent by the service platform; In a case where the target data parameter satisfies the SIM card data synchronization requirement information, receiving the data to be synchronized sent by the service platform.

8. The method of claim 7, wherein, The target data parameter includes a data amount of the data to be synchronized and an application identifier; Before receiving the data to be synchronized sent by the service platform in a case where the target data parameter satisfies the SIM card data synchronization requirement information, the method further comprises: Determining a target application based on the application identifier; Calculating the available space size of the SIM card by using the target application; In a case where it is determined that the data amount of the data to be synchronized is less than or equal to the available space size of the SIM card, it is determined that the target data parameter satisfies the SIM card data synchronization requirement information.

9. A method of data synchronization, the method comprising: Applied to a cloud server, the method comprises: Receiving data in a preset data structure sent by a SIM card; Based on the data in the preset data structure, data synchronization is performed; The data to be synchronized in the SIM card includes a preset data identifier; the preset data structure includes a first data structure and a second data structure; The data in the preset data structure in the SIM card is obtained by matching the data identifier with data identifiers in a list pre-stored in the SIM card; in a case where it is determined that the data identifier matches the data identifiers in the list, the data to be synchronized is stored according to the first data structure; in a case where it is determined that the data identifier does not match the data identifiers in the list, the data to be synchronized is stored according to the second data structure.

Citation Information

Patent Citations

  • Realization method for optimizing file reading / writing speed and frequency of USIM card

    CN105930100A

  • Synchronizing method, device and system for mobile terminal data

    CN106375478A