Method, apparatus and electronic device for data synchronization

By dynamically selecting the optimal storage server from the load balancer to store cloud phone backup data, the problem of insufficient storage server space is solved, achieving efficient data storage and secure transmission.

CN119766826BActive Publication Date: 2025-11-04CHINA MOBILE INTERNET CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411822621.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-11-04
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

As the number of cloud phone users increases, the amount of cloud phone data stored on storage servers also increases, leading to insufficient storage space and performance on some storage servers.

Method used

The load balancing server retrieves preset indicator parameter values ​​from the storage server every first preset period, determines the optimal and worst parameter value sets, calculates performance indicators, selects the target storage server with the best performance to store the cloud phone backup data, and uses encryption methods to ensure data transmission security.

Benefits of technology

By effectively utilizing the storage performance of storage servers, cloud phone backup data is stored in the target storage server with the best performance, improving storage efficiency, and ensuring the security of data transmission and storage through encryption methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766826B_ABST
    Figure CN119766826B_ABST
Patent Text Reader

Abstract

The application discloses a data synchronization method, device and electronic equipment, and is applied to a load balancing server. The method comprises the following steps: acquiring the parameter value of a preset index of each storage server every first preset period; determining the optimal parameter value and the worst parameter value of each preset index according to the parameter value of the preset index of each storage server, and obtaining an optimal parameter value set and a worst parameter value set; for each storage server, calculating a first distance from the optimal parameter value set and a second distance from the worst parameter value set according to the parameter value of the preset index of the storage server; for each storage server, calculating the performance index of the storage server by using the first distance and the second distance corresponding to the storage server; and storing the cloud mobile phone backup data to the target storage server corresponding to the maximum performance index. In this way, the cloud mobile phone backup data can be stored in the target storage server with the optimal storage performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data backup, and particularly relates to a data synchronization method and device and electronic equipment. BACKGROUND

[0002] A cloud phone is an operating system running in a cloud server through virtualization technology. The cloud phone picture is transmitted to a user terminal through video streaming, and the operation triggered by the user terminal is transmitted to the cloud phone in the cloud server, so as to realize real-time remote control of the cloud phone by the user.

[0003] With the wide use of cloud phones, the data security of the cloud phones is increasingly important. To ensure the security of the cloud phone data, the cloud phone data can be backed up in a storage server. In this way, when the local cloud phone data is lost, the cloud phone data in the storage server can be read, so as to ensure that the user can normally use the cloud phone.

[0004] However, with the increase of cloud phone users, the cloud phone data stored in the storage server also increases, resulting in insufficient storage space of some storage servers, and further resulting in insufficient storage performance of the storage server for the cloud phone data. Therefore, it is necessary to reasonably allocate appropriate storage servers for the cloud phone data corresponding to each cloud phone. SUMMARY

[0005] The embodiments of the application provide a data synchronization method, device, equipment, storage medium and program product. The cloud phone backup data can be stored in a target storage server with the best storage performance.

[0006] In a first aspect, the embodiments of the application provide a data synchronization method applied to a load balancing server, and the method comprises the following steps.

[0007] Every first preset period, a parameter value of a preset index of each storage server is obtained;

[0008] According to the parameter value of the preset index of each storage server, an optimal parameter value and a worst parameter value of each preset index are determined, and an optimal parameter value set and a worst parameter value set are obtained;

[0009] For each storage server, a first distance of the parameter value of the preset index of the storage server and the optimal parameter value set, and a second distance of the parameter value of the preset index of the storage server and the worst parameter value set are calculated, the first distance representing a performance gap between the performance of the storage server and the performance corresponding to the optimal parameter value set, and the second distance representing a performance gap between the performance of the storage server and the performance corresponding to the worst parameter value set;

[0010] For each storage server, a performance index of the storage server is calculated by using the first distance and the second distance corresponding to the storage server, and the performance index is used to represent the storage performance of the storage server.

[0011] A target storage server corresponding to the maximum performance index is determined, and the target storage server is used to store backup data of the cloud phone.

[0012] In a possible implementation, the method further includes:

[0013] A decision matrix is constructed according to the parameter values of the preset indexes of each storage server, elements in a same column of the decision matrix are used to represent the parameter values of a same preset index of different storage servers, and elements in a same row of the decision matrix are used to represent the parameter values of different preset indexes of one storage server.

[0014] The optimal parameter value and the worst parameter value are determined for each column element in the decision matrix.

[0015] The optimal parameter value set is constructed by using the optimal parameter values in each column element.

[0016] The worst parameter value set is constructed by using the worst parameter values in each column element.

[0017] In a possible implementation, the method further includes:

[0018] The first distance and the second distance are calculated according to the parameter values of the preset indexes of the storage server and the optimal parameter value set and the worst parameter value set, respectively, according to preset weights corresponding to the preset indexes.

[0019] In a possible implementation, the number of the preset indexes is 3, and the first distance and the second distance are calculated according to the parameter values of the preset indexes of the storage server and the optimal parameter value set and the worst parameter value set, respectively, according to preset weights corresponding to the preset indexes.

[0020] The first distance is calculated according to the following formula:

[0021]

[0022] D i+ represents the first distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j + represents the optimal parameter set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server.

[0023] The second distance is calculated according to the following formula:

[0024]

[0025] wherein, D i - represents the second distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j - represents the worst parameter set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server.

[0026] In a possible implementation, the performance index of each storage server is calculated by using the first distance and the second distance corresponding to the storage server, including:

[0027] The performance index is calculated according to the following formula:

[0028]

[0029] wherein, the D i represents the performance index corresponding to the i-th storage server.

[0030] In a possible implementation, the target storage server is used to store the cloud phone backup data, including:

[0031] The target backup task corresponding to the earliest timestamp is obtained from the backup task sequence.

[0032] The target cloud phone backup data corresponding to the target backup task is obtained.

[0033] The target cloud phone backup data is sent to the target storage server.

[0034] In a possible implementation, before the target backup task corresponding to the earliest timestamp is obtained from the backup task sequence, the method further includes:

[0035] The data backup instruction sent by different cloud phones is received.

[0036] According to the timestamp of the data backup instruction corresponding to each cloud phone, a backup task sequence is constructed.

[0037] In a possible implementation, after the cloud phone backup data is stored in the target storage server, the method further includes:

[0038] Every preset period, it is judged whether the cloud phone backup data is updated;

[0039] In the case that the cloud phone backup data is updated, the updated cloud phone backup data is sent to the target storage server.

[0040] In a possible implementation, the judgment of whether the cloud phone backup data is updated includes:

[0041] Obtaining the to-be-backed-up data of a target cloud phone, the target cloud phone being a cloud phone corresponding to the cloud phone backup data stored in the target storage server;

[0042] According to a preset block rule, the to-be-backed-up data is blocked to obtain a plurality of data blocks and the number of each data block;

[0043] According to the to-be-backed-up data contained in each data block, a first check code corresponding to each data block is calculated by using an information digest algorithm;

[0044] The preset block rule, the number of each data block and the first check code corresponding to each data block are sent to the target storage server, so that the target storage server blocks the cloud phone backup data according to the preset block rule to obtain the data block corresponding to the cloud phone backup data and the number of each data block, and calculates a second check code of the data block corresponding to the cloud phone backup data by using the information digest algorithm, and the difference data block with data update is determined by comparing the first check code and the second check code of the data block with the same number;

[0045] In the case that the number of the difference data block is received, it is determined that the cloud phone backup data is updated;

[0046] The sending of the updated cloud phone backup data to the target storage server includes:

[0047] The number of the difference data block is sent to the target storage server, so that the target storage server updates the cloud phone backup data according to the data block content.

[0048] In a possible implementation, the blocking of the to-be-backed-up data according to the preset block rule to obtain a plurality of data blocks and the number of each data block includes:

[0049] selecting a first number of bytes according to a preset number from a first byte of the data to be backed up;

[0050] determining whether the number of bytes of the first number of bytes is in a preset number of bytes interval;

[0051] in a case where the number of bytes of the first number of bytes is not in the preset number of bytes interval, selecting a second number of bytes according to the preset number;

[0052] in a case where the number of bytes of the second number of bytes and the first number of bytes is in the preset number of bytes interval, taking the first number of bytes and the second number of bytes as a data block;

[0053] allocating a number to the data block.

[0054] In a possible implementation, the storing the cloud phone backup data by using the target storage server comprises:

[0055] receiving the cloud phone backup data;

[0056] generating a first random number;

[0057] generating the public key based on the first random number;

[0058] calculating a product of the public key and a second random number to obtain an elliptic curve point;

[0059] generating an intermediate parameter by using a preset key derivation function, the elliptic curve point and a data length of the cloud phone backup data;

[0060] calculating an exclusive or value of the cloud phone backup data and the intermediate parameter to obtain original encrypted data;

[0061] obtaining a first concatenated value of the elliptic curve point and the cloud phone backup data;

[0062] calculating a hash value of the first concatenated value to obtain an anti-tampering parameter;

[0063] calculating a product of an elliptic curve base point and the first random number to obtain a secret value calculation parameter;

[0064] concatenating the original encrypted data, the anti-tampering parameter and the secret value calculation parameter to obtain the encrypted data.

[0065] sending the encrypted data to the target storage server.

[0066] In a possible implementation, the load balancing server stores a private key corresponding to each cloud phone; after the encrypted data is sent to the target storage server, the method further includes:

[0067] receiving a backup data reading instruction sent by the cloud phone;

[0068] reading the encrypted data from the target storage server;

[0069] calculating a product of the private key and the secret value calculation parameter to obtain the elliptic curve point;

[0070] obtaining the intermediate parameter according to the elliptic curve point and the preset key derivation function;

[0071] calculating an exclusive or value of the original encrypted data and the intermediate parameter to obtain the cloud phone backup data;

[0072] concatenating the cloud phone backup data and the elliptic curve point to obtain a second concatenated value;

[0073] calculating a hash value of the second concatenated value to obtain a target tamper-proof parameter;

[0074] in a case where the target tamper-proof parameter and the tamper-proof parameter are the same, determining that the cloud phone backup data passes verification.

[0075] In a second aspect, an embodiment of the present application provides a data synchronization apparatus applied to a load balancing server, including:

[0076] an obtaining module configured to obtain parameter values of preset indexes of each storage server every first preset period;

[0077] a determining module configured to determine optimal parameter values and worst parameter values of each preset index according to the parameter values of the preset indexes of each storage server, to obtain an optimal parameter value set and a worst parameter value set;

[0078] a calculating module configured to calculate, for each storage server, a first distance of the parameter value of the preset index of the storage server from the optimal parameter value set and a second distance from the worst parameter value set, the first distance representing a performance gap between a performance of the storage server and a performance corresponding to the optimal parameter value set, and the second distance representing a performance gap between the performance of the storage server and a performance corresponding to the worst parameter value set;

[0079] The calculating module is further configured to calculate, for each storage server, a performance index of the storage server by using the first distance and the second distance corresponding to the storage server, the performance index being used to represent a storage performance of the storage server.

[0080] a storage module configured to determine a target storage server corresponding to a maximum performance index, and store the cloud phone backup data by using the target storage server.

[0081] In a third aspect, an electronic device is provided, and the device includes a processor and a memory storing computer program instructions.

[0082] The processor executes the computer program instructions to implement the method for data synchronization according to any one of the first aspect.

[0083] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the method for data synchronization according to any one of the first aspect.

[0084] In a fifth aspect, a computer program product is provided, and instructions in the computer program product are executed by a processor of an electronic device to cause the electronic device to perform the method for data synchronization according to any one of the first aspect.

[0085] A method, apparatus, device, storage medium and program product for data synchronization are provided. A load balancing server can obtain a parameter value of a preset index of each storage server every first preset period, and then determine an optimal parameter value and a worst parameter value of each preset index from the parameter value of the preset index of each storage server, to obtain an optimal parameter value set and a worst parameter value set. The optimal parameter value set can represent the optimal performance of the storage server, and the worst parameter value set can represent the worst performance of the storage server. Thus, a first distance of the optimal parameter value set and a second distance of the worst parameter value set are calculated from the parameter value of the preset index of each storage server, where the first distance can represent the performance gap between each storage server and the optimal performance, and the second distance can represent the performance gap between each storage server and the worst performance. Then, a performance index corresponding to each storage server can be calculated by using the first distance and the second distance. Thus, a maximum performance index is determined from the performance index corresponding to each storage server, to determine a target storage server corresponding to the maximum performance index, so that the target storage server with the best performance in the current storage server can be obtained, and the cloud phone backup data can be stored by using the target storage server, to ensure the storage performance of the storage server for the cloud phone backup data. BRIEF DESCRIPTION OF DRAWINGS

[0086] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without creative effort.

[0087] Figure 1 is a flow diagram of a data synchronization method provided by an embodiment of the present application;

[0088] Figure 2 is a flow diagram of a method for determining an optimal parameter set and a worst parameter set provided by an embodiment of the present application;

[0089] Figure 3 is a flow diagram of a data encryption method provided by an embodiment of the present application;

[0090] Figure 4 is a flow diagram of another data encryption method provided by an embodiment of the present application;

[0091] Figure 5 is a flow diagram of a data decryption method provided by an embodiment of the present application;

[0092] Figure 6 is a flow diagram of another data decryption method provided by an embodiment of the present application;

[0093] Figure 7 is a flow diagram of an incremental updating method provided by an embodiment of the present application;

[0094] Figure 8 is a structural diagram of a data synchronization device provided by an embodiment of the present application;

[0095] Figure 9 is a structural diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0096] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear. The following will further describe the present application in detail with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0097] It should be noted that, in the present document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0098] To solve the problems in the prior art, the embodiment of the present application provides a component selection method, device, equipment, storage medium and program product. First, the parameter values of preset indexes of each storage server are obtained based on the load balancing server and the distributed server architecture. Figure 1 A data synchronization method provided by the embodiment of the present application is introduced. The method is applied to a load balancing server, for example, as shown in the following figure. Figure 1 The method comprises the following steps.

[0099] S101, every first preset period, the parameter value of the preset index of each storage server is obtained.

[0100] In the distributed server architecture, the parameter value of the preset index of each storage server is obtained by the load balancing server, so that the storage performance of each storage server is determined according to the parameter value of the preset index of each storage server, and then the backup task of the cloud phone backup data is allocated to the storage server with the optimal storage performance for data backup.

[0101] The preset index is set in advance according to experience. Specifically, the preset index can be space usage rate, unit storage speed and remaining space amount. It should be noted that the preset index is not limited in the embodiment of the present application.

[0102] S102, according to the parameter value of the preset index of each storage server, the optimal parameter value and the worst parameter value of each preset index are determined, and the optimal parameter value set and the worst parameter value set are obtained.

[0103] The method for measuring the parameter value is different for different preset indexes. For example, for the space usage rate, the smaller the parameter value of the space usage rate, the better the performance of the storage server; for the unit storage speed, the larger the parameter value of the unit storage speed, the better the performance of the storage server; and for the remaining space amount, the larger the parameter value of the remaining space amount, the better the performance of the storage server. Therefore, the optimal parameter value and the worst parameter value are determined according to the method for measuring the performance for each preset index.

[0104] It can be understood that the optimal parameter value set includes the optimal parameter value corresponding to each preset index, and the optimal parameter value set can represent the optimal storage performance provided by the distributed server architecture. Correspondingly, the worst parameter value set includes the worst parameter value corresponding to each preset index, and the worst parameter value set can represent the worst storage performance provided by the distributed server architecture.

[0105] S103, for each storage server, a first distance from the optimal parameter value set and a second distance from the worst parameter value set are calculated according to the parameter value of the preset index of the storage server.

[0106] The first distance represents the performance gap between the performance of the storage server and the performance corresponding to the optimal parameter value set, and the second distance represents the performance gap between the performance of the storage server and the performance corresponding to the worst parameter value set.

[0107] S104, for each storage server, a performance index of the storage server is calculated by using the first distance and the second distance corresponding to the storage server.

[0108] It can be understood that based on the first distance and the second distance, the performance gap between each storage server and the optimal performance and the worst performance can be determined. Therefore, based on the first distance and the second distance corresponding to each storage server, the storage performance corresponding to each storage server can be measured, and thus the target storage server with the optimal current storage performance can be determined.

[0109] S105, the target storage server corresponding to the maximum performance index is determined, and the target storage server is used to store the backup data of the cloud phone.

[0110] In an implementation manner, the backup data region of the cloud phone can be set in advance. The data in the backup data region is the backup data of the cloud phone, and the backup data region can be a storage space.

[0111] Specifically, for the data in the cloud phone, the target application to be backed up is set according to the actual demand in advance, and the cloud phone stores the data generated by the current operation into the storage space corresponding to the backup data area after detecting the user operation on the target application. Further, the load balancing server obtains the cloud phone backup data from the storage space corresponding to the backup data area, and stores the cloud phone backup data into the target storage server.

[0112] In another implementation manner, the cloud phone backup data can be full data of the cloud phone.

[0113] By using the above method, the load balancing server can obtain the parameter values of the preset indexes of each storage server every first preset period, and then determine the optimal parameter value and the worst parameter value of each preset index from the parameter values of the preset indexes of each storage server, to obtain the optimal parameter value set and the worst parameter value set. The optimal parameter value set can represent the optimal performance of the storage server, and the worst parameter value set can represent the worst performance of the storage server. In this way, the first distance of each storage server from the optimal parameter value set and the second distance of each storage server from the worst parameter value set are calculated by using the parameter values of the preset indexes of each storage server, wherein the first distance can represent the performance gap between each storage server and the optimal performance, and the second distance can represent the performance gap between each storage server and the worst performance. Then, the performance index corresponding to each storage server can be calculated by using the first distance and the second distance. In this way, the maximum performance index is determined from the performance index corresponding to each storage server, so as to determine the target storage server corresponding to the maximum performance index, and the target storage server with the best performance in the current storage server can be obtained, and the cloud phone backup data can be stored in the target storage server, so as to ensure the storage performance of the storage server for the cloud phone backup data.

[0114] The following will be described in combination with Figure 2 introduce how to determine the optimal parameter value set and the worst parameter value set, such as Figure 2 As shown in S102, the optimal parameter value and the worst parameter value of each preset index are determined according to the parameter values of the preset indexes of each storage server, and the optimal parameter value set and the worst parameter value set are obtained, which can be specifically implemented as follows:

[0115] S201, a decision matrix is constructed according to the parameter values of the preset indexes of each storage server.

[0116] Among them, the elements in the same column in the decision matrix are used to represent the parameter values of the same preset index of different storage servers, and the elements in the same row in the decision matrix are used to represent the parameter values of different preset indexes of one storage server.

[0117] In one example, the preset indexes are space usage rate, unit storage speed and remaining space amount, and the constructed decision matrix is:

[0118]

[0119] wherein, m ij represents the parameter value of the jth preset index of the ith server.

[0120] Further, the above decision matrix is normalized to obtain a normalized decision matrix:

[0121]

[0122] wherein, m i ′ j represents the element after normalization of the parameter value of the jth preset index of the ith server.

[0123] S202, for each column element in the decision matrix, determining the optimal parameter value and the worst parameter value.

[0124] S203, constructing an optimal parameter value set using the optimal parameter value in each column element.

[0125] S204, constructing a worst parameter value set using the worst parameter value in each column element.

[0126] Specifically, continuing the above example, based on the above normalized decision matrix, the optimal parameter value set can be constructed as:

[0127] M+=max(M1 ′ ,M2 ′ ,M3 ′ )

[0128] The worst parameter value set is constructed as:

[0129] M-=min(M1 ′ ,M2 ′ ,M3 ′ )

[0130] By using the method provided in the present application, after obtaining the parameter values of the preset indexes of the storage server, a decision matrix can be constructed. In this way, the optimal parameter value and the worst parameter value in each column element can be quickly and intuitively found, so as to construct the optimal parameter value set and the worst parameter value set.

[0131] On the basis of the above constructing the optimal parameter value set and the worst parameter value set, the S103, for each storage server, according to the parameter value of the preset index of the storage server, the first distance of the parameter value calculation and the optimal parameter value set, and the second distance of the worst parameter value set, can be specifically implemented as:

[0132] According to the preset weight corresponding to the preset index, the first distance of the parameter value calculation and the optimal parameter value set, and the second distance of the worst parameter value set of the preset index of the storage server are calculated.

[0133] It can be understood that in the scene of data backup, because the influence of each preset index on the storage performance of the storage server is different in the preset index of the storage server, therefore, the first distance and the second distance can be calculated according to the preset weight corresponding to the preset index. The first distance and the second distance corresponding to each storage server can be accurately obtained, thereby improving the accuracy of the performance index calculated subsequently.

[0134] Specifically, the first distance can be calculated according to the following formula:

[0135]

[0136] Wherein, D i + represents the first distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j + represents the optimal parameter set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server.

[0137] The second distance can be calculated according to the following formula:

[0138]

[0139] Wherein, D i - represents the second distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j - represents the worst parameter set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server.

[0140] In some embodiments of the present application, on the basis of the above calculating the first distance and the second distance corresponding to the storage server, the performance index can be calculated according to the following formula:

[0141]

[0142] D i = D i - D i - 1 i represents the performance index corresponding to the i th storage server.

[0143] Thus, on the basis of calculating the performance index, the load balancing server determines the target storage server according to the performance index, the load balancing server obtains the target backup task corresponding to the earliest timestamp from the backup task sequence; obtains the target cloud mobile phone backup data corresponding to the target backup task; and stores the target cloud mobile phone backup data to the target storage server.

[0144] It should be noted that before obtaining the target cloud mobile phone backup data, the load balancing server can receive data backup instructions sent by different cloud mobile phones, and then construct a backup task sequence according to the timestamp of each cloud mobile phone corresponding to the data backup instruction.

[0145] It can be understood that the cloud mobile phone server can provide services for multiple cloud mobile phones, and different cloud mobile phones can send data backup instructions to the load balancing server when different users use the cloud mobile phones. The load balancing server records the timestamp of each cloud mobile phone corresponding to the data backup instruction according to the time difference of the received data backup instruction, and records the timestamp of each cloud mobile phone corresponding to the data backup instruction according to the time difference of the received data backup instruction, thereby constructing a backup task sequence.

[0146] Thus, the load balancing server can construct a backup task sequence according to the timestamp of each data backup instruction after receiving the data backup instruction sent by each cloud mobile phone, thereby obtaining cloud mobile phone backup data according to the order of each cloud mobile phone corresponding to the data backup instruction, and ensuring that each cloud mobile phone can perform data backup in order.

[0147] In some embodiments of the present application, when the cloud mobile phone sends the cloud mobile phone backup data to the storage server, in order to ensure the security of data transmission, the cloud mobile phone can encrypt the cloud mobile phone backup data, such as Figure 3 As shown in the specific data encryption process:

[0148] S301, receiving cloud mobile phone backup data.

[0149] S302, encrypting the cloud mobile phone backup data using the public key to obtain encrypted data.

[0150] The load balancing server can generate a key pair for each cloud mobile phone, the key pair including a private key and a public key, the public key being used to encrypt the cloud mobile phone backup data, and the private key being used by the load balancing server to decrypt the encrypted data after reading the encrypted data in the storage server to obtain the data plaintext.

[0151] S303, sending the encrypted data to the target storage server.

[0152] Thus, the original cloud phone backup data is encrypted by the pre-generated public key, ensuring the security of the transmission process.

[0153] The following will be described in detail Figure 4 The detailed process of encrypting the cloud phone backup data is as follows, as shown in Figure 4 The process of encrypting the cloud phone backup data is as follows:

[0154] S401, generating a first random number.

[0155] The load balancing server can use a random number generator to generate the first random number.

[0156] S402, generating a public key based on the first random number.

[0157] S403, calculating the product of the public key and the second random number to obtain an elliptic curve point.

[0158] Specifically, the load balancing server takes the first random number as a private key, calculates the product of the private key and the base point of the elliptic curve, and obtains the public key corresponding to the cloud phone. The base point of the elliptic curve is pre-set. Then, the product of the second random number and the public key is calculated to obtain an elliptic curve point.

[0159] S404, generating an intermediate parameter using a preset key derivation function, an elliptic curve point, and the data length of the cloud phone backup data.

[0160] The method of calculating the intermediate parameter is as follows: e=KDF(x1||y1, len), where e represents the intermediate parameter, KDF represents the preset key derivation function, and len represents the data length value of the cloud phone backup data. x1||y1 represents the concatenation of the horizontal coordinate and the vertical coordinate of the elliptic curve point.

[0161] S405, calculating the exclusive OR value of the cloud phone backup data and the intermediate parameter to obtain the original encrypted data.

[0162] S406, obtaining the first concatenated value of the elliptic curve point and the cloud phone backup data.

[0163] S407, calculating the hash value of the first concatenated value to obtain a tamper-proof parameter.

[0164] Specifically, the tamper-proof parameter can be calculated by the following formula:

[0165] C2=Hash(x1||C0||y1)

[0166] Where C2 represents the tamper-proof parameter, x1 represents the horizontal coordinate of the elliptic curve point, y1 represents the vertical coordinate of the elliptic curve point, and C0 represents the cloud phone backup data.

[0167] S408, calculate the product of the elliptic curve base point and the second random number to obtain a secret value calculation parameter.

[0168] S409, concatenate the original encrypted data, the tamper-proof parameter and the secret value calculation parameter to obtain encrypted data.

[0169] By using the method provided in the embodiments of the present application, the elliptic curve point is generated by the first random number generated randomly, and then the intermediate parameter is generated by using the preset key derivation function, the elliptic curve point and the data length of the cloud mobile phone backup data. The intermediate parameter can be used to encrypt the cloud mobile phone backup data to obtain the original encrypted data, and then the secret value calculation parameter and the tamper-proof parameter are generated. The secret value calculation parameter and the tamper-proof parameter are concatenated with the original encrypted data and stored in the target storage server. In this way, after the encrypted data is decrypted by the subsequent load balancing server, the tamper-proof parameter can be used to determine whether the data in the target storage server is illegally tampered with, thereby ensuring the data storage security and the data transmission security.

[0170] Correspondingly, after the cloud mobile phone backup data is stored in the target storage server, the cloud mobile phone can read the cloud mobile phone backup data through the load balancing server. Specifically, as shown in Figure 5 illustrated, after S303, the encrypted data is sent to the target storage server, the method further includes:

[0171] S501, receiving the backup data reading instruction sent by the cloud mobile phone.

[0172] The cloud mobile phone identifier is carried in the backup data reading instruction, and the target storage server can find the corresponding encrypted data according to the cloud mobile phone identifier.

[0173] S502, reading the encrypted data from the target storage server.

[0174] S503, decrypting the encrypted data by using the private key corresponding to the cloud mobile phone to obtain the cloud mobile phone backup data.

[0175] The process of decrypting the encrypted data by the load balancing server will be introduced below. Figure 6 As shown in Figure 6 , the decryption process is as follows:

[0176] S5031, calculating the product of the private key and the secret value calculation parameter to obtain an elliptic curve point.

[0177] S5032, obtaining the intermediate parameter according to the elliptic curve point and the preset key derivation function.

[0178] Wherein, on the basis of calculating the elliptic curve point, according to the data length of the cloud mobile phone backup data, the intermediate parameter e = KDF (x1||y1, len) is calculated.

[0179] Wherein, e represents the intermediate parameter, KDF represents the preset key derivation function, x1 represents the abscissa of the elliptic curve point, and y1 represents the ordinate of the elliptic curve point.

[0180] S5033, XOR value of the original encrypted data and the intermediate parameter is calculated to obtain the cloud mobile phone backup data.

[0181] The load balancing server obtains the target anti-tamper parameter corresponding to the decrypted data according to the formula The load balancing server obtains the target anti-tamper parameter corresponding to the decrypted data according to the formula

[0182] S5034, the cloud mobile phone backup data and the elliptic curve point are concatenated to obtain a second concatenated value.

[0183] S5035, the hash value of the second concatenated value is calculated to obtain the target anti-tamper parameter.

[0184] S5036, in the case that the target anti-tamper parameter and the anti-tamper parameter are the same, it is determined that the cloud mobile phone backup data passes the verification.

[0185] Wherein, the load balancing server obtains the target anti-tamper parameter value corresponding to the decrypted data, and judges whether the target anti-tamper parameter and the anti-tamper parameter corresponding to the cloud mobile phone are the same. In the case that the target anti-tamper parameter and the anti-tamper parameter are the same, it is indicated that the cloud mobile phone backup data has not been tampered with. In the case that the target anti-tamper parameter and the anti-tamper parameter are different, it is indicated that the backup data of the cloud mobile phone has been tampered with, and the load balancing server issues an abnormal warning.

[0186] The method provided by the embodiment of the application is adopted, the private key corresponding to each cloud mobile phone is stored in the load balancing server, the product of the private key and the secret value is calculated to obtain the elliptic curve point, and then the intermediate parameter is calculated according to the preset key derivation function, and the cloud mobile phone backup data is calculated by using the intermediate parameter. In order to further ensure the data security, the hash value of the second concatenated value of the cloud mobile phone backup data and the elliptic curve point is calculated to obtain the target anti-tamper parameter, and by comparing the target anti-tamper parameter and the anti-tamper parameter in the encrypted data, it can be judged whether the cloud mobile phone backup data is illegally tampered with. In the case that the target anti-tamper parameter and the anti-tamper parameter are the same, it is determined that the cloud mobile phone backup data passes the verification, and no illegal tampering occurs, which ensures the data security.

[0187] After the target storage server stores the full data of the cloud phone, the load balancing server can also periodically monitor whether the cloud phone backup data in the target storage server is modified, and if modified, incrementally update the cloud phone backup data in the target storage server. Based on this, as shown in the method described above, after the cloud phone backup data is stored by the target storage server, the method further includes: Figure 7

[0188] S701, every second preset period, determine whether the cloud phone backup data is updated.

[0189] S702, in the case of cloud phone backup data sending update, send the updated cloud phone backup data to the target storage server.

[0190] The method provided by the embodiment of the application, since the target storage server stores the full cloud phone backup data of the cloud phone, the load balancing server can detect the cloud phone backup data every second preset period to determine whether the cloud phone backup data is updated, so that in the case of cloud phone backup data update, the updated cloud phone backup data is sent to the target storage server. In this way, the backup frequency of the cloud phone backup data in the target storage server is reduced, and the workload of the load balancing server is reduced. And the cloud phone backup data is detected every preset period, and in the case of cloud phone backup data update, the cloud phone backup data in the target storage server can be updated in time.

[0191] For determining whether the cloud phone backup data is updated in S701, it can be specifically implemented as:

[0192] Step 1, obtain the to-be-backed-up data of the target cloud phone.

[0193] Wherein, the target cloud phone is the cloud phone corresponding to the cloud phone backup data stored in the target storage server.

[0194] Wherein, the load balancing server stores the correspondence between the storage server and the cloud phone identifier, and the storage server stores the correspondence between the cloud phone identifier and the cloud phone backup data.

[0195] Step 2, block the to-be-backed-up data according to a preset blocking rule to obtain a plurality of data blocks and the number of each data block.

[0196] Wherein, the load balancing server numbers each data block according to the order of blocking after blocking the to-be-backed-up data.

[0197] Step 3, according to the to-be-backed-up data contained in each data block, a first check code corresponding to each data block is calculated by using an information digest algorithm. ​

[0198] Specifically, the load balancing server calculates the first check code of the to-be-backed-up data in the data block by using the information digest algorithm.

[0199] Step 4, the preset block rule, the number of each data block and the first check code corresponding to each data block are sent to the target storage server, so that the target storage server divides the cloud phone backup data according to the preset block rule to obtain the data block corresponding to the cloud phone backup data and the number of each data block, and calculates the second check code of the data block corresponding to the cloud phone backup data by using the information digest algorithm, and determines the difference data block that has data update by comparing the first check code and the second check code of the data block with the same number.

[0200] It can be understood that the target storage server can divide the encrypted cloud phone backup data according to the preset block rule after receiving the preset block rule. Since the preset block rule in the target storage server is the same as the preset block rule in the load balancing server, the data length contained in the obtained data block is the same, and the number of the data block is the same. In the case of calculating the second check code, the first check code and the second check code corresponding to the same number are compared. Since the first check code and the second check code are both calculated by using the information digest algorithm on the data in the data block, if the data content of the data block with the same number is the same, the first check code and the second check code are the same. If the data content of the data block with the same number is different, the first check code and the second check code are different. Therefore, the target storage server can determine the data block that has data update, and returns the number of the data block that has data update to the load balancing server.

[0201] Step 5, in the case of receiving the number of the difference data block, it is determined that the cloud phone backup data has update.

[0202] Correspondingly, the updated cloud phone backup data is sent to the target storage server, including:

[0203] The data block content corresponding to the number of the difference data block is sent to the target storage server, so that the target storage server updates the cloud phone backup data according to the data block content.

[0204] After the load balancing server divides the data to be backed up into blocks and calculates the first check code, the method provided in the embodiment of the present application sends the preset block rule, the first check code and the number of the data block to the target storage server. Since the preset block rule in the target storage server is the same as the preset block rule in the load balancing server, the data length contained in the data block is the same, and the number of the data block is the same. In the case of calculating the second check code, the first check code and the second check code corresponding to the same number are compared. Since the first check code and the second check code are both calculated by using the information digest algorithm on the data in the data block, if the data content of the data block with the same number is the same, the first check code and the second check code are the same. If the data content of the data block with the same number is different, the first check code and the second check code are different. Therefore, the target storage server can determine the data block in which the data is updated, and returns the number of the data block in which the data is updated to the load balancing server. In this way, when the load balancing server receives the number of the difference data block, it indicates that the backup data of the cloud mobile phone is updated, so that the updated data is sent to the target storage server, avoiding the load balancing server transmitting the full amount of data of the cloud mobile phone, reducing the data transmission amount, and thereby improving the data synchronization efficiency.

[0205] It should be noted that, in the process of detecting the cloud mobile phone backup data by the load balancing server according to the preset period to determine whether the data is updated, if it is detected that new data appears in the data to be backed up in the cloud mobile phone, the new data is fully synchronized to the target storage server.

[0206] Specifically, for the above step 2, the data to be backed up is divided into blocks according to the preset block rule, and the number of each data block is obtained, which can be implemented as follows:

[0207] Step A, starting from the first byte of the data to be backed up, a first number of bytes are selected according to a preset number.

[0208] Step B, it is judged whether the number of the first number of bytes is in a preset byte number interval.

[0209] The preset number and the preset byte number interval are set according to experience.

[0210] Step C, in the case where the number of the first number of bytes is not in the preset byte number interval, a second number of bytes are selected according to the preset number.

[0211] It can be understood that, in the case where the number of the first number of bytes is less than the minimum value of the preset byte interval, the number of the first number of bytes is small, and the corresponding data block is small.

[0212] Step D, in case that the byte number of the second number of bytes and the first number of bytes is in the preset byte number interval, taking the first number of bytes and the second number of bytes as the data block.

[0213] The load balancing server can select the second number of bytes for a preset number of times until the total number of selected bytes is in the preset byte number interval.

[0214] It can be understood that, in case that the byte number of the second number of bytes and the first number of bytes is in the preset byte number interval, it indicates that the byte length of the second number of bytes and the first number of bytes is moderate, and can be divided into data blocks.

[0215] Specifically, the second number of bytes and the first number of bytes are taken as the division point to obtain the data block.

[0216] Step E, assigning a number to the data block.

[0217] Specifically, the load balancing server assigns a number to the data block according to the order of obtaining the data block.

[0218] In one example, the preset byte interval can be a fixed length window, and the fixed length window includes a number of bytes in the interval range of the preset minimum value and the preset maximum value. The byte length of the preset sliding window is a preset number, and then the load balancing server starts from the first byte of the data to be backed up, selects bytes according to the preset sliding window, slides a preset sliding window length each time, and then judges whether the number of selected bytes is in the byte length range of the fixed length window after each sliding.

[0219] By using the method provided in the embodiments of the present application, the data to be backed up is divided into blocks according to a preset number, and the range of the number of bytes contained in the data block is limited, which can avoid that the data block data is too long. Moreover, by using the preset byte number interval, the length of the data block data can also be avoided to be too short, thereby ensuring the effectiveness of the data block.

[0220] Based on the same idea, the embodiments of the present application provide a data synchronization device applied to a load balancing server, as shown in Figure 8 The device comprises:

[0221] The obtaining module 801 is configured to obtain the parameter value of the preset index of each storage server every first preset period.

[0222] The determining module 802 is configured to determine the optimal parameter value and the worst parameter value of each preset index according to the parameter value of the preset index of each storage server, and obtain the optimal parameter value set and the worst parameter value set.

[0223] The computing module 803 is configured to calculate, for each storage server, a first distance between a parameter value of a preset index of the storage server and a set of optimal parameter values, and a second distance between the parameter value of the preset index of the storage server and a set of worst parameter values, the first distance representing a performance gap between a performance of the storage server and a performance corresponding to the set of optimal parameter values, and the second distance representing a performance gap between the performance of the storage server and a performance corresponding to the set of worst parameter values.

[0224] The computing module 803 is further configured to calculate, for each storage server, a performance index of the storage server by using the first distance and the second distance corresponding to the storage server, the performance index being used to represent a storage performance of the storage server.

[0225] The storage module 804 is configured to determine a target storage server corresponding to a maximum performance index, and store backup data of the cloud mobile phone by using the target storage server.

[0226] In a possible implementation, the computing module 803 is specifically configured to:

[0227] construct a decision matrix according to the parameter values of the preset index of each storage server, elements in a same column in the decision matrix being used to represent the parameter values of the same preset index of different storage servers, and elements in a same row in the decision matrix being used to represent the parameter values of different preset indexes of one storage server;

[0228] determine, for each column element in the decision matrix, an optimal parameter value and a worst parameter value;

[0229] construct the set of optimal parameter values by using the optimal parameter value in each column element;

[0230] construct the set of worst parameter values by using the worst parameter value in each column element.

[0231] In a possible implementation, the computing module 803 is specifically configured to:

[0232] calculate the first distance between the parameter value of the preset index of the storage server and the set of optimal parameter values, and the second distance between the parameter value of the preset index of the storage server and the set of worst parameter values according to a preset weight corresponding to the preset index.

[0233] In a possible implementation, the number of preset indexes is 3; and the computing module 803 is specifically configured to:

[0234] calculate the first distance according to the following formula:

[0235]

[0236] wherein, D i + represents the first distance corresponding to the i th storage server, w jdenotes a preset weight corresponding to the jth preset index, M j denotes an optimal parameter set, m i ′ j denotes a parameter value of the preset index corresponding to the ith storage server.

[0237] The second distance is calculated according to the following formula:

[0238]

[0239] wherein D i denotes the second distance corresponding to the ith storage server, w j denotes a preset weight corresponding to the jth preset index, M j denotes a worst parameter set, m i ′ j denotes a parameter value of the preset index corresponding to the ith storage server.

[0240] In a possible implementation, the computing module 803 is further configured to:

[0241] The performance index is calculated according to the following formula:

[0242]

[0243] wherein D i denotes the performance index corresponding to the ith storage server.

[0244] In a possible implementation, the storage module 804 is specifically configured to:

[0245] obtain a target backup task corresponding to an earliest timestamp from the backup task sequence;

[0246] obtain target cloud phone backup data corresponding to the target backup task;

[0247] send the target cloud phone backup data to the target storage server.

[0248] In a possible implementation, the storage module 804 is specifically configured to

[0249] receive data backup instructions sent by different cloud phones before obtaining a target backup task corresponding to an earliest timestamp from the backup task sequence;

[0250] construct a backup task sequence according to timestamps of the data backup instructions corresponding to each cloud phone.

[0251] In a possible implementation, the apparatus further includes:

[0252] The judging module is configured to judge whether the cloud phone backup data is updated every second preset period.

[0253] The sending module is configured to send the updated cloud phone backup data to the target storage server in the case that the cloud phone backup data is updated.

[0254] In a possible implementation, the judging module is specifically configured to:

[0255] obtain the to-be-backed-up data of the target cloud phone, the target cloud phone being a cloud phone corresponding to the cloud phone backup data stored in the target storage server;

[0256] perform block division on the to-be-backed-up data according to a preset block division rule to obtain a plurality of data blocks and a number of each data block;

[0257] calculate a first check code corresponding to each data block by using an information digest algorithm according to the to-be-backed-up data contained in each data block;

[0258] send the preset block division rule, the number of each data block and the first check code corresponding to each data block to the target storage server, so that the target storage server performs block division on the cloud phone backup data by using the preset block division rule to obtain the data blocks corresponding to the cloud phone backup data and the number of each data block, and calculates a second check code of the data blocks corresponding to the cloud phone backup data by using the information digest algorithm, and determines the difference data blocks in which data is updated by comparing the first check code and the second check code of the data blocks with the same number;

[0259] determine that the cloud phone backup data is updated in the case that the number of the difference data blocks is received;

[0260] The sending module is specifically configured to:

[0261] send the data block content corresponding to the number of the difference data blocks to the target storage server, so that the target storage server updates the cloud phone backup data according to the data block content.

[0262] In a possible implementation, the block division on the to-be-backed-up data according to the preset block division rule to obtain a plurality of data blocks and a number of each data block comprises:

[0263] select a first number of bytes from a first byte of the to-be-backed-up data according to a preset number;

[0264] determine whether the number of the first number of bytes is in a preset byte number interval;

[0265] select a second number of bytes according to the preset number in the case that the number of the first number of bytes is not in the preset byte number interval;

[0266] in a case where the byte number of the first number of bytes and the second number of bytes are in the preset byte number interval, taking the first number of bytes and the second number of bytes as a data block;

[0267] allocating a number for the data block.

[0268] In a possible implementation, the storage module 804, in particular, is configured to:

[0269] receive the cloud phone backup data;

[0270] generate a first random number;

[0271] generate the public key based on the first random number;

[0272] calculate a product of the public key and a second random number to obtain an elliptic curve point;

[0273] generate an intermediate parameter by using a preset key derivation function, the elliptic curve point, and a data length of the cloud phone backup data;

[0274] calculate an exclusive or value of the cloud phone backup data and the intermediate parameter to obtain original encrypted data;

[0275] obtain a first concatenation value of the elliptic curve point and the cloud phone backup data;

[0276] calculate a hash value of the first concatenation value to obtain an anti-tampering parameter;

[0277] calculate a product of an elliptic curve base point and the first random number to obtain a secret value calculation parameter;

[0278] concatenate the original encrypted data, the anti-tampering parameter, and the secret value calculation parameter to obtain the encrypted data.

[0279] send the encrypted data to the target storage server.

[0280] In a possible implementation, the load balancing server stores a private key corresponding to each cloud phone; the apparatus:

[0281] The receiving module is configured to receive a backup data reading instruction sent by the cloud phone;

[0282] The reading module is configured to read the encrypted data from the target storage server;

[0283] The calculation module 803 is further configured to calculate a product of the private key and the secret value calculation parameter to obtain the elliptic curve point;

[0284] The obtaining module 801 is configured to obtain the intermediate parameter according to the elliptic curve point and the preset key derivation function.

[0285] The computing module 803 is further configured to calculate an exclusive OR value of the original encrypted data and the intermediate parameter to obtain the cloud mobile phone backup data.

[0286] The concatenating module is configured to concatenate the cloud mobile phone backup data and the elliptic curve point to obtain a second concatenated value.

[0287] The computing module 803 is further configured to calculate a hash value of the second concatenated value to obtain a target tamper-proof parameter.

[0288] The verifying module is configured to determine that the cloud mobile phone backup data passes verification in a case where the target tamper-proof parameter and the tamper-proof parameter are the same.

[0289] It should be noted that the device for file access is a device corresponding to the method for file access described above, and all implementation manners in the method embodiments are applicable to the device embodiments, and the same technical effects can be achieved.

[0290] Figure 9 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.

[0291] The electronic device can include a processor 901 and a memory 902 having computer program instructions stored therein.

[0292] Specifically, the processor 901 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement one or more embodiments of the present application.

[0293] The memory 902 can include a mass storage for data or instructions. By way of example and not limitation, the memory 902 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 902 can include removable or non-removable (or fixed) media. Where appropriate, the memory 902 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 902 is a non-volatile solid-state memory.

[0294] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums devices, optical storage mediums devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage mediums (e.g., a memory device) encoded with software that, when executed (e.g., by one or more processors), is operable to perform the operations described with reference to the methods according to an aspect of the present disclosure.

[0295] The processor 901 implements the method of any one of the above-described embodiments by reading and executing computer program instructions stored in the memory 902.

[0296] In one example, the electronic device can further include a communication interface 903 and a bus 904. As shown, the processor 901, the memory 902, and the communication interface 903 are connected through the bus 904 and complete communication therebetween. Figure 9

[0297] The communication interface 903 is mainly used to realize the communication between the modules, devices, units, and / or equipment in the embodiments of the present application.

[0298] The bus 904 includes hardware, software, or both, that couples components of the electronic device to each other. By way of example, and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel 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 another suitable bus or a combination of two or more of these. Where appropriate, the bus 904 can include one or more buses. Although the present application describes and illustrates a particular bus, the present application contemplates any suitable bus or interconnect.

[0299] In addition, in combination with the method of data synchronization in the above-described embodiments, the embodiments of the present application can provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement the method of data synchronization in any one of the above-described embodiments.

[0300] ​In combination with the method for data synchronization in the above embodiments, the embodiments of the present application can provide a computer program product, instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform any one of the methods for data synchronization in the above embodiments.

[0301] It should be noted that the present application is not limited to the specific configurations and processes described above and illustrated in the drawings. For the sake of brevity, detailed descriptions of known methods are omitted. In the above embodiments, several specific steps are described and illustrated as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and one skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.

[0302] The functional blocks shown in the structural block diagrams described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of the machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.

[0303] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present 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 an order different from the embodiments, or several steps can be performed simultaneously.

[0304] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0305] The above description is only specific embodiments of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.

Claims

1. A method of data synchronization, characterized by, The method is applied to a load balancing server, and comprises the following steps: Every first preset period, a parameter value of a preset index of each storage server is acquired; According to the parameter value of the preset index of each storage server, an optimal parameter value and a worst parameter value of each preset index are determined, and an optimal parameter value set and a worst parameter value set are obtained; For each storage server, a first distance between the parameter value of the preset index of the storage server and the optimal parameter value set and a second distance between the parameter value of the preset index of the storage server and the worst parameter value set are calculated, the first distance representing a performance gap between the performance of the storage server and the performance corresponding to the optimal parameter value set, and the second distance representing a performance gap between the performance of the storage server and the performance corresponding to the worst parameter value set; For each storage server, a performance index of the storage server is calculated by using the first distance and the second distance corresponding to the storage server, and the performance index is used to represent the storage performance of the storage server; A target storage server corresponding to the maximum performance index is determined, and the target storage server is used to store backup data of a cloud mobile phone.

2. The method of claim 1, wherein, The method further comprises the following steps: A decision matrix is constructed according to the parameter value of the preset index of each storage server, elements in the same column of the decision matrix are used to represent the parameter value of the same preset index of different storage servers, and elements in the same row of the decision matrix are used to represent the parameter value of different preset indexes of one storage server; The optimal parameter value and the worst parameter value are determined for each column element in the decision matrix; The optimal parameter value set is constructed by using the optimal parameter value in each column element; The worst parameter value set is constructed by using the worst parameter value in each column element.

3. The method of claim 1, wherein, The method further comprises the following steps: The first distance and the second distance are calculated according to the preset weight corresponding to the preset index.

4. The method of claim 3, wherein, The number of the preset indexes is 3, and the first distance and the second distance are calculated according to the preset weight corresponding to the preset index. The method further comprises the following steps: wherein, D i represents the first distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j represents the optimal parameter value set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server; The first distance is calculated according to the following formula: wherein D i represents the second distance corresponding to the i-th storage server, w j represents the preset weight corresponding to the j-th preset index, M j represents the worst parameter value set, m i ′ j represents the parameter value of the preset index corresponding to the i-th storage server.

5. The method of claim 1, wherein, The second distance is calculated according to the following formula: The method further comprises the following steps: In the formula, D i represents the performance index corresponding to the i-th storage server.

6. The method of claim 1, wherein, The performance index is calculated according to the following formula: The method further comprises the following steps: A target backup task corresponding to the earliest timestamp is acquired from a backup task sequence. obtain target cloud phone backup data corresponding to the target backup task; send the target cloud phone backup data to the target storage server.

7. The method of claim 6, wherein, Before obtaining the target backup task corresponding to the earliest timestamp in the backup task sequence, the method further comprises: receive data backup instructions sent by different cloud phones; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone.

8. The method of claim 1, wherein, After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server.

9. The method of claim 8, wherein, The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises:

10. The method of claim 9, wherein, obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server.

11. The method of claim 1, wherein, The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated cloud phone backup data to the target storage server. The determination of whether the cloud phone backup data is updated comprises: obtain target cloud phone backup data corresponding to the target backup task; obtain target cloud phone backup data corresponding to the target backup task; construct the backup task sequence according to the timestamps of the data backup instructions corresponding to each cloud phone. After storing the cloud phone backup data by using the target storage server, the method further comprises: determine whether the cloud phone backup data is updated every second preset period; in the case that the cloud phone backup data is updated, send the updated calculating a product of the public key and a second random number to obtain an elliptic curve point; generating an intermediate parameter by using a preset key derivation function, the elliptic curve point, and a data length of the cloud phone backup data; calculating an exclusive or value of the cloud phone backup data and the intermediate parameter to obtain original encrypted data; obtaining a first concatenated value of the elliptic curve point and the cloud phone backup data; calculating a hash value of the first concatenated value to obtain an anti-tampering parameter; calculating a product of an elliptic curve base point and the first random number to obtain a secret value calculation parameter; concatenating the original encrypted data, the anti-tampering parameter, and the secret value calculation parameter to obtain the encrypted data; sending the encrypted data to the target storage server.

12. The method of claim 11, wherein, The load balancing server stores a private key corresponding to each cloud phone; After the sending of the encrypted data to the target storage server, the method further includes: receiving a backup data reading instruction sent by a cloud phone; reading the encrypted data from the target storage server; calculating a product of the private key and the secret value calculation parameter to obtain the elliptic curve point; obtaining the intermediate parameter according to the elliptic curve point and the preset key derivation function; calculating an exclusive or value of the original encrypted data and the intermediate parameter to obtain the cloud phone backup data; concatenating the cloud phone backup data and the elliptic curve point to obtain a second concatenated value; calculating a hash value of the second concatenated value to obtain a target anti-tampering parameter; in a case where the target anti-tampering parameter is the same as the anti-tampering parameter, determining that the cloud phone backup data passes verification.

13. An apparatus for data synchronization, the apparatus comprising: The device is applied to a load balancing server and includes: an obtaining module configured to obtain parameter values of preset indexes of each storage server every first preset period; a determining module configured to determine optimal parameter values and worst parameter values of each preset index according to the parameter values of the preset indexes of each storage server to obtain a set of optimal parameter values and a set of worst parameter values; a calculating module configured to, for each storage server, calculate a first distance of the parameter values of the preset indexes of the storage server from the set of optimal parameter values and a second distance from the set of worst parameter values, the first distance representing a performance gap between a performance of the storage server and a performance corresponding to the set of optimal parameter values, and the second distance representing a performance gap between the performance of the storage server and a performance corresponding to the set of worst parameter values; the calculating module is further configured to, for each storage server, calculate a performance index of the storage server by using the first distance and the second distance corresponding to the storage server, the performance index being used to represent a storage performance of the storage server; a storage module configured to determine a target storage server corresponding to a maximum performance index and store cloud phone backup data by using the target storage server.

14. An electronic device, comprising: The device includes a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the method for synchronizing data according to any one of claims 1-12.

Citation Information

Patent Citations

  • Load balancing method and device under multi-data-center environment

    CN103973728A

  • Capability baseline generation method and device, electronic system and storage medium

    CN116166426A