Data comparison method, device, system and equipment and readable storage medium

By using the initial accuracy coefficient in the data comparison system to reconstruct the data and perform comparison processing on the cloud server, the risk of data leakage or tampering caused by unencrypted protection of sensitive information in traditional data comparison methods is solved, and high security comparison of data is achieved.

CN120068164APending Publication Date: 2025-05-30ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510130029.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Traditional data comparison methods In the process of data transmission and storage, sensitive information is not encrypted and protected and is easily acquired or tampered by potential attackers, resulting in an increased risk of data leakage or tampering.

Method used

By sending initial accuracy coefficients on the data end, the cloud server determines the data reconstruction information based on multiple initial accuracy coefficients and sends it to the data end, so that the data end determines the reconstruction data based on the pre-stored initial data and data reconstruction information, and sends the reconstruction data to the cloud server for comparison processing, thereby obtaining the data comparison result.

Benefits of technology

This method effectively reduces the risk of data leakage or tampering, improves data security, and ensures the security of sensitive information during transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068164A_ABST
    Figure CN120068164A_ABST
Patent Text Reader

Abstract

The invention relates to a data comparison method, device, system and equipment and a readable storage medium. The method is applied to a cloud server and comprises the following steps: acquiring security requests sent by at least two data ends; the security request comprises an initial precision coefficient; determining data reconstruction information based on the plurality of initial precision coefficients, and sending the data reconstruction information to each data end, so that each data end determines reconstruction data based on pre-stored initial data and the data reconstruction information, and sends the reconstruction data to the cloud server; and receiving the reconstruction data, and carrying out comparison processing on the reconstruction data to obtain a data comparison result. By adopting the method, the data security can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data privacy protection, and in particular to a data comparison method, apparatus, system, device and readable storage medium. Background Art

[0002] In the current application of information technology, data comparison, as a common data processing operation, is widely used in many fields such as data analysis, monitoring, and system comparison.

[0003] Traditional comparison methods usually rely on direct comparison of plaintext data, which means that sensitive information is not encrypted during data transmission and storage and can be easily obtained or tampered with by potential attackers.

[0004] Therefore, how to improve the security of data comparison operations and reduce the leakage or tampering of sensitive data during transmission and storage has become a key issue that needs to be urgently addressed in the field of information technology. Summary of the invention

[0005] Based on this, it is necessary to provide a data comparison method, device, system, equipment and readable storage medium that can improve data security in response to the above technical problems.

[0006] In a first aspect, the present application provides a data comparison method, which is applied to a cloud server, comprising:

[0007] Obtain security requests sent by at least two data terminals; the security requests include an initial precision coefficient;

[0008] Determine data reconstruction information based on multiple initial precision coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on pre-stored initial data and data reconstruction information, and sends the reconstructed data to the cloud server;

[0009] Reconstructed data is received, and comparison processing is performed on the reconstructed data to obtain a data comparison result.

[0010] In one embodiment, the data reconstruction information includes a random number, a data share, and a reference precision coefficient, and the data reconstruction information is determined based on a plurality of initial precision coefficients, including:

[0011] Determining a reference coefficient of accuracy based on a plurality of initial coefficients of accuracy;

[0012] Based on the benchmark precision coefficient, generate at least two random numbers;

[0013] Split one of the random numbers into at least two data shares;

[0014] Correspondingly, send data reconstruction information to each data terminal so that each data terminal determines reconstructed data based on the data reconstruction information, including:

[0015] Send a random number, a data share, and a benchmark precision coefficient to at least two data terminals so that each data terminal determines reconstructed data based on the initially stored data, the random number, the data share, and the benchmark precision coefficient.

[0016] In a second aspect, the present application also provides a data comparison method applied to a data terminal. The method includes:

[0017] Obtain a security request; the security request includes an initial precision coefficient;

[0018] Send the security request to a cloud server. The security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information;

[0019] Determine reconstructed data based on the initially stored data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server performs a comparison process on the reconstructed data to obtain a data comparison result.

[0020] In one embodiment, the method for determining the above initial precision coefficient includes:

[0021] Determine the initial precision coefficient based on the number of decimal places of the initial data.

[0022] In a third aspect, the present application also provides a data comparison system. The system includes a cloud server and at least two data terminals;

[0023] The cloud server is configured to execute the method in the first aspect;

[0024] At least two data terminals are configured to execute the method in the second aspect.

[0025] In a fourth aspect, the present application also provides a data comparison device applied to a cloud server. The device includes:

[0026] An acquisition module, configured to acquire security requests sent by at least two data terminals; the security requests include an initial precision coefficient;

[0027] A reconstruction information determination module, configured to determine data reconstruction information based on multiple initial precision coefficients, and send the data reconstruction information to each data terminal so that each data terminal determines reconstructed data based on the initially stored data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0028] A reconstructed data reception module, configured to receive the reconstructed data and perform a comparison process on the reconstructed data to obtain a data comparison result.

[0029] Fifth aspect, the present application further provides a data comparison device, which is applied to a data terminal. The device includes:

[0030] An acquisition module, configured to acquire a security request; the security request includes an initial accuracy coefficient;

[0031] A reconstructed information sending module, configured to send the security request to a cloud server. The security request is used to instruct the cloud server to determine data reconstruction information based on the initial accuracy coefficient and return the data reconstruction information;

[0032] A reconstructed data sending module, configured to determine reconstructed data based on pre-stored initial data and the data reconstruction information, and send the reconstructed data to the cloud server, so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0033] Sixth aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] Acquire security requests sent by at least two data terminals; the security requests include initial accuracy coefficients;

[0035] Determine data reconstruction information based on multiple initial accuracy coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0036] Receive the reconstructed data, and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0037] Sixth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0038] Acquire security requests sent by at least two data terminals; the security requests include initial accuracy coefficients;

[0039] Determine data reconstruction information based on multiple initial accuracy coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0040] Receive the reconstructed data, and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0041] The above data comparison method, device, system, equipment and readable storage medium, the cloud server obtains security requests sent by at least two data terminals; the security requests include initial accuracy coefficients; based on multiple initial accuracy coefficients, data reconstruction information is determined and sent to each data terminal, so that each data terminal determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server; receives the reconstructed data, and performs comparison processing on the reconstructed data to obtain a data comparison result; in the traditional data comparison method, sensitive information is not encrypted and protected during data transmission and storage, and is easily obtained or tampered with by potential attackers. However, the method of this application reconstructs the initial data using the initial accuracy coefficients sent by the data terminals, and obtains the data comparison result using the reconstructed data, which effectively reduces the risk of data leakage or tampering and improves the security of the data. Description of the Drawings

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for description in the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0043] Figure 1 It is a structural diagram of a data comparison system in an embodiment;

[0044] Figure 2 It is a flowchart of a data comparison method in an embodiment;

[0045] Figure 3 It is a flowchart of a data comparison method in another embodiment;

[0046] Figure 4 It is a flowchart of a data comparison method in another embodiment;

[0047] Figure 5 It is a structural block diagram of a data comparison device in an embodiment;

[0048] Figure 6 It is a structural block diagram of a data comparison device in another embodiment;

[0049] Figure 7 It is an internal structural diagram of a computer device in an embodiment;

[0050] Description of the reference numerals:

[0051] Cloud server 10, data terminal 11. Detailed Description of the Embodiments

[0052] To make the objectives, technical solutions and advantages of this application more clear and understandable, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not used to limit this application.

[0053] The data comparison method provided by the embodiments of this application can be applied to, for example, Figure 1 the data comparison system shown in the figure. The system includes a cloud server 10 and at least two data terminals 11. The cloud server 10 is connected to the data terminals 11 through a communication network. First, the cloud server 10 receives security requests sent by at least two data terminals 11, and these security requests contain initial accuracy coefficients. Next, the cloud server 10 determines data reconstruction information based on multiple initial accuracy coefficients and sends the reconstruction information to each data terminal 11, so that each data terminal 11 calculates reconstructed data based on the pre-stored initial data and the reconstruction information, and returns these reconstructed data to the cloud server 10. Finally, the cloud server 10 receives all the reconstructed data and performs comparison processing to obtain a data comparison result.

[0054] In this embodiment, the cloud server 10 can be a local server or a computing cluster, and the data terminal 11 can be an edge device, such as an intelligent sensor, an Internet of Things device, or an embedded system, etc.

[0055] In an exemplary embodiment, as Figure 2 shown, a data comparison method is provided. Taking the method applied to the Figure 1 cloud server in the figure as an example, it includes the following steps 201 to step 203. Among them:

[0056] Step 201, obtain security requests sent by at least two data terminals; the security requests include initial accuracy coefficients.

[0057] Among them, the initial accuracy coefficient is a preliminary parameter for measuring data accuracy, and it is a parameter attached to the security request when the data terminal sends the security request.

[0058] In the embodiments of this application, multiple data terminals send security requests to the cloud server, and the cloud server obtains the security requests sent by these data terminals.

[0059] In some embodiments, if multiple data terminals send security requests simultaneously. In this case, multiple data terminals send security requests to the cloud server simultaneously. Each security request contains its own initial accuracy coefficient. After the cloud server receives these security requests from different data terminals, it will verify the legality of each security request one by one.

[0060] In some embodiments, if only a single data terminal sends a security request to the cloud server. In this case, only one data terminal sends a security request to the cloud server, and the security request contains an initial accuracy coefficient. After receiving this security request, the cloud server will first verify its legality to ensure that the identity of the data terminal is valid and the data transmission has not been tampered with.

[0061] Step 202, determine data reconstruction information based on multiple initial accuracy coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server.

[0062] Among them, the data reconstruction information is the information calculated by the cloud server according to multiple initial accuracy coefficients, and is usually used to guide the data terminal on how to reconstruct based on the existing initial data.

[0063] The initial data refers to the original data used by the data terminal during the reconstruction process. The initial data is usually stored on the data terminal and is used to combine with the data reconstruction information received from the cloud server to obtain the updated data.

[0064] In the embodiments of the present application, after receiving the security request, the cloud server first extracts the initial accuracy coefficients provided by multiple data terminals from it. Based on these initial accuracy coefficients, the cloud server then calculates the data reconstruction information through a preset algorithm or calculation model. Subsequently, the cloud server sends the calculated data reconstruction information to each data terminal. After receiving the reconstruction information, the data terminal will perform a reconstruction operation according to these data reconstruction information and the stored initial data.

[0065] After the data terminal completes data reconstruction, the data terminal sends the reconstructed data back to the cloud server. It should be noted that the reconstructed data usually also undergoes encryption processing to ensure that it is not tampered with or leaked during transmission.

[0066] In some embodiments, the reconstruction process may include steps such as denoising, data interpolation, smoothing, or error correction to ensure that the reconstructed data meets the predetermined accuracy requirements. In this process, the data terminal will process the data according to its own initial accuracy coefficient and the reconstruction information, and strive to reduce errors and deviations.

[0067] Step 203, receive the reconstructed data, and perform a comparison process on the reconstructed data to obtain a data comparison result.

[0068] In the embodiments of the present application, after receiving these reconstructed data, the cloud server compares the reconstructed data sent by different data terminals to evaluate their magnitude relationship.

[0069] In some embodiments, the cloud server may use size sorting, threshold comparison, or other forms of mathematical comparison to obtain the size order of the reconstruction results of each data end, thereby obtaining a data comparison result.

[0070] Exemplarily, the cloud server may adopt a size sorting method for data comparison. The cloud server sorts all the received reconstructed data according to numerical size, from largest to smallest, or arranges them according to other specific criteria.

[0071] Exemplarily, the cloud server may also adopt a threshold comparison method for size comparison. The cloud server presets a standard threshold and compares the reconstructed data of each data end with this threshold. If the data is greater than the threshold, it indicates that the result of this data end is larger; if the data is less than the threshold, the result of this data end is smaller.

[0072] In the above data comparison method, the cloud server obtains security requests sent by at least two data ends; the security requests include initial precision coefficients; determines data reconstruction information based on multiple initial precision coefficients, and sends the data reconstruction information to each data end, so that each data end determines reconstructed data based on the initially stored data and the data reconstruction information, and sends the reconstructed data to the cloud server; receives the reconstructed data, and performs comparison processing on the reconstructed data to obtain a data comparison result; in the traditional data comparison method, sensitive information is not encrypted and protected during data transmission and storage, and is easily obtained or tampered with by potential attackers. However, the method of this application reconstructs the initial data using the initial precision coefficients sent by the data ends, and obtains a data comparison result using the reconstructed data, which effectively reduces the risk of data leakage or tampering and improves the security of the data.

[0073] In an exemplary embodiment, the above data reconstruction information includes random numbers, data shares, and a reference precision coefficient. On this basis, as Figure 3 shown, the above "determining data reconstruction information based on multiple initial precision coefficients" in the above embodiment includes steps 301 to 303. Among them:

[0074] Step 301, determine a reference precision coefficient according to multiple initial precision coefficients.

[0075] Among them, the reference precision coefficient is a standard precision coefficient calculated by the cloud server based on multiple initial precision coefficients. This reference precision coefficient is used to control the precision of data reconstruction, guide the data end to perform reconstruction according to the data it calculates and stores, and it is the reference benchmark in all reconstruction processes.

[0076] In the embodiments of this application, the cloud server first receives the initial precision coefficients sent by multiple data ends, and then calculates a unified reference precision coefficient through a certain algorithm (such as weighted average, simple average, etc.).

[0077] In some embodiments, the cloud server may use the maximum value method to determine the reference accuracy coefficient. The cloud server compares all the received initial accuracy coefficients and selects the maximum value among them as the reference accuracy coefficient.

[0078] In some embodiments, the cloud server calculates the average value of all the initial accuracy coefficients and uses this average value as the reference accuracy coefficient. By this method, the cloud server ensures that the accuracy requirements of all data terminals are balanced to a certain extent, avoiding excessive or too low accuracy requirements for a single data terminal, which may cause unnecessary reconstruction deviation.

[0079] In some embodiments, the cloud server may also choose to use the minimum value as the reference accuracy coefficient, that is, select the minimum value among all the initial accuracy coefficients as the reference accuracy coefficient.

[0080] Step 302: Generate at least two random numbers based on the reference accuracy coefficient.

[0081] Among them, the random numbers are generated by the cloud server and are used to guide the variation of parameters in the data reconstruction process, increasing the complexity and randomness of the reconstruction process.

[0082] In the embodiments of the present application, the cloud server determines the range for generating random numbers according to the reference accuracy coefficient. For example, if the reference accuracy coefficient is large, the range of the random numbers generated by the cloud server will be relatively small to ensure that the generated random numbers do not deviate from the required accuracy range; if the reference accuracy coefficient is small, the fluctuation range of the generated random numbers can be larger to meet the low accuracy requirements.

[0083] Next, the cloud server will use an appropriate random number generation algorithm to generate these random numbers. When generating random numbers, after the cloud server determines the range according to the reference accuracy coefficient, it generates at least two random numbers and ensures that the generation of random numbers meets the predetermined accuracy requirements.

[0084] Step 303: Split one of the random numbers into at least two data shares;

[0085] Correspondingly, sending the data reconstruction information to each data terminal so that each data terminal determines the reconstructed data based on the data reconstruction information includes:

[0086] Sending the random numbers, data shares, and reference accuracy coefficient to at least two data terminals so that each data terminal determines the reconstructed data based on the initially stored data, random numbers, data shares, and reference accuracy coefficient.

[0087] Among them, the data share is a form of distribution and splitting of data and is a part of the data shared or distributed among multiple data terminals. The split data shares help to achieve data reconstruction and collaborative computing among multiple data terminals.

[0088] The splitting of a random number into data shares means that the cloud server splits one of the generated random numbers into at least two data shares. These data shares will be sent to different data terminals respectively, so that the data processed and reconstructed by each data terminal contains a part of the information.

[0089] In the embodiment of the present application, the cloud server will split one of the random numbers into at least two data shares. These data shares will be assigned to different data terminals.

[0090] In some embodiments, the cloud server will split the selected random number according to certain rules or algorithms. For example, assume that a random number generated by the cloud server is r, then it can split this random number into two or more data shares, such as r1 and r2, according to a predetermined ratio or method. The splitting method can be simple equal division, or weighted splitting according to the needs of different data terminals. For example, if a data terminal requires higher precision, more random number shares can be assigned, while another data terminal may be assigned fewer shares.

[0091] The cloud server sends the data reconstruction information containing the random number, data shares, and reference precision coefficient to each data terminal. After each data terminal receives the data reconstruction information, based on its pre-stored initial data and combining this data reconstruction information, it performs the calculation process of data reconstruction. In this process, the data terminal will combine the initial data with the random number, data shares, and reference precision coefficient according to the preset reconstruction algorithm to generate the reconstructed data.

[0092] When each data terminal completes data reconstruction, they will return the reconstructed data to the cloud server. The cloud server will summarize and evaluate these reconstructed data from different data terminals. By comparing the reconstruction results of different data terminals, the cloud server can judge whether the performance of each data terminal meets the expectations, and then evaluate the effect of the reconstruction process. According to these evaluation results, the cloud server can also adjust the strategy of the next round of data reconstruction, such as modifying the reference precision coefficient, regenerating the random number, or adjusting the distribution method of data shares.

[0093] In the above embodiment, by determining the reference precision coefficient based on multiple initial precision coefficients, generating random numbers, and splitting data shares, the concealment and security of the data reconstruction process are ensured. Even if some data terminals or communication links are obtained by attackers, this method relies on multiple random numbers and data shares, avoiding the risk of attackers directly accessing the complete data. The data is effectively isolated through the splitting and encryption mechanism, improving the security of the data and reducing the possibility of data leakage.

[0094] In an exemplary embodiment, such as Figure 4As shown, a data comparison method is provided. Taking the data terminal in Figure 1 as an example, the method includes the following steps 401 to 403. Among them:

[0095] Step 401, obtain a security request; the security request includes an initial accuracy coefficient.

[0096] In the embodiments of the present application, when multiple data terminals need to perform data comparison processing, they first obtain their respective security requests. Then, the multiple data terminals send the security requests to the cloud server. Each security request contains an initial accuracy coefficient. The cloud server obtains the security requests sent by these data terminals.

[0097] In some embodiments, if multiple data terminals send security requests simultaneously. In this case, the multiple data terminals send security requests to the cloud server simultaneously. Each security request contains its own initial accuracy coefficient, indicating different security requirements for data reconstruction accuracy of different data terminals. After receiving these security requests from different data terminals, the cloud server will verify the legitimacy of each security request one by one.

[0098] In some embodiments, if only a single data terminal sends a security request to the cloud server. In this case, only one data terminal sends a security request to the cloud server, and the security request contains an initial accuracy coefficient. After receiving this security request, the cloud server first verifies its legitimacy to ensure that the identity of the data terminal is valid and the data transmission has not been tampered with.

[0099] Step 402, send the security request to the cloud server. The security request is used to instruct the cloud server to determine data reconstruction information based on the initial accuracy coefficient and return the data reconstruction information.

[0100] In the embodiments of the present application, the data terminal sends the security request to the cloud server. After receiving the security request, the cloud server first extracts the initial accuracy coefficients provided by multiple data terminals from it. Based on these initial accuracy coefficients, the cloud server then calculates the data reconstruction information through a preset algorithm or calculation model. Subsequently, the cloud server sends the calculated data reconstruction information to each data terminal.

[0101] Step 403, determine the reconstructed data based on the pre-stored initial data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0102] In the embodiments of the present application, after receiving the reconstruction information, the data terminal will perform a reconstruction operation according to these data reconstruction information and the stored initial data.

[0103] After the data reconstruction is completed at the data end, the data end sends the reconstructed data back to the cloud server. It should be noted that the reconstructed data usually undergoes encryption processing to ensure that it is not tampered with or leaked during transmission.

[0104] In some embodiments, the reconstruction process may include steps such as denoising, data interpolation, smoothing, or error correction to ensure that the reconstructed data meets the predetermined accuracy requirements. In this process, the data end processes the data according to its own initial accuracy coefficient and reconstruction information, and strives to reduce errors and deviations.

[0105] After the cloud server receives this reconstructed data, it compares the reconstructed data sent by different data ends to evaluate their magnitude relationships.

[0106] In some embodiments, the cloud server can use magnitude sorting, threshold comparison, or other forms of mathematical comparison to obtain the magnitude order of the reconstruction results of each data end, thereby obtaining the data comparison result.

[0107] Exemplarily, the cloud server can adopt the method of magnitude sorting to perform data comparison. The cloud server sorts all the received reconstructed data according to the numerical magnitude, from the largest to the smallest, or arranges them according to other specific criteria.

[0108] Exemplarily, the cloud server can also adopt the method of threshold comparison for magnitude comparison. The cloud server presets a standard threshold and compares the reconstructed data of each data end with this threshold. If the data is greater than the threshold, it indicates that the result of this data end is larger; if the data is less than the threshold, the result of this data end is smaller.

[0109] In the above data comparison method, the cloud server obtains security requests sent by at least two data ends; the security requests include initial accuracy coefficients; based on multiple initial accuracy coefficients, it determines data reconstruction information and sends the data reconstruction information to each data end, so that each data end determines the reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server; receives the reconstructed data and performs comparison processing on the reconstructed data to obtain the data comparison result; in the traditional data comparison method, sensitive information is not encrypted and protected during data transmission and storage, and is easily obtained or tampered with by potential attackers. However, the method of the present application reconstructs the initial data using the initial accuracy coefficients sent by the data end, and obtains the data comparison result using the reconstructed data, which effectively reduces the risk of data leakage or tampering and improves the security of the data.

[0110] In an exemplary embodiment, the determination process of the "initial accuracy coefficient" in the above embodiment includes:

[0111] Based on the number of decimal places of the initial data, determine the initial accuracy coefficient.

[0112] In the embodiments of the present application, the data terminal first needs to analyze the number of decimal places of the initial data. For example, if the initial data is a floating-point value, such as 3.14159, the number of decimal places is 5; if the data is 1.2, the number of decimal places is 1.

[0113] After the data terminal knows the number of decimal places of the initial data, it converts the number of decimal places into an initial precision coefficient according to a preset rule. Exemplarily, the number of decimal places can be directly used as the initial precision coefficient. For example, assume that the initial data at the data terminal is 123.45678, and the number of decimal places of this initial data is 5. According to the analysis, the initial precision coefficient of this data is 5.

[0114] In the above embodiments, by determining the initial precision coefficient based on the number of decimal places of the initial data, the consistency and accuracy of the precision in the data processing process can be ensured. The number of decimal places directly reflects the precision requirement of the data. By using this method, the precision coefficient can be automatically adjusted according to the precision requirements of different data, ensuring that errors do not accumulate or the calculation results are inaccurate due to insufficient precision during the data processing process. Therefore, the performance of the system in precision-sensitive scenarios can be effectively improved, and distortion or deviation caused by improper precision setting can be avoided.

[0115] Some embodiments of the present application provide a data comparison method, which may include the following steps:

[0116] Step 1, the data terminal determines an initial precision coefficient based on the number of decimal places of the initial data.

[0117] Step 2, the cloud server obtains at least two security requests sent by the data terminals; the security requests include the initial precision coefficient.

[0118] Step 3, the cloud server determines a reference precision coefficient according to multiple initial precision coefficients.

[0119] Step 4, the cloud server generates at least two random numbers based on the reference precision coefficient.

[0120] Step 5, the cloud server splits one of the random numbers into at least two data shares.

[0121] Step 6, the cloud server sends the random number, the data shares, and the reference precision coefficient to at least two data terminals.

[0122] Step 7, each data terminal determines reconstructed data based on the initially stored initial data, random number, data shares, and reference precision coefficient, and sends the reconstructed data to the cloud server.

[0123] Step 8, the cloud server receives the reconstructed data and performs comparison processing on the reconstructed data to obtain a data comparison result.

[0124] In some embodiments, the data side host 1 and host 2 respectively hold the initial data data 1 = 1.23334 and data 2 = 1.232. The initial precision coefficients in the security request are Beta 1 and Beta 2 , and Beta 1 = 100000 and Beta 2 = 1000 can be obtained. The data side sends a security request to the cloud server and carries Beta 1 and Beta 2 .

[0125] The cloud server generates two random numbers α 1 and α 2 , where the first random number α 1 ∈{0,1} ε , ε = 128 - log 10 Beta = 123. Among them, Beta is the maximum value of Beta 1 and Beta 2 .

[0126] Therefore, α 1 = 5137514374697521977222941846085175127 can be obtained. The second random number α 2 ∈{0,1} ρ , ρ = 32, α 2 = 1298990230. And α 2 is secretly shared to obtain the first data share α 2,1 = q = 272848591 and the second data share α 2,1 = α 2 - q = 1026141639. The results α 1 , α 2,1 and Beta after secret splitting are sent to the data side host 1 , α 1 , α 2,2 and Beta are sent to the data side host 2 .

[0127] The data side uses the results after secret splitting and Beta for secret reconstruction. The data side calculates that the host i holds the data data i = data i ·Beta

[0128] host 1Calculate the first data share: C 1 = data 1 ·α 1 -α 2,1 , host 2 Calculate the second data share: C 2 = data 2 ·α 1 -α 2,2 , and send them to the cloud server respectively.

[0129] The cloud server calculates the difference between C 1 and C 2 respectively, and then obtains the data comparison result.

[0130] result 1 = C 1 - C 2 = 688426926209467944947874207376166760066, result 2 = C 2 - C 1 = -688426926209467944947874207376166760066.

[0133] Since result 1 > 0 and result 2 < 0, the data comparison result is: data 1 > data 2 .

[0134] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0135] Based on the same inventive concept, an embodiment of the present application further provides a data comparison device for implementing the data comparison method involved above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data comparison device provided below can refer to the limitations on the data comparison method in the above text and will not be elaborated here.

[0136] In an exemplary embodiment, as Figure 5 shown, a data comparison device is provided, which is applied to a cloud server. The device includes: an acquisition module 501, a reconstruction information determination module 502, and a reconstructed data reception module 503, where:

[0137] The acquisition module 501 is configured to acquire security requests sent by at least two data terminals; the security requests include initial precision coefficients;

[0138] The reconstruction information determination module 502 is configured to determine data reconstruction information based on multiple initial precision coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the initially stored data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0139] The reconstructed data reception module 503 is configured to receive the reconstructed data and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0140] In an exemplary embodiment, the data reconstruction information includes random numbers, data shares, and a reference precision coefficient. The above reconstruction information determination module 502 is specifically configured to determine the reference precision coefficient according to multiple initial precision coefficients; generate at least two random numbers based on the reference precision coefficient; split one of the random numbers into at least two data shares; correspondingly, send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the data reconstruction information, including: sending the random numbers, data shares, and reference precision coefficient to at least two data terminals, so that each data terminal determines reconstructed data based on the initially stored data, random numbers, data shares, and reference precision coefficient.

[0141] In an exemplary embodiment, as Figure 6 shown, a data comparison device is provided, which is applied to a data terminal. The device includes: an acquisition module 601, a reconstruction information sending module 602, and a reconstructed data sending module 603, where:

[0142] The acquisition module 601 is configured to acquire a security request; the security request includes an initial precision coefficient;

[0143] The reconstruction information sending module 602 is configured to send a security request to the cloud server, where the security request is used to instruct the cloud server to determine data reconstruction information based on an initial precision coefficient and return the data reconstruction information;

[0144] The reconstructed data sending module 603 is configured to determine reconstructed data based on the pre-stored initial data and the data reconstruction information, and send the reconstructed data to the cloud server, so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0145] In an exemplary embodiment, the above-mentioned obtaining module 601 is specifically configured to determine an initial precision coefficient based on the number of decimal places of the initial data.

[0146] Each module in the above-mentioned data comparison device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned respective modules.

[0147] In an exemplary embodiment, a data comparison system is provided. Continuing to refer to Figure 1 , the system includes a cloud server 10 and at least two data terminals 11. The cloud server 10 is connected to the data terminals 11 through a communication network. First, the cloud server 10 receives security requests sent by at least two data terminals 11, and these security requests contain an initial precision coefficient. Next, the cloud server 10 determines data reconstruction information based on multiple initial precision coefficients, and sends the reconstruction information to each data terminal 11, so that each data terminal 11 calculates reconstructed data based on the pre-stored initial data and the reconstruction information, and returns these reconstructed data to the cloud server 10. Finally, the cloud server 10 receives all the reconstructed data and performs comparison processing to obtain a data comparison result.

[0148] In this embodiment, the cloud server 10 can be a local server or a computing cluster, and the data terminal 11 can be an edge device, such as an intelligent sensor, an Internet of Things device, or an embedded system, etc.

[0149] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as shown in Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data during the data comparison process. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. The computer program, when executed by the processor, implements a data comparison method.

[0150] Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0151] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0152] Obtain security requests sent by at least two data terminals; the security requests include initial accuracy coefficients;

[0153] Determine data reconstruction information based on multiple initial accuracy coefficients, and send the data reconstruction information to each data terminal, so that each data terminal determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0154] Receive the reconstructed data, and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0155] In an embodiment, the data reconstruction information includes random numbers, data shares, and a reference accuracy coefficient. When the processor executes the computer program, the following steps are also implemented:

[0156] Determine the reference accuracy coefficient according to multiple initial accuracy coefficients;

[0157] Generate at least two random numbers based on the reference accuracy coefficient;

[0158] Split one of the random numbers into at least two data shares;

[0159] Correspondingly, send data reconstruction information to each data terminal so that each data terminal determines reconstructed data based on the data reconstruction information, including:

[0160] Send a random number, a data share, and a reference precision coefficient to at least two data terminals so that each data terminal determines reconstructed data based on the initially stored data, the random number, the data share, and the reference precision coefficient.

[0161] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0162] Obtain a security request; the security request includes an initial precision coefficient;

[0163] Send the security request to the cloud server, where the security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information;

[0164] Determine reconstructed data based on the initially stored data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0165] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0166] Determine an initial precision coefficient based on the number of decimal places of the initial data.

[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0168] Obtain security requests sent by at least two data terminals; the security requests include initial precision coefficients;

[0169] Determine data reconstruction information based on multiple initial precision coefficients, and send the data reconstruction information to each data terminal so that each data terminal determines reconstructed data based on the initially stored data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0170] Receive the reconstructed data, and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0171] In one embodiment, the data reconstruction information includes a random number, a data share, and a reference precision coefficient. When the computer program is executed by a processor, the following steps are further implemented:

[0172] Determine a reference precision coefficient according to multiple initial precision coefficients;

[0173] Generate at least two random numbers based on the reference precision coefficient;

[0174] Split one of the random numbers into at least two data shares;

[0175] Correspondingly, send data reconstruction information to each data terminal so that each data terminal determines the reconstructed data based on the data reconstruction information, including:

[0176] Send the random number, data shares, and reference precision coefficient to at least two data terminals so that each data terminal determines the reconstructed data based on the initially stored data, random number, data shares, and reference precision coefficient.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0178] Obtain a security request; the security request includes an initial precision coefficient;

[0179] Send the security request to the cloud server, and the security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information;

[0180] Determine the reconstructed data based on the initially stored data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0182] Determine the initial precision coefficient based on the number of decimal places of the initial data.

[0183] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0184] Obtain security requests sent by at least two data terminals; the security requests include an initial precision coefficient;

[0185] Determine data reconstruction information based on multiple initial precision coefficients, and send the data reconstruction information to each data terminal so that each data terminal determines the reconstructed data based on the initially stored data and the data reconstruction information, and sends the reconstructed data to the cloud server;

[0186] Receive the reconstructed data, and perform comparison processing on the reconstructed data to obtain a data comparison result.

[0187] In one embodiment, the data reconstruction information includes a random number, data shares, and a reference precision coefficient. When the computer program is executed by a processor, the following steps are further implemented:

[0188] Determine the reference precision coefficient according to multiple initial precision coefficients;

[0189] Generate at least two random numbers based on a reference precision coefficient;

[0190] Split one of the random numbers into at least two data shares;

[0191] Correspondingly, send data reconstruction information to each data terminal so that each data terminal determines reconstructed data based on the data reconstruction information, including:

[0192] Send the random number, the data share, and the reference precision coefficient to at least two data terminals so that each data terminal determines the reconstructed data based on the initially stored data, the random number, the data share, and the reference precision coefficient.

[0193] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0194] Obtain a security request; the security request includes an initial precision coefficient;

[0195] Send the security request to a cloud server, where the security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information;

[0196] Determine the reconstructed data based on the initially stored data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

[0197] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0198] Determine the initial precision coefficient based on the number of decimal places of the initial data.

[0199] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, etc. Volatile memory can include Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, Artificial Intelligence (AI) processors, etc., without limitation.

[0200] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.

[0201] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A data comparison method, characterized in that: Applied to a cloud server, the method comprises: Obtaining security requests sent by at least two data terminals; the security requests include an initial precision coefficient; Determine data reconstruction information based on the multiple initial precision coefficients, and send the data reconstruction information to each of the data terminals, so that each of the data terminals determines reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server; The reconstructed data is received, and comparison processing is performed on the reconstructed data to obtain a data comparison result.

2. The method according to claim 1, characterized in that The data reconstruction information includes a random number, a data share, and a reference precision coefficient, and the determining of the data reconstruction information based on the multiple initial precision coefficients includes: Determine the reference accuracy coefficient according to the plurality of initial accuracy coefficients; Based on the reference precision coefficient, generating at least two random numbers; Splitting one of the random numbers into at least two of the data shares; Correspondingly, sending the data reconstruction information to each of the data terminals so that each of the data terminals determines the reconstructed data based on the data reconstruction information includes: The random number, the data share and the reference precision coefficient are sent to the at least two data ends, so that each of the data ends determines the reconstructed data based on pre-stored initial data, the random number, the data share and the reference precision coefficient.

3. A data comparison method, characterized in that: Applied to the data end, the method includes: Obtaining a security request; the security request includes an initial precision coefficient; Sending the security request to a cloud server, wherein the security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information; The reconstructed data is determined based on the pre-stored initial data and the data reconstruction information, and the reconstructed data is sent to the cloud server, so that the cloud server performs comparison processing on the reconstructed data to obtain a data comparison result.

4. The method according to claim 3, characterized in that The method for determining the initial precision coefficient comprises: The initial precision coefficient is determined based on the number of decimal places of the initial data.

5. A data comparison device, characterized in that: Applied to a cloud server, the device comprises: An acquisition module, used to acquire security requests sent by at least two data terminals; the security requests include an initial precision coefficient; A reconstruction information determination module, used to determine data reconstruction information based on the multiple initial precision coefficients, and send the data reconstruction information to each of the data terminals, so that each of the data terminals determines the reconstructed data based on the pre-stored initial data and the data reconstruction information, and sends the reconstructed data to the cloud server; The reconstructed data receiving module is used to receive the reconstructed data and perform comparison processing on the reconstructed data to obtain a data comparison result.

6. A data comparison device, characterized in that: Applied to a data terminal, the device comprises: An acquisition module, used for acquiring a security request; the security request includes an initial precision coefficient; A reconstruction information sending module, used to send the security request to the cloud server, wherein the security request is used to instruct the cloud server to determine data reconstruction information based on the initial precision coefficient and return the data reconstruction information; The reconstructed data sending module is used to determine the reconstructed data based on the pre-stored initial data and the data reconstruction information, and send the reconstructed data to the cloud server so that the cloud server compares the reconstructed data to obtain a data comparison result.

7. A data comparison system, characterized in that: The system includes a cloud server and at least two data terminals; The cloud server is used to execute the method according to claims 1-2; The at least two data terminals are used to execute the method as described in claims 3-4.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.