Data processing method, computer equipment and storage medium
By decrypting and detecting the encrypted data on the application side, the problem of low data processing capabilities and security of smart devices is solved, and more efficient and secure data processing is achieved.
Patent Information
- Application Number
- CN202510345575.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the processing of data acquisition by intelligent devices requires greater processing and storage capabilities, and the security of data processing is low.
The first encrypted data sent by the application side is obtained through the server, decrypted using the second key related to the application side security level, and detect based on the decrypted data to determine the data detection result.
It improves the security of data processing, adapts to the data processing needs of various application scenarios, and enhances the security of data processing.
Smart Images

Figure CN120455031A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data protection technology, and in particular to a data processing method, computer equipment, and storage medium. Background Art
[0002] With the development of smart devices, smart devices can collect data on target objects. However, processing the collected data requires greater processing power, etc.
[0003] Currently, the collected data can be processed using an application platform, but this approach requires significant data processing and storage capabilities. Therefore, a server can also be used to process the collected data, but this approach offers lower security. Summary of the Invention
[0004] The main technical problem solved by this application is to provide a data processing method, computer equipment and storage medium.
[0005] The first aspect of the present application provides a data processing method, which includes: a server side obtains first encrypted data sent by an application side, wherein the first encrypted data is obtained by the application side encrypting the original data using a first key; decrypting the first encrypted data using a second key to obtain decrypted data; wherein the second key is related to the security level corresponding to the application side, and the security level is determined using usage-related data of the application side; and performing detection based on the decrypted data to determine the data detection result.
[0006] The second aspect of the present application provides a data processing method, which includes: the application end uses a first key to encrypt the original data to obtain first encrypted data; sending the first encrypted data to the server end, so that the server end uses a second key to decrypt the first encrypted data to obtain decrypted data; performing detection based on the decrypted data to determine the data detection result; wherein the second key is related to the security level corresponding to the application end, and the security level is determined using usage-related data of the application end.
[0007] A third aspect of the present application provides a computer device, which includes a memory and a processor coupled to each other, wherein the memory stores program data, and the processor is used to execute the program data to implement any step of any of the above-mentioned data processing methods.
[0008] In a fourth aspect, the present application provides a computer-readable storage medium, which stores program data that can be executed by a processor, and the program data is used to implement any step of the above-mentioned data processing method.
[0009] The above scheme obtains the first encrypted data sent by the application end through the server end. The first encrypted data is obtained by the application end encrypting the original data using the first key. Then, the first encrypted data is decrypted using the second key to obtain the decrypted data. The detection is performed based on the decrypted data to determine the data detection result. Since the second key is related to the security level corresponding to the application end, the security level is determined using the usage-related data of the application end. The security level can be dynamically determined according to the usage-related data of the application end, and then the corresponding second key can be dynamically determined to decrypt the first encrypted data. This can adapt to data processing in various application scenarios and improve the security of data processing.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of this application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be derived from these drawings without inventive effort. Among them:
[0012] Figure 1 This is a schematic diagram of the structure of an embodiment of a data processing system of the present application;
[0013] Figure 2 This is a flowchart of the first embodiment of the data processing method of this application;
[0014] Figure 3 This application Figure 2 A schematic flow chart of an embodiment before step S11 or step S12;
[0015] Figure 4 This is a flow chart of the second embodiment of the data processing method of this application;
[0016] Figure 5 This is a flowchart of the third embodiment of the data processing method of this application;
[0017] Figure 6 This is a schematic structural diagram of an embodiment of a computer device of the present application;
[0018] Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] The terms "first" and "second" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0021] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0022] The term "and / or" in this article is simply a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0023] This application provides the following embodiments, and each embodiment is described in detail below.
[0024] See also Figure 1 , Figure 11 is a schematic diagram of an embodiment of a data processing system of the present application. The data security management system 10 includes a server 11, an application 12, a key 13, and / or a device 14. Each component can be communicatively connected.
[0025] Device 14 may be a smart device that collects data from a target object and obtains collected data. Device 14 may be connected to application 12. For example, device 14 may include a wearable device that collects physiological data from the target object using various sensors and transmits the collected data to application 12. For example, the collected data may be transmitted to application 12 corresponding to the target object using near-field communication technologies such as Bluetooth.
[0026] The application end 12, which may include a mobile terminal, an application (APP), etc., can receive the collected data sent by the device end 14. Then, threshold data for detection can be set for the collected data. The collected data and the threshold data are encrypted using a first key to obtain first encrypted data. The first encrypted data can then be uploaded to the server end 11.
[0027] The server 11 can store the first encrypted data and decrypt the first encrypted data using the second key to perform data detection, thereby providing data detection services to the application 12. Optionally, the application 12 can be a cloud service cluster that includes a plurality of servers, each of which can hold a portion of the key and can share the key to decrypt the first encrypted data, perform data detection, and the like.
[0028] Key terminal 13 may be a key center. Key terminal 13 may be configured to generate a first key and a second key, and send the first key to application terminal 12 and the second key to server terminal 11. The first key is an encryption key, and the second key is a decryption key. For example, the first key may be a public key, and the second key may be a private key. Optionally, key terminal 13 may split the second key into several private keys, each of which may be sent separately to several servers of server terminal 11.
[0029] Optionally, the server end 11 can also obtain usage-related data of the application end 12. The usage-related data can represent the relevant usage data of the target object. The security level, that is, the security situation of the use of the application end 12 or the target object, can be determined based on the usage-related data of the application end 12. Then, the security level can be sent to the key end 13. Optionally, the key end 13 can generate a corresponding first key and a second key based on the security level. Optionally, the key end 13 can split the second key (such as a private key) according to the security level to obtain several private keys of corresponding security levels. Optionally, different security levels can correspond to different key decryption difficulty coefficients. For specific implementation methods, please refer to the description of the following embodiments.
[0030] See also Figure 2 , Figure 2 This is a flow chart of the first embodiment of the data processing method of this application. At least some of the steps of this embodiment can be performed by the above-mentioned server. The method may include the following steps:
[0031] S11: The server obtains first encrypted data sent by the application, where the first encrypted data is obtained by the application encrypting original data using a first key.
[0032] The application end can receive the first key sent by the key end, encrypt the original data using the first key, and obtain first encrypted data. Then, the first encrypted data is transmitted to the server end, so that the server end receives and obtains the first encrypted data.
[0033] In some embodiments, the first encrypted data includes collected encrypted data E(T) and threshold encrypted data E(H). The original data includes collected data and threshold data. The threshold data is data used to detect the collected data. For example, the threshold data can be reference data used to detect the collected data. The collected encrypted data and the threshold encrypted data are obtained by encrypting the collected data and the threshold data, respectively, using the first key.
[0034] The device side can collect data from the target object to obtain collected data. The device side then transmits the collected data to the application side, which can determine threshold data based on the type of collected data and other conditions. Optionally, the collected data can be analyzed using a threshold model to obtain threshold data. Optionally, the threshold data can be obtained in response to threshold information input by the target object on the application side for the collected data. The threshold data can represent a threshold range, such as a data range for abnormal conditions, a data range for normal conditions, or a data range of different degrees. This application does not limit the threshold range.
[0035] For example, using a wearable device as an example, the wearable device collects the physiological data of the target subject through various sensors and sends the physiological data to the target subject's application end, such as a mobile phone app, through near-field communication technologies such as Bluetooth communication. The application end can then receive the threshold data set by the target subject. For example, blood sugar greater than 27.0mmol / L, body temperature greater than 38°C, diastolic blood pressure greater than 80mmHg, heart rate greater than 100 beats / minute, etc. can be used as threshold data for abnormal conditions. In this way, the target subject can be prompted in abnormal conditions.
[0036] Optionally, the application encrypts the collected data and the threshold data to obtain collected encrypted data and threshold encrypted data, that is, first encrypted data. The first encrypted data is transmitted to the server. Optionally, the application can encrypt the collected data to obtain collected encrypted data and then transmit it to the server. Then, the application encrypts the threshold data to obtain threshold encrypted data and then transmits the threshold encrypted data to the server. This application does not limit the transmission method of the first encrypted data.
[0037] In some embodiments, the application end may use a preset encryption algorithm to encrypt the original data using a first key to obtain first encrypted data. Exemplarily, the preset encryption algorithm may include DSA (Digital Signature Algorithm), ECC (Elliptic Curve Cryptography), DT-PKC (Distributed Two-trapdoor Public Key Cryptosystem, multi-key homomorphic encryption scheme), etc. The following description of this application takes the preset encryption algorithm including DT-PKC as an example, and this application does not limit the preset encryption algorithm.
[0038] The key end can use the DT-PKC algorithm to generate a first key (such as a public key) and a second key (such as a private key). Optionally, the second key can contain several subkeys. The key end can use the DT-PKC private key splitting algorithm to divide the main private key into n sub-private keys based on the DT-PKC private key splitting feature, thereby obtaining n subkeys, where n is an integer greater than 1. Then, the key end can send the first key pk0 to the application end, and send the n subkeys to the n servers {CS1, CS2, ···, CS n Then, the application uses the first key pk0 of DT-PKC to encrypt the collected data and the threshold data respectively, obtaining the collected encrypted data E(T) and the threshold encrypted data E(H), that is, obtaining the first encrypted data, and transmits the first encrypted data to the server (such as CS1).
[0039] In some embodiments, before step S11 or step S12, the server may first obtain the first key and / or the second key. Figure 3 , which may specifically include the following steps:
[0040] S111: Determine the security level using the usage-related data of the application end.
[0041] The server can obtain usage-related data from the application, such as historical usage data. When the application sends relevant information (such as first encrypted data, detection request, etc.) to the server, the server can obtain usage-related data based on the relevant information sent. Alternatively, if the application previously sent first encrypted data to the server, the server can obtain historical usage-related data based on the relevant information sent with the first encrypted data. Thus, the security level is determined based on the information.
[0042] Optionally, the usage-related data includes at least one of the following: representative location data, application identification, application usage data, and network data. Exemplarily, the usage-related data includes the geographic location of the target object, the identification code of the application end, the network IP (Internet Protocol) of the application end, access behavior, etc., which is not limited in this application.
[0043] Then, a risk analysis is performed based on the application-side usage data to determine the security level. The security level can represent the security risk of the application. The security level can be categorized into different security levels, such as low risk, medium risk, or high risk. The security level can be represented by a numerical value, such as a number between 1 and 10, where the higher the value, the higher the security. This application does not impose any restrictions on this.
[0044] Optionally, a security detection model can be used to process the usage-related data of the application end to obtain a security level. The security detection model can be a machine learning model that can be pre-trained with sample data to obtain the security detection model.
[0045] Optionally, when the security level is first obtained, it can be a preset level, such as a medium risk level, etc. During use, the use-related data of the application end can be continuously obtained, the security level can be periodically determined, and the security level can be updated to re-determine a new second key.
[0046] S112: Determine a key decryption difficulty coefficient using the security level, and obtain a first key and a second key based on the key decryption difficulty coefficient, where the second key is related to the security level.
[0047] Different security levels may correspond to different key decryption difficulty coefficients. The key decryption difficulty coefficient may represent the number of subkeys required for decryption, the number of servers required for decryption, the complexity of the decryption algorithm, etc., and this application does not impose any restrictions on this. For example, the higher the security level, the smaller the corresponding key decryption difficulty coefficient. The corresponding key decryption difficulty coefficient can be determined based on the current security level, and the first key and the second key can be obtained based on the key decryption difficulty coefficient, where the second key is related to the security level.
[0048] In some embodiments, the decryption difficulty coefficient includes a key threshold value. The key threshold value may represent the number of subkeys from which a master key is split, or the key threshold value may represent the number of subkeys required to decrypt and recover the master key, or the number of servers required by the server to decrypt and recover the master key. This application does not impose any restrictions on this.
[0049] For example, server CS1 dynamically categorizes target objects into different risk groups, or security levels, based on usage-related data transmitted from the application. Different security levels can correspond to different levels of key thresholds. For example, for high-risk scenarios, the key threshold can be increased, such as splitting a master key into four subkeys, requiring the collaboration of four servers to recover the master key. For low-risk scenarios, a relatively small key threshold can be used, such as splitting a master key into three subkeys, requiring the collaboration of three servers to recover the master key.
[0050] After determining the key threshold, the server can send a key distribution request with a security level corresponding to the key threshold to the key client. Upon receiving the key distribution request, the key client can split the master key based on the key threshold to obtain multiple subkeys. The server can include multiple servers, and the key client can send each subkey to the multiple servers corresponding to the server. Each server receives the subkey sent by the key client, so that each server receives a subkey.
[0051] In some embodiments, the key end may first generate a master key of the first key and the second key. Then, the master key is split based on the key threshold value to obtain a number of subkeys. Exemplarily, the key end calls the DT-PKC key generation algorithm KeyGen() to generate the first key (such as a public key) and the master key (such as a strong private key or a master private key). The key end may use the DT-PKC key splitting algorithm based on the private key splitting characteristics of DT-PKC and the key threshold value to divide the master key into n parts of private keys (i.e., n subkeys), where n is an integer and the n subkeys can be represented as SK i (i=1,2,···,n). Then, the first key is sent to the application end, and each subkey SK i(i=1,2,···,n) is sent to the corresponding server CS i (i=1,2,···,n). Through the above method, the key end can allocate split private keys with different key threshold values to target objects with different security levels according to the security detection model deployed on the server.
[0052] Optionally, a key splitting algorithm may be used to split the master key. The expression corresponding to the key splitting algorithm (such as dividing into n subkeys) is as follows:
[0053] λ+λ+···+λ≡0modλ and λ+λ+···+λ≡1mod N 2 ;
[0054] 12n12n
[0055] Where λ represents the master key SK, and N represents the prime number product.
[0056] The Chinese remainder theorem (Sun Tzu's theorem) is used to solve the above expression and we can obtain λ1=SK1,···,λ n =SK n , that is, n sub-keys are obtained.
[0057] For the steps of the above embodiment, the server includes multiple servers {CS1, CS2···, CS n}, n is an integer. Each server has storage and computing capabilities. The servers on the server side can be divided into a first server and a second server. Among the servers, server CS1 can be used as the first server and the other servers can be used as the second servers. Optionally, the first server CS1 can be used to store the first encrypted data of the smart device. n} respectively hold the decrypted subkey SK i , can jointly provide data detection services for the target objects on the application side.
[0058] Optionally, the server can obtain usage-related data of the application in real time, dynamically determine the security level, and dynamically determine the second key based on the security level, so that the second key with different key thresholds can be dynamically adjusted according to different security levels, thereby improving data security.
[0059] Continue reading Figure 1 After the above steps, the following steps may also be included:
[0060] S12: Decrypt the first encrypted data using the second key to obtain decrypted data; wherein the second key is related to the security level corresponding to the application end, and the security level is determined using usage-related data of the application end.
[0061] After receiving the first encrypted data sent by the application, the server can use the second key to decrypt the first encrypted data to obtain decrypted data.
[0062] S13: Perform detection based on the decrypted data and determine the data detection result.
[0063] The server can perform data detection services based on the decrypted data and will prompt the application when an abnormality is detected.
[0064] Optionally, in the above steps S12 to S13, after the first server CS1 receives the collected encrypted data E(T) and the threshold encrypted data E(H), it can cooperate with other second servers {CS2, ···, CS n} jointly decrypt the first encrypted data (i.e., the collected encrypted data E(T) and the threshold encrypted data E(H)) to obtain the decrypted data, and jointly provide a data detection service for the decrypted data. Among them, the first server CS1 is used to store the first encrypted data. Therefore, it is necessary to control the key authority of the first server. A part of the subkey can be allocated to the first server, such as only allocating the subkey SK1 to decrypt a part of the ciphertext. The second server {CS2, ···, CS n} can provide ciphertext detection services and assign the i-th part of the subkey SK to each second server i .
[0065] The above scheme obtains the first encrypted data sent by the application end through the server end. The first encrypted data is obtained by the application end using the first key to encrypt the original data. Then, the first encrypted data is decrypted using the second key to obtain the decrypted data. The detection is performed based on the decrypted data to determine the data detection result. Since the second key is related to the security level corresponding to the application end, the security level is determined using the usage-related data of the application end. The security level can be dynamically determined based on the usage-related data of the application end. The second key (key threshold value) is dynamically adjusted according to different security levels, which effectively improves the key's anti-attack ability. Then, the corresponding second key is dynamically determined to decrypt the first encrypted data. This can adapt to data processing in various application scenarios and improve the security of data processing.
[0066] In some embodiments, steps S12 and S13 of the above embodiment can be further expanded. Using a ciphertext detection protocol, multiple servers collaborate to perform data detection, comparing the collected encrypted data with the threshold encrypted data without exposing the plaintext, to obtain a data detection result. For details, please refer to the following embodiments.
[0067] See also Figure 4 , Figure 4 This is a flow chart of the second embodiment of the data processing method of this application. At least some of the steps of this embodiment can be performed by the above-mentioned server. The method may include the following steps:
[0068] S21: The first server encrypts the first encrypted data using random parameters to obtain second encrypted data.
[0069] Optionally, step S12 of the above embodiment may include steps S21 to S23.
[0070] In this embodiment, the decryption difficulty coefficient may include a key threshold value, which may represent the number of subkeys to be split. Each server on the service end may correspond to at least some of the subkeys. For example, the second key may include multiple subkeys, with each server corresponding to a subkey. In other words, the first server and multiple second servers each correspond to a subkey.
[0071] The first server CS1 stores the first encrypted data (collected encrypted data E(T) and threshold encrypted data E(H)) and subkey SK1, and each second server stores the corresponding subkey (SK2~SK n ). For example, the encrypted data collected can be recorded as Threshold encrypted data can be recorded as
[0072] The first server CS1 may determine a random parameter, and then use the random parameter to encrypt the first encrypted data, for example, by performing homomorphic encryption using DT-PKC to obtain second encrypted data.
[0073] In some embodiments, the original data may include collected data T and threshold data H. The threshold data is used to detect the collected data. For example, the threshold data may indicate reference data indicating whether the collected data corresponds to a normal or abnormal situation. The first encrypted data includes collected encrypted data E(T) and threshold encrypted data E(H). The collected encrypted data E(T) is obtained by encrypting the collected data T using the first key pk0, and the threshold encrypted data E(H) is obtained by encrypting the threshold data H using the first key pk0.
[0074] The first server CS1 obtains random parameters. The random parameters may include a security parameter s, a first detection parameter r1, and a second detection parameter r2. The security parameter s may represent a random number within a first numerical range, for example, security parameter s∈{-1,1}. The first detection parameter r1 and the second detection parameter r2 are random numbers within a second numerical range, for example, r1, r2∈[1,N / 4], where r1>r2>0, and N represents the product of prime numbers. This application does not impose any restrictions on the random parameters.
[0075] The first server CS1 encrypts the collected encrypted data E(T) using the security parameter s and the first detection parameter r1 to obtain the first sub-encrypted data The threshold encrypted data E(H) is encrypted using the security parameter s and the first detection parameter r1 to obtain the second sub-encrypted data The second detection parameter r2 is encrypted using the security parameter s to obtain the third sub-encrypted data The encrypted second encrypted data {X, Y, Z} may include the first sub-encrypted data X, the second sub-encrypted data Y and the third sub-encrypted data Z.
[0076] S22: The second server obtains subkeys that meet the key threshold value and obtains a subkey set.
[0077] The second server may obtain subkeys that meet the key threshold value, thereby obtaining a plurality of subkeys, that is, obtaining a subkey set.
[0078] In some embodiments, the first server CS1 sends its subkey SK1 and the second encrypted data {X, Y, Z} to another second server CS2, so that the other second server CS2 sends its subkey SK2, the received subkey SK1, and the second encrypted data {X, Y, Z} to other second servers (such as CS3, CS4, ..., CS5, etc.) in sequence. n ), repeat this process until the key threshold is met, and the second server that finally receives the subkey corresponding to the server that meets the key threshold, that is, receives the subkey set (SK1, ···, SK n ) and the second encrypted data {X,Y,Z}.
[0079] In some embodiments, the first server CS1 sends its subkey SK1 to another second server CS2, so that the other second server CS2 sends its subkey SK2 and the received subkey SK1 to other second servers (such as CS3, CS4, . . . , CS5, etc.) in sequence. n ), repeat this process until the key threshold is met, and the second server that finally receives the subkey corresponding to the server that meets the key threshold, that is, receives the subkey set (SK1, ···, SK n ). Then, the first server sends the second encrypted data {X, Y, Z} to the second server for decryption.
[0080] S23: The second server decrypts the second encrypted data using the subkey set to obtain decrypted data.
[0081] Optionally, the second server performs key recovery on the subkey set to obtain a master key, and then uses the master key to decrypt the second encrypted data to obtain decrypted data.
[0082] Optionally, the second server may use several subkeys included in the subkey set to decrypt the second encrypted data in sequence to obtain decrypted data. For example, the second encrypted data may be decrypted using subkey SK1 to obtain the first portion of decrypted data, and then the first portion of decrypted data may be decrypted using subkey SK2 to obtain the second portion of decrypted data. Similarly, subkey SK n Decryption is performed to finally obtain the decrypted data.
[0083] Optionally, the second server may use several subkeys included in the subkey set to simultaneously decrypt the second encrypted data to obtain decrypted data.
[0084] Exemplarily, the following description will be made by taking as an example the key recovery of the subkey set to obtain the master key, and the use of the master key to decrypt the second encrypted data to obtain the decrypted data.
[0085] The second server receives the subkey set (SK1, ···, SK n ) and the second encrypted data {X, Y, Z}. Then, the encrypted data can be divided into two parts according to the key splitting algorithm (such as λ1+λ2+···+λ n ≡0modλ andλ1+λ2+···+λ n ≡1mod N 2 ), based on the Chinese remainder theorem for the subkey set (SK1,···,SK n ) to recover the key and obtain the decrypted master key λ.
[0086] The second server may use the master key λ to decrypt the second encrypted data {X, Y, Z} to obtain corresponding decrypted data.
[0087] Optionally, the decrypted data may include first sub-decrypted data sr1T, second sub-decrypted data sr1H and third sub-decrypted data sr2. The first sub-decrypted data sr1T is the first sub-decrypted data sr1H encrypted using the master key. The second sub-decrypted data sr1H is obtained by decrypting the second sub-encrypted data using the master key. The third sub-decrypted data sr2 is obtained by decrypting the third sub-encrypted data using the master key. Among them, since the random parameters (s, r1, r2) are obtained by the first server CS1, the second server (such as CS3, CS4, ···, CS n) does not know the random parameters, and even if the master key is recovered, the original data (collected data T and threshold data H) cannot be retrieved. The first server CS1 cannot obtain the master key, nor can it obtain the original data (collected data T and threshold data H). Therefore, each server cannot obtain the plaintext data, which can improve the security of data storage and data detection.
[0088] Optionally, step S13 of the above embodiment may include steps 24 to S26.
[0089] S24: The second server performs a ciphertext comparison on the decrypted data to obtain a ciphertext comparison result.
[0090] After the second server decrypts the second encrypted data {X, Y, Z} to obtain decrypted data, it can perform a ciphertext comparison on the decrypted data to obtain a ciphertext comparison result. Since the decrypted data may include the first sub-decrypted data sr1T, the second sub-decrypted data sr1H, and the third sub-decrypted data sr2, based on the decrypted data, it can perform a ciphertext comparison on the collected data T and the threshold data H to obtain a ciphertext comparison result.
[0091] Optionally, the ciphertext comparison result includes a comparison result between the collected data T and the threshold data H, and a relationship between the comparison result and the random parameter. For example, the ciphertext comparison result of this embodiment can be expressed as γ=s(r1(TH)+r2).
[0092] Then, the second server sends the ciphertext comparison result γ to the first server.
[0093] S25: The first server decrypts the ciphertext comparison result using the random parameter to obtain a decrypted comparison result.
[0094] The first server uses the random parameters (s, r1, r2) to decrypt the ciphertext comparison result γ to obtain a decrypted comparison result. For example, the obtained random parameters (s, r1, r2) can be substituted into the ciphertext comparison result γ to perform decryption and obtain the corresponding decrypted comparison result.
[0095] S26: The first server determines the data detection result based on the random parameter and the numerical range corresponding to the decryption comparison result.
[0096] The first server may perform data detection based on the random parameter and the numerical range corresponding to the decryption comparison result to determine the data detection result.
[0097] In some embodiments, in response to the numerical range corresponding to the random parameter and the decryption comparison result meeting a preset abnormality condition, the data detection result is determined to be a detection abnormality, and the detection abnormality indicates that there is an abnormality in the collected data of the application end.
[0098] Optionally, the preset abnormal condition includes that the comparison result representing the acquisition data T and the threshold data H satisfies the abnormal condition. For example, if the comparison result is that the acquisition data T is greater than or equal to the threshold data H, then the abnormal condition is satisfied. For example, if the comparison result is that the acquisition data T is less than the threshold data H, then the abnormal condition is satisfied, etc. The preset abnormal condition of this application is not limited. The comparison result of the acquisition data T and the threshold data H can be determined by using the numerical range of the random parameter and the numerical range of the decrypted comparison result, and then the data detection result can be determined according to the comparison result.
[0099] Optionally, the random parameter at least includes the security parameter s. When the random parameter s = 1, if the decrypted comparison result γ>0, then it is determined that the comparison result is that the acquisition data T is greater than or equal to the threshold data H. Otherwise, it is determined that the comparison result is that the acquisition data T is less than the threshold data H. When the random parameter s = -1, if the decrypted comparison result γ>0, then it is determined that the comparison result is that the acquisition data T is less than the threshold data H. Otherwise, it is determined that the comparison result is that the acquisition data T is greater than or equal to the threshold data H.
[0100] If the comparison result representing the acquisition data T and the threshold data H satisfies the abnormal condition, then it is determined that the data detection result is detection anomaly, and the detection anomaly indicates that there is an abnormal situation in the acquisition data of the application side. Exemplarily, for the comparison result that the blood glucose data is greater than the blood glucose threshold, that is, E(T)≥E(H)≡T≥H, it can be determined that the data detection result is detection anomaly.
[0101] Optionally, the server (such as the first server) can send the relevant information with the data detection result of detection anomaly to the application side to prompt the target object that there is an abnormal situation in the acquisition data.
[0102] In some embodiments, the correctness verification of the random parameter and the decrypted comparison result can also be performed. Exemplarily, the correctness verification is as follows:
[0103] When the security parameter s = 1, the decrypted comparison result γ = s(r1(T - H)+r₂)=r1(T - H)+r₂. Since the random parameters r1>r2>0 and both T and H are integers, the decrypted comparison result γ>0≡T≥H, and the decrypted comparison result γ<0≡T<H.
[0104] When the security parameter s = -1, the decrypted comparison result γ = s(r1(T - H)+r₂)=-(r1(T - H)+r₂). Since the random parameters r1>r2>0 and both T and H are integers, the decrypted comparison result γ>0≡T<H, and the decrypted comparison result γ<0≡T≥H.
[0105] The above scheme can be based on the private key decomposition mechanism and homomorphic properties of DT-PKC. By distributing part of the private key (each subkey) to each server, the ciphertext comparison protocol implemented by multiple servers can safely detect the collected data without exposing the plaintext data. In addition, the collected data collected from the device side is encrypted on the application side, and the first encrypted data is stored on the server side, which can improve the security of the original data. In addition, based on the encryption from the application side to the server side, the data detection task can be deployed on the server side, reducing the local operation and storage of the application side.
[0106] For example, the above-mentioned DT-PKC encryption scheme is described in detail below using an example. In this embodiment, the second key may include two subkeys, that is, the master key λ may be split into two subkeys SK1 and SK2. The details are as follows:
[0107] The key end can use a key generation algorithm to generate a first key (such as a public key) and a second key (such as a private key). The key generation algorithm can be KeyGen(): input a security parameter k and two large prime numbers p and q, where l(p) = l(q) = k, calculate the prime product N = pq, λ = lcm(p-1,q-1) / 2. Define the function L(x) = (x-1) / N, select a generator g with an order of (p-1,q-1) / 2, and then randomly select a random number θ i ∈[1,N / 4] and calculate for the i-th party Finally there is a public key pk i =(N,g,h i ), its corresponding sub-private key sk i =θ i , and the master private key SK = λ.
[0108] The key end can use a key splitting algorithm to split the master private key based on the key threshold value to obtain several sub-keys, such as two sub-keys SK1 and SK2. Among them, the key splitting algorithm can include a master private key decomposition algorithm, such as the KeyS() algorithm. In order to solve the authorization problem in a multi-key environment, the master private key SK=λ can be randomly decomposed into two partial private keys, namely sub-keys SK1=λ1 and SK2=λ2, which is valid only if λ1+λ2≡0modλ and λ1+λ2≡1mod N 2 Established at the same time.
[0109] The application end can use the first key to encrypt the plaintext m of the original data to obtain the first encrypted data. The encryption algorithm -Enc() can be used for encryption, and the integer plaintext m∈Z of the original data can be input. N and public key pk i, select a random number r∈[1,N / 4] and encrypt the calculated output ciphertext, which is the first encrypted data, as follows:
[0110]
[0111] The server can use several subkeys and a master key to decrypt the first encrypted data.
[0112] Optionally, the decryption algorithm using each subkey can be WeakDec(), which is a subkey decryption algorithm. Can be obtained through the child private key sk i The decrypted plaintext (decrypted data) is:
[0113]
[0114] Optionally, the master key decryption algorithm - StrDec() can be used to decrypt any ciphertext. Both can be decrypted using the master private key SK:
[0115]
[0116] Then, the decrypted plaintext (decrypted data) can be expressed as:
[0117]
[0118] Alternatively, a partial decryption algorithm can be used to decrypt the subkeys in sequence. For example, the second key contains subkeys SK1 and SK2, which can be decrypted in sequence to obtain decrypted data. This is as follows:
[0119] Partial decryption algorithm - PartDec1(): for ciphertext The partial private key SK1=λ1 can be used to decrypt the calculation and obtain the first part of the decrypted data:
[0120]
[0121] Partial decryption algorithm - PartDec2(): Get the first part of the decrypted data from the partial decryption algorithm through the private key SK1 = λ1 Then use the private key SK2 to decrypt and get the original plaintext (decrypted data) in The calculation is as follows:
[0122]
[0123] In addition, given the plaintext data m1,m2∈Z NWhen the encryption is performed with the same first key pk, DT-PKC satisfies the additive homomorphic property, and the corresponding encrypted data satisfies the following:
[0124]
[0125] The corresponding encrypted data satisfies the multiplication homomorphic property, as follows:
[0126]
[0127] Therefore, the first encrypted data can be re-encrypted based on the multiplicative homomorphic property and / or the additive homomorphic property, decrypted to obtain decrypted data, and / or the ciphertext comparison result can be calculated based on the decrypted data, and this application does not impose any restrictions on this process.
[0128] See also Figure 5 , Figure 5 This is a flow chart of the third embodiment of the data processing method of this application. At least some of the steps of this embodiment can be performed by the above-mentioned application end. The method may include the following steps:
[0129] S31: The application end encrypts the original data using the first key to obtain first encrypted data.
[0130] The device can collect data from a target object to obtain collected data. This collected data is then sent to the application corresponding to the target object. The application receives the collected data from the device. Then, threshold data for detection can be set for the collected data. The application can receive a first key from the key end and encrypt the collected data and threshold data using the first key to obtain first encrypted data. This first encrypted data can then be uploaded to the server.
[0131] S32: Send the first encrypted data to the server, so that the server uses the second key to decrypt the first encrypted data to obtain decrypted data; perform detection based on the decrypted data to determine the data detection result; wherein, the second key is related to the security level corresponding to the application end, and the security level is determined using the usage-related data of the application end.
[0132] The application side sends the first encrypted data to the server side, so that the server side uses the second key to decrypt the first encrypted data to obtain decrypted data; based on the decrypted data, detection is performed to determine the data detection result; wherein, the second key is related to the security level corresponding to the application side, and the security level is determined using the usage-related data of the application side.
[0133] When the data detection result of the server (such as the first server) is abnormal, the data detection result can be sent to the application end. The application end receives a prompt message that the data detection result is abnormal to prompt that there is an abnormality in the collected data.
[0134] Optionally, the application end can send the application end's usage-related data to the server end, so that the server end uses the application end's usage-related data to determine the security level, and then determines the corresponding second key according to the security level for decrypting the first encrypted data.
[0135] The specific implementation process of this embodiment can refer to the implementation process related to the application end in the above embodiment, and this application will not go into details here.
[0136] It is understandable that in the above method of the specific implementation method, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0137] It is understood that the data processing method in this application can be executed by a computer device, which can be any device with processing capabilities, such as a mobile device, a computer, a server, etc., and this application does not limit this. In some possible implementations, the data processing method can be implemented by a processor calling program data stored in a memory.
[0138] For the above embodiment, this application provides a computer device, see Figure 6 , Figure 6 1 is a schematic diagram of the structure of an embodiment of a computer device of the present application. The computer device 40 includes a memory 41 and a processor 42, wherein the memory 41 and the processor 42 are coupled to each other, the memory 41 stores program data, and the processor 42 is used to execute the program data to implement the steps of any embodiment of the data processing method described above.
[0139] In this embodiment, the processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The processor 42 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor, or the processor 42 may be any conventional processor.
[0140] The method of the above embodiment can be implemented in the form of a computer program, so this application proposes a computer readable storage medium, please refer to Figure 7 , Figure 7 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium 50 stores program data 51 that can be executed by a processor. The program data 51 can be executed by the processor to implement the steps of any embodiment of the above-mentioned data processing method.
[0141] The computer-readable storage medium 50 in this embodiment can be a medium that can store program data 51, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or it can also be a server that stores the program data 51. The server can send the stored program data 51 to other devices for execution, or it can also execute the stored program data 51 itself.
[0142] In some embodiments, the functions or modules included in the device provided in the above embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, this application will not go into details here.
[0143] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects thereof can be referenced to each other. For the sake of brevity, this application will not repeat them here.
[0144] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0145] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0146] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium, which is a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various embodiments of the present application.
[0148] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device. They can be concentrated on a single computing device or distributed across a network consisting of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a computer-readable storage medium and executed by the computing device, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0149] The above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: The server obtains first encrypted data sent by the application, wherein the first encrypted data is obtained by the application encrypting original data using a first key; Decrypting the first encrypted data using a second key to obtain decrypted data; wherein the second key is related to a security level corresponding to the application end, and the security level is determined using usage-related data of the application end; A detection is performed based on the decrypted data to determine a data detection result.
2. The method according to claim 1, characterized in that Before obtaining the first encrypted data sent by the application end, the method includes: Determining a security level using usage-related data of the application end; A key decryption difficulty coefficient is determined using the security level to obtain a first key and a second key based on the key decryption difficulty coefficient, wherein the second key is related to the security level.
3. The method according to claim 2, characterized in that The decryption difficulty coefficient includes a key threshold value; The determining the key decryption difficulty coefficient by using the security level, and obtaining the first key and the second key based on the key decryption difficulty coefficient, includes: Sending a key distribution request with a key threshold value corresponding to the security level to a key end, so that the key end splits a master key based on the key threshold value to obtain a plurality of subkeys; Receive the subkey sent by the key end.
4. The method according to claim 2, characterized in that Determining the security level by using the usage-related data of the application terminal includes: The usage-related data of the application end is processed using a security detection model to obtain a security level; wherein the usage-related data includes at least one of the following: representative location data, application identification, application usage data, and network data.
5. The method according to claim 1, wherein The server includes a first server and several second servers; the decryption difficulty coefficient includes a key threshold value, the second key includes several subkeys, and each server corresponds to a subkey; Decrypting the first encrypted data using the second key to obtain decrypted data includes: The first server encrypts the first encrypted data using random parameters to obtain second encrypted data; The second server obtains subkeys that meet the key threshold value and obtains a subkey set; The second server decrypts the second encrypted data using the subkey set to obtain decrypted data.
6. The method according to claim 5, characterized in that The first encrypted data includes collected encrypted data and threshold encrypted data, the original data includes collected data and threshold data, the collected encrypted data and threshold encrypted data are obtained by encrypting the collected data and threshold data respectively using the first key, and the threshold data is used to detect the collected data; The first server encrypts the first encrypted data using a random parameter to obtain second encrypted data, including: Encrypting the collected encrypted data using the security parameter and the first detection parameter to obtain first sub-encrypted data; encrypting the threshold encrypted data using the security parameter and the first detection parameter to obtain second sub-encrypted data; and encrypting the second detection parameter using the security parameter to obtain third sub-encrypted data. And / or, the second server obtains subkeys that meet the key threshold value to obtain a subkey set, including: The first server sends its subkey to another second server, so that the other second server sends its subkey and received subkey to other second servers in sequence until the key threshold is met. The second server that finally receives the subkey corresponds to the server that meets the key threshold, and obtains a subkey set.
7. The method according to claim 5, characterized in that The detecting the decrypted data to obtain a data detection result includes: The second server performs ciphertext comparison on the decrypted data to obtain a ciphertext comparison result; The first server decrypts the ciphertext comparison result using a random parameter to obtain a decrypted comparison result; The first server determines the data detection result based on the random parameter and the numerical range corresponding to the decryption comparison result.
8. The method according to claim 7, characterized in that The determining of the data detection result based on the numerical range corresponding to the random parameter and the decryption comparison result includes: In response to the numerical range corresponding to the random parameter and the decryption comparison result meeting a preset abnormality condition, determining that the data detection result is a detection abnormality, wherein the detection abnormality indicates that an abnormality exists in the collected data of the application end; The data detection result is related information of the detection anomaly and is sent to the application end.
9. A data processing method, characterized in that: include: The application end encrypts the original data using the first key to obtain first encrypted data; Sending the first encrypted data to a server, so that the server decrypts the first encrypted data using a second key to obtain decrypted data; Detection is performed based on the decrypted data to determine a data detection result; wherein, the second key is related to the security level corresponding to the application end, and the security level is determined using usage-related data of the application end.
10. A computer device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program data, and the processor is configured to execute the program data to implement the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that Program data that can be executed by a processor is stored, and the program data is used to implement the steps of the method according to any one of claims 1 to 9.