Data processing method and device, smart home equipment, system and storage medium

By adding noise to user data from smart home devices and performing homomorphic encryption, ciphertext user data is generated, solving the privacy leakage problem caused by user data being leaked on servers, and realizing secure processing and efficient analysis of user data.

CN120896684APending Publication Date: 2025-11-04GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511026820.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Smart home devices transmit collected user data to servers for analysis, resulting in massive amounts of user data stored on the servers. If this user data is leaked, it will lead to the leakage of user privacy and pose a security risk.

Method used

By adding noise to user data to generate perturbed user data, and then encrypting it using a homomorphic encryption algorithm, ciphertext user data is generated. This allows the server to directly process the data, ensuring that user data always exists in ciphertext form during transmission, storage, and processing, thus preventing the leakage of plaintext user data.

Benefits of technology

It effectively reduces the identifiability of user data, prevents the illegal use of user privacy, improves the security of user data, reduces the risk of privacy leakage, and achieves efficient data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896684A_ABST
    Figure CN120896684A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, smart home equipment, a system and a storage medium, applied to the smart home equipment, the method comprises the following steps: collecting user data; adding noise data to the user data to obtain disturbed user data; encrypting the disturbance user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data supports homomorphic operation; sending the ciphertext user data to a server; and sending the ciphertext user data to the server, so that the server directly performs data processing on the ciphertext user data under the condition of receiving the ciphertext user data to obtain a processing result. Therefore, the security of the user data can be improved and the risk of user privacy disclosure can be reduced while efficient processing of the user data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of smart home, and in particular to a data processing method and device, a smart home device, a system and a storage medium. BACKGROUND

[0002] With the rapid development of Internet of Things technology, smart home devices have been deeply integrated into daily life. By continuously collecting user behavior data (such as home appliance switch time, indoor activity trajectory, work and rest habits, etc.), they provide the core basis for home automation strategy optimization - for example, adjusting the standby mode of the device based on user usage frequency to achieve energy saving, or triggering cross-device linkage (such as automatically turning on the living room lights when the door lock is opened) by analyzing the activity trajectory.

[0003] Currently, most smart home systems use a "terminal collection-cloud centralized processing" architecture, which collects user data through smart home devices and then uploads the user data to the server for analysis and operation.

[0004] However, these behavior data often contain a large amount of sensitive information, directly reflecting the user's life habits and privacy characteristics. This method transmits user data to the server for analysis, which results in the storage of massive user data in the server. This user data is the user's private data, and once it is leaked, it will result in the user's privacy being leaked, leading to the illegal use of the user's privacy and posing a security risk. SUMMARY

[0005] The present application provides a data processing method, device, smart home device, system and storage medium to solve the technical problem that smart home devices transmit collected user data to the server for analysis, resulting in the existence of massive user data in the server, and once the user data is leaked, it will result in the user's privacy being leaked, leading to the illegal use of the user's privacy and posing a security risk.

[0006] In a first aspect, the present application provides a data processing method applied to a smart home device, the method comprising:

[0007] collecting user data;

[0008] adding noise data to the user data to obtain perturbed user data;

[0009] encrypting the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data supports homomorphic operation;

[0010] sending the ciphertext user data to a server, so that the server directly processes the ciphertext user data to obtain a processing result upon receiving the ciphertext user data.

[0011] As an optional implementation manner, the user data comprises one or more user behavior data, the noise data is added to the user data to obtain the perturbed user data, and the method comprises:

[0012] For each user behavior data, a data feature of the user behavior data is determined;

[0013] According to the data feature, a privacy budget and a sensitivity corresponding to the user behavior data are determined; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change amount of the user behavior data;

[0014] According to the privacy budget and the sensitivity, noise data of the user behavior data is randomly generated;

[0015] The user behavior data and the noise data are subjected to a preset operation to obtain the perturbed user data.

[0016] As an optional implementation manner, the user data comprises one or more user behavior data, the noise data is added to the user data to obtain the perturbed user data, and the method comprises:

[0017] For each user behavior data, a data feature of the user behavior data is determined;

[0018] According to the data feature, a privacy budget and a sensitivity corresponding to the user behavior data are determined; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change amount of the user behavior data;

[0019] According to the privacy budget and the sensitivity of each user behavior data, a covariance matrix is generated;

[0020] The multi-dimensional noise is generated according to the covariance matrix;

[0021] The multi-dimensional noise is superimposed on the user behavior data included in the user data to obtain the perturbed user data.

[0022] As an optional implementation manner, the data feature comprises a privacy level and a data type of the user behavior data;

[0023] The method according to the data feature, the privacy budget and the sensitivity corresponding to the user behavior data comprises:

[0024] According to the privacy level of the user behavior data, a privacy budget of the user behavior data is determined from a first correspondence relationship between a privacy level and a privacy budget pre-constructed; wherein the privacy level is inversely proportional to the privacy budget.

[0025] determining, according to a data type of the user behavior data, whether the user behavior data belongs to continuous data;

[0026] in a case where it is determined that the user behavior data belongs to the continuous data, obtaining a historical maximum change amount of the user behavior data in a preset historical time period, and determining the historical maximum change amount as a sensitivity of the user behavior data;

[0027] in a case where it is determined that the user behavior data belongs to discrete data, setting a sensitivity of the user behavior data as a preset value.

[0028] As an optional implementation manner, the encrypting the perturbed user data according to the preset homomorphic encryption algorithm to obtain ciphertext user data comprises:

[0029] generating, according to a preset key generation method, an encryption key for encrypting the perturbed user data;

[0030] encrypting the perturbed user data by using the encryption key and the preset homomorphic encryption algorithm to obtain the ciphertext user data.

[0031] As an optional implementation manner, the server obtains a processing result by performing data processing on the ciphertext user data in the following manner:

[0032] performing data processing on the ciphertext user data according to a preset aggregation operation to obtain ciphertext processing result.

[0033] As an optional implementation manner, the method further comprises:

[0034] generating a decryption key according to a preset key generation method;

[0035] in a case where the ciphertext processing result sent by the server is received, decrypting the ciphertext processing result according to the decryption key to obtain a first plaintext processing result; wherein, after obtaining the ciphertext processing result, the server sends the ciphertext processing result to the smart home device.

[0036] As an optional implementation manner, after obtaining the first plaintext processing result, the method further comprises:

[0037] obtaining a control strategy for the smart home device;

[0038] adjusting the control strategy according to the first plaintext processing result to obtain a target control strategy.

[0039] As an optional implementation manner, after generating the decryption key, the method further comprises:

[0040] determining a decryption device, and obtaining a device identifier of the decryption device;

[0041] sending the decryption key to the decryption device, and sending the device identifier to the server;

[0042] The server sends the ciphertext processing result to the decryption device according to the device identifier in a case where the device identifier is received, so that the decryption device decrypts the ciphertext processing result according to the decryption key to obtain a second plaintext processing result.

[0043] In a second aspect, the present application provides a data processing device applied to a smart home device, the device comprising:

[0044] a collection module configured to collect user data;

[0045] a perturbation module configured to add noise data to the user data to obtain perturbed user data;

[0046] an encryption module configured to encrypt the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data supports homomorphic operation;

[0047] a sending module configured to send the ciphertext user data to a server, so that the server directly performs data processing on the ciphertext user data to obtain a processing result in a case where the ciphertext user data is received.

[0048] In a third aspect, the present application provides a smart home device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus; the memory is used to store a computer program; the processor is used to execute the computer program to implement the data processing method of any one of the first aspect.

[0049] In a fourth aspect, the present application provides a data processing system, comprising a smart home device and a server;

[0050] The smart home device is the smart home device of the third aspect, and is used to implement the data processing method of any one of the first aspect and send generated ciphertext user data to the server;

[0051] The server is used to directly perform data processing on the ciphertext user data to obtain a processing result in a case where the server receives the ciphertext user data sent by the smart home device.

[0052] In a fifth aspect, the present application provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data processing method according to any one of the first aspect.

[0053] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: the method provided by the embodiments of the present application first adds noise to user data to obtain disturbed user data, so that the original user data is “blurred”, even if the disturbed user data is accidentally obtained, it is difficult to inversely deduce the real user data, and the “recognizability” of the user data can be reduced from the source, then the disturbed user data is encrypted, and the homomorphic operation capability of the encrypted ciphertext user data is retained, so that the server can directly perform data on the ciphertext user data, thereby ensuring that the user data always exists in the form of ciphertext during transmission, server storage and processing, and the server, attacker or third party cannot directly access the plaintext user data, thereby fundamentally avoiding the privacy leakage problem caused by exposing the plaintext user data to the server in the traditional data processing, and realizing efficient processing of the user data while improving the security of the user data and reducing the risk of user privacy leakage. BRIEF DESCRIPTION OF DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0056] One or more embodiments are exemplarily illustrated by the pictures in the drawings corresponding thereto, and these exemplary illustrations do not constitute a limitation on the embodiments, and the elements with the same reference numerals in the drawings represent similar elements, unless otherwise specified, and the drawings in the drawings do not constitute a proportional limitation.

[0057] Figure 1 A structural schematic diagram of a data processing system provided by the embodiments of the present application;

[0058] Figure 2 An embodiment flowchart of a data processing method provided by the embodiments of the present application;

[0059] Figure 3 An embodiment flowchart of another data processing method provided by the embodiments of the present application;

[0060] Figure 4 An embodiment flow chart of another data processing method provided by an embodiment of the present application is shown in FIG. 6;

[0061] Figure 5 An embodiment flow chart of another data processing method provided by an embodiment of the present application is shown in FIG. 6;

[0062] Figure 6 An embodiment flow chart of another data processing method provided by an embodiment of the present application is shown in FIG. 6;

[0063] Figure 7 An embodiment block diagram of a data processing device provided by an embodiment of the present application is shown in FIG. 7;

[0064] Figure 8 An embodiment structural diagram of a smart home device provided by an embodiment of the present application is shown in FIG. 8;

[0065] Figure 9 An embodiment structural diagram of another data processing system provided by an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION

[0066] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0067] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplification, the components and arrangements of specific examples are described in the following. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to numbers and / or letters in different examples. Such repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or arrangements discussed.

[0068] In order to solve the technical problem that in the prior art, the user data collected by the smart home device is transmitted to the server for analysis, resulting in a large amount of user data existing in the server, and once the user data is leaked, the privacy of the user is leaked, so that the privacy of the user is illegally used, and there is a security risk, the present application provides a data processing method, device, smart home device, system and storage medium, which can first add noise to the user data to obtain disturbed user data, so that the original user data is "blurred", even if the disturbed user data is accidentally obtained, it is also difficult to reversely deduce the real user data, and the "recognizability" of the user data can be reduced from the source, then the disturbed user data is encrypted, and the homomorphic operation ability of the encrypted ciphertext user data is retained, so that the server can directly process the ciphertext user data, so that the user data always exists in the form of ciphertext during transmission, server storage and processing, and the server, attacker or third party cannot directly access the plaintext user data, thereby fundamentally avoiding the privacy leakage problem caused by exposing the plaintext user data to the server in the traditional data processing, realizing efficient processing of the user data while improving the security of the user data and reducing the risk of user privacy leakage.

[0069] In order to facilitate understanding of the data processing method provided by the present application, the data processing system related to the present application will be exemplarily described below.

[0070] Referring to Figure 1 A structural schematic diagram of a data processing system provided by an embodiment of the present application is shown in the figure. Figure 1 As shown in the figure, the data processing system 10 can include a smart home device 11 and a server 12.

[0071] The above-mentioned smart home device 11 refers to a smart home device included in a smart home system, which can be a smart air conditioner, a smart television, a smart refrigerator, a smart lamp, a smart seat, etc., and the type and number of the smart home device are not limited in the embodiments of the present application, Figure 1 In the embodiment, the smart home device 11 is one, and a smart air conditioner is taken as an example for description.

[0072] The above-mentioned server 12 can be one server, or a cluster composed of multiple servers, and the present application does not limit this.

[0073] In the prior art, in order to optimize the control strategy of the smart home device 11, it is generally necessary to collect user data of the user using the smart home device 11, and further in order to improve the analysis ability of the user data, the collected user data is sent to the server 12 for analysis, and then the control strategy of the smart home device 11 is optimized according to the analysis result.

[0074] However, since the user data collected by the smart home device 11 includes a large amount of sensitive information, which can directly reflect the life habits and privacy characteristics of the user, the method transmits the user data to the server for analysis, which leads to the storage of a large amount of user data in the server, and the user data is private data of the user. Once the user data is leaked, the privacy of the user is leaked, the privacy of the user is illegally used, and there is a security risk.

[0075] To this end, the present application provides a data processing method. The method makes the smart home device first add noise to the user data after collecting the user data, to obtain perturbed user data, so that the original user data is "blurred", and even if the perturbed user data is accidentally obtained, it is difficult to deduce the real user data in reverse. The "recognizability" of the user data can be reduced from the source. Then, the perturbed user data is encrypted, and the homomorphic operation ability of the encrypted ciphertext user data is retained, so that the server can directly process the ciphertext user data. Thus, the user data always exists in the form of ciphertext during transmission, server storage and processing, and the server, attacker or third party cannot directly access the plaintext user data. The privacy leakage problem caused by exposing the plaintext user data to the server in the traditional data processing is fundamentally avoided. The security of the user data is improved while ensuring efficient processing of the user data, and the risk of user privacy leakage is reduced.

[0076] The data processing method provided by the present application will be further explained and described in detail with reference to the accompanying drawings and specific embodiments. The embodiments do not constitute a limitation on the embodiments of the present application.

[0077] Referring to Figure 2 An embodiment flowchart of a data processing method provided by an embodiment of the present application is shown. As an embodiment, Figure 2 The flowchart shown can be applied to a smart home device, for example Figure 1 The smart home device 11 shown. As Figure 2 The flowchart can include the following steps:

[0078] Step 201, collecting user data.

[0079] The above-mentioned user data refers to various types of information collected by the smart home device, reflecting the user's living habits, device usage behavior, etc., which has privacy sensitivity, such as the on-off time of the smart home device, the user's behavior trajectory, etc.

[0080] In an embodiment, the above-mentioned user data can be device interaction data of the user and the smart home device.

[0081] Based on this, as an optional implementation manner, the smart home device can acquire operation logs of itself or other smart home devices, and analyze the operation logs to determine control instructions, control parameters, running states, and time stamps of the user received by the smart home device in a historical time period. Then, the control instructions, control parameters, running states, and time stamps can be determined as the device interaction data of the user and the smart home device.

[0082] As another optional implementation manner, the smart home device can acquire voice control instructions of the user to the smart home device through a voice acquisition module, and continuously detect and record the running state of the smart home device in the process of running of the smart home device. Then, the recorded voice control instructions and running state of the smart home device can be determined as the device interaction data of the user and the smart home device.

[0083] As still another optional implementation manner, the smart home device can acquire a device linkage mode set by the user, and analyze the control strategy of the device linkage mode to determine the association rule of the plurality of smart home devices. Then, the association rule can be determined as the device interaction data of the user and the smart home device.

[0084] In another embodiment, the user data can be behavior data of the user in a preset space.

[0085] Based on this, as an optional implementation manner, the smart home device can acquire behavior trajectories of the user through a preset motion sensor at a regular time or in real time, and acquire environmental parameters (such as temperature, humidity, and air quality) of the user through a preset environment detection module. Then, the behavior trajectories and the environmental parameters can be determined as the behavior data of the user in the preset space.

[0086] As another optional implementation manner, the smart home device can acquire feedback data (such as an evaluation on the running of the smart air conditioner) of the user to the smart home device through a user terminal (such as a smart phone). Then, the feedback data can be determined as the behavior data of the user.

[0087] In still another embodiment, the user data can include the device interaction data of the user and the smart home device, and the behavior data of the user in the preset space. For the acquisition method of the device interaction data and the behavior data, reference can be made to the above embodiments, which will not be described herein.

[0088] Step 202, adding noise to the user data to obtain disturbed user data.

[0089] Step 203, encrypting the disturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data supports homomorphic operation.

[0090] The following describes steps 202 and 203:

[0091] The noise data refers to interference information with randomness or a specific distribution added to the user data, which functions to obscure the real features of the user data while not significantly affecting the effectiveness of the overall statistical or processing results of the data.

[0092] The perturbed user data refers to data that obscures the real features of the user data after adding noise data to the user data.

[0093] The homomorphic encryption algorithm refers to a pre-set algorithm for encrypting the perturbed user data, which allows direct specific operations on the ciphertext and the decrypted operation results are consistent with the results of the same operation on the plaintext.

[0094] The ciphertext user data refers to the ciphertext data obtained by encrypting the perturbed user data by the homomorphic encryption algorithm. Since the ciphertext user data is obtained by encrypting the perturbed user data by the homomorphic encryption algorithm, the ciphertext user data supports homomorphic operations. The homomorphic operation capability refers to the characteristic that the homomorphic encryption algorithm allows direct specific operations on the ciphertext user data, and the decrypted operation results are consistent with the results of the same operation on the plaintext.

[0095] In the embodiments of the present application, in order to hide the real features of the user and prevent the leakage of user privacy, the smart home device can first add noise data to the user data to obtain perturbed user data that can hide the real features of the user data after collecting the user data.

[0096] As to how to add noise data to the user data to obtain the perturbed user data, the following Figure 3 and Figure 4 will be described, which will not be described in detail here.

[0097] In an embodiment, in order to further ensure the security of the transmission and processing of the perturbed user data, the smart home device can encrypt the obtained perturbed user data. In order to make the encrypted ciphertext user data have homomorphic operation capability to ensure that the data processing results of the ciphertext user data are consistent with the data processing results of the perturbed user data, the smart home device can encrypt the perturbed user data according to a pre-set homomorphic encryption algorithm to obtain the ciphertext user data.

[0098] As an optional implementation manner, an encryption key for encrypting the perturbed user data can be generated according to a pre-set key generation method. The key generation method can be a pre-set method for generating a key.

[0099] As an example embodiment, when generating the encryption key, two different prime numbers can be randomly obtained, and then a preset operation is performed on the two prime numbers to obtain the encryption key.

[0100] As an embodiment, the product of the two prime numbers can be calculated to obtain a first value. Then, the least common multiple of the two new values obtained by subtracting a preset value from the two prime numbers respectively can be calculated to obtain a second value. Then, the generator of a preset cyclic group can be calculated according to the first value to obtain a third value. Finally, the first value, the second value, and the third value can be calculated according to a preset formula to obtain a fourth value.

[0101] Based on this, the public key can be generated based on the first value and the third value, and the public key is determined as the encryption key, and the private key can be generated based on the second value and the fourth value, and the private key is determined as the decryption key.

[0102] For example, assuming that the prime numbers are p and q, the first value, the second value, the third value, and the fourth value can be determined according to the following formulas (I) respectively:

[0103]

[0104] wherein n is the first value, λ is the second value, g is the third value, and μ is the fourth value. The third value can generally be n+1, that is, g=n+1.

[0105] Based on this, the public key and the private key can be determined by the following formula (II):

[0106]

[0107] wherein pk is the public key and sk is the private key.

[0108] Then, the perturbed user data can be encrypted by the encryption key and a preset homomorphic encryption algorithm to obtain ciphertext user data. The homomorphic encryption algorithm can be a Paillier encryption algorithm or other encryption algorithms, which are not limited by the embodiments of the application.

[0109] Step 204, the ciphertext user data is sent to the server, so that the server directly performs data processing on the ciphertext user data to obtain a processing result when receiving the ciphertext user data.

[0110] The server is configured to receive the ciphertext user data sent by the smart home device and perform data processing on the ciphertext user data. The server can be a server 12 as shown in Figure 1

[0111] ​In the embodiments of the present application, after the smart home device obtains the ciphertext user data by disturbing and encrypting the user data, the smart home device can send the ciphertext user data to the server.

[0112] Based on this, after receiving the ciphertext user data, the server can process the ciphertext user data to obtain a processing result. Since the ciphertext user data is homomorphic up to this point, the processing result obtained by the server by processing the ciphertext user data is consistent with the result of directly processing the user data after decryption. As to how to process the ciphertext user data and how to process the processing result, the following will be described in detail with reference to the flowchart shown in Figure 5

[0113] The technical solution provided by the embodiments of the present application collects user data, adds noise to the user data to obtain disturbed user data, encrypts the disturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data, and sends the ciphertext user data to the server, so that the server directly processes the ciphertext user data to obtain a processing result when receiving the ciphertext user data. This technical solution first adds noise to the user data to obtain disturbed user data, so that the original user data is "blurred", and even if the disturbed user data is accidentally obtained, it is difficult to reversely deduce the real user data, which can reduce the "recognizability" of the user data from the source. Then, the disturbed user data is encrypted, and the homomorphic operation capability of the encrypted ciphertext user data is retained, so that the server can directly process the ciphertext user data, thereby ensuring that the user data always exists in the form of ciphertext during transmission, server storage and processing, and the server, attackers or third parties cannot directly access the plaintext user data, thereby fundamentally avoiding the privacy leakage problem caused by exposing the plaintext user data to the server in traditional data processing, and realizing efficient processing of user data while improving the security of user data and reducing the risk of user privacy leakage.

[0114] Referring to Figure 3 An embodiment flowchart of another data processing method provided by the embodiments of the present application is shown in Figure 3 Figure 2 Based on the flowchart shown in Figure 3

[0115] Step 301: For each type of user behavior data, determine the data characteristics of the user behavior data. ​​​

[0116] The user behavior data refers to single-dimension behavior data in the user data, which can refer to device running data in the device dimension, and can also be user behavior data in the user dimension. Further, the device running data can be further divided into single running dimension and multi-device linkage dimension, and the user behavior data can be further divided into time dimension and behavior dimension, etc. The embodiments of the present application do not limit this.

[0117] The data feature refers to information reflecting the inherent properties or characteristics of each kind of user behavior data, and is the basis for determining the corresponding privacy budget and sensitivity. The data feature can include but is not limited to: privacy level and data type. The privacy level refers to the privacy degree of the user behavior data, and the higher the level, the more private it is. The data type refers to the continuity of the user behavior data, which can be continuous data type and discrete data type.

[0118] In the embodiments of the present application, when the user data includes one or more kinds of user behavior data, in order to ensure that the user behavior data included in the user data is disturbed, thereby concealing the real characteristics of the user behavior data, the smart home device can determine the data feature of each kind of user behavior data.

[0119] As an optional implementation manner, a feature analysis model for analyzing user behavior data can be pre-trained. Based on this, when determining the data feature of each kind of user behavior data, the user behavior data can be input into the feature analysis model to obtain the data feature of the user behavior data output by the feature analysis model.

[0120] As an optional implementation manner, the smart home device can determine the privacy level of each kind of user behavior data, and determine the privacy level as the data feature of the user behavior data.

[0121] As an implementation manner, the user can input the privacy level of each kind of user behavior data through a visual interface, and the smart home device can receive the privacy level of each kind of user behavior data input by the user.

[0122] As another implementation manner, a corresponding relationship between the behavior type (device running, user action trajectory, or association strategy of multiple devices, etc.) of the user behavior data and the privacy level can be pre-constructed. Based on this, the smart home device can determine the behavior type of each kind of user behavior data, and determine the privacy level of each kind of user behavior data from the corresponding relationship according to the behavior type. Then, the privacy level can be determined as the data feature of the user behavior data.

[0123] As another optional implementation, based on this, the smart home device can analyze the continuity of each user behavior data after collecting the user behavior data, so as to determine the data type of the user behavior data. Then, the data type of the obtained user behavior data can be determined as the data feature of the user behavior data.

[0124] As still another optional implementation, the smart home device can determine the privacy level and the data type of the user behavior data respectively after collecting the user behavior data, and determine the privacy level and the data type as the data feature of the user behavior data.

[0125] Step 302, determining the privacy budget and the sensitivity corresponding to the user behavior data according to the above data feature; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change of the user behavior data.

[0126] Step 303, randomly generating noise data of the user behavior data according to the privacy budget and the sensitivity.

[0127] Step 304, performing a preset operation on the user behavior data and the noise data to obtain perturbed user data.

[0128] The following describes steps 302 to 304:

[0129] The privacy budget is a quantitative index for measuring the degree of privacy protection when the user data is processed for privacy protection (such as adding noise), which is set in advance, and its value is positively correlated with the privacy leakage risk of the user behavior data and negatively correlated with the protection strength of the user behavior data.

[0130] The sensitivity is used to represent the maximum change of the corresponding output result (such as statistical analysis result) of the user behavior data when it is slightly changed, and is one of the key indicators for measuring the data privacy leakage risk.

[0131] In the embodiment of the application, in order to improve the matching of the noise data and the user behavior data, the smart home device can dynamically match the noise parameters for generating the noise data according to the determined data feature of the user behavior data when determining the noise data added to the user behavior data. The noise parameters can include the privacy budget and the sensitivity.

[0132] As an optional implementation, when the data characteristics include a privacy level, a corresponding relationship (hereinafter referred to as a "first corresponding relationship" for ease of description) between the privacy level and the privacy budget can be constructed in advance. Based on this, after determining the privacy level of each kind of user behavior data, the corresponding privacy budget can be determined according to the privacy level of each kind of user behavior data. In the first corresponding relationship, the privacy level is inversely proportional to the privacy budget, that is, the higher the privacy level of the user behavior data, the smaller the privacy budget.

[0133] As an optional implementation, when the data characteristics include a data type, after determining the data type of each kind of user behavior data, it can be determined whether the user behavior data belongs to continuous data according to the data type of the user behavior data. The continuous data represents that the user behavior data is continuous data.

[0134] Optionally, when it is determined that the user behavior data belongs to continuous data (for example, the running time of an air conditioner), the historical maximum change amount of the user behavior data in a preset historical time period (for example, the maximum running time of a smart air conditioner in a week) can be obtained. Then, the historical maximum change amount can be determined as the sensitivity of the user behavior data.

[0135] Optionally, when it is determined that the user behavior data belongs to discrete data, the sensitivity of the user behavior data can be set to a preset value (for example, 1).

[0136] In an embodiment, after the smart home device determines the privacy budget and the sensitivity of each kind of user behavior data, the smart home device can generate noise data of the user behavior data randomly according to the privacy budget and the sensitivity.

[0137] As an optional implementation, a Laplace distribution of the noise data can be constructed according to the privacy budget and the sensitivity, and a noise data can be randomly selected from the Laplace distribution as the noise data added to the user behavior data.

[0138] Then, the user behavior data and the noise data can be subjected to a preset operation to obtain the perturbed user data.

[0139] As an optional implementation, the user behavior data and the noise data can be added to obtain the perturbed user data.

[0140] As another optional implementation, the user behavior data and the noise data can be subtracted to obtain the perturbed user data.

[0141] For example, assuming that the user behavior data is "door opening times = 7", and further assuming that the privacy budget ε is 1.0 and the sensitivity Δf is 1 (i.e., a maximum change of 1 per day), a Laplace distribution L ap(Δf / ε) = L ap(1.0) can be constructed according to the privacy budget and the sensitivity, and a random noise data can be generated, such as noise = -0.8.

[0142] Based on this, the user behavior data can be added to the noise data to obtain perturbed user data, i.e., the perturbed user data is 7-0.8 = 6.2.

[0143] Further, if the perturbed user data is required to be an integer type, rounding can be performed, and the final perturbed user data is 6.

[0144] The technical scheme provided by the embodiments of the present application determines the data characteristics of each kind of user behavior data, determines the privacy budget and the sensitivity corresponding to the user behavior data according to the data characteristics, the protection strength is inversely proportional to the privacy budget, and the maximum change amount of the user behavior data is represented by the sensitivity, random noise data of the user behavior data is generated according to the privacy budget and the sensitivity, and a preset operation is performed on the user behavior data and the noise data to obtain perturbed user data. This technical scheme can customize the privacy budget and the sensitivity according to the data characteristics, maximize the data availability on the premise of protecting privacy, the inverse relationship between the privacy budget and the protection strength can flexibly balance privacy and utility, the representation of the maximum change amount by the sensitivity ensures more accurate noise addition and avoids data invalidation caused by excessive perturbation, on the other hand, the perturbation processing realized by random noise generation and preset operation can effectively mask the privacy information in the original data, reduce the risk of leakage, and make the processed data still available for statistical analysis, model training and other scenarios, which takes into account the data privacy protection and actual application requirements, and provides reliable technical support for the safe use of user behavior data.

[0145] Referring to Figure 4 An embodiment flowchart of another data processing method provided by the embodiments of the present application is shown. Figure 4 The flowchart shown in Figure 2 Based on the flowchart shown in Figure 4 The flowchart can include the following steps:

[0146] Step 401, for each kind of user behavior data, determine the data feature of the user behavior data.

[0147] The above-mentioned user behavior data refers to the behavior data of a single dimension in the user data, which can refer to the device running data of the device dimension, and can also be the user behavior data of the user dimension. Further, the device running data can be further divided into a single running dimension and a multi-device linkage dimension, and the user behavior data can be further divided into a time dimension and a behavior dimension, etc. The embodiments of the present application do not limit this.

[0148] The above-mentioned data feature refers to information that can reflect the inherent properties or characteristics of each kind of user behavior data, and is the basis for determining the corresponding privacy budget and sensitivity. The above-mentioned data feature can include but is not limited to: a privacy level and a data type. The above-mentioned privacy level refers to the privacy degree of the user behavior data, and the higher the level, the more private it is. The above-mentioned data type refers to the continuity of the user behavior data, which can be a continuous data type and a discrete data type.

[0149] In the embodiments of the present application, when the user data includes one or more kinds of user behavior data, in order to ensure that the user behavior data included in the user data is disturbed, thereby concealing the real characteristics of the user behavior data, the smart home device can determine the data feature of each kind of user behavior data.

[0150] As an optional implementation manner, a feature analysis model for analyzing user behavior data can be pre-trained. Based on this, when determining the data feature of each kind of user behavior data, the user behavior data can be input into the above-mentioned feature analysis model to obtain the data feature of the user behavior data output by the feature analysis model.

[0151] As an optional implementation manner, the smart home device can determine the privacy level of each kind of user behavior data, and determine the privacy level as the data feature of the user behavior data.

[0152] As an implementation manner, the user can input the privacy level of each kind of user behavior data through a visual interface, and the smart home device can receive the privacy level of each kind of user behavior data input by the user.

[0153] As another implementation manner, a corresponding relationship between the behavior type (device running, user action trajectory, or association strategy of multiple devices, etc.) of the user behavior data and the privacy level can be pre-constructed. Based on this, the smart home device can determine the behavior type of each kind of user behavior data, and determine the privacy level of each kind of user behavior data according to the behavior type from the above-mentioned corresponding relationship. Then, the privacy level can be determined as the data feature of the user behavior data.

[0154] As another optional implementation, based on this, the smart home device can analyze the continuity of each user behavior data after collecting the user behavior data, so as to determine the data type of the user behavior data. Then, the data type of the obtained user behavior data can be determined as the data feature of the user behavior data.

[0155] As another optional implementation, the smart home device can determine the privacy level and the data type of the user behavior data respectively after collecting the user behavior data, and determine the privacy level and the data type as the data feature of the user behavior data.

[0156] Step 402, determine the privacy budget and the sensitivity corresponding to the user behavior data according to the above data feature; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change of the user behavior data.

[0157] The privacy budget is a quantitative index for measuring the degree of privacy protection when the user data is processed for privacy protection (such as adding noise), and its value is positively correlated with the privacy leakage risk of the user behavior data and is negatively correlated with the protection strength of the user behavior data.

[0158] The sensitivity is used to represent the maximum change of the corresponding output result (such as statistical analysis result) of the user behavior data when it is slightly changed, and is one of the key indicators for measuring the data privacy leakage risk.

[0159] In the embodiment of the application, in order to improve the matching of the noise data and the user behavior data, the smart home device can dynamically match the noise parameters for generating the noise data according to the determined data feature of the user behavior data when determining the noise data added to the user behavior data. The noise parameters can include the privacy budget and the sensitivity.

[0160] As an optional implementation, in the case that the data feature includes the privacy level, a corresponding relationship (hereinafter referred to as "first corresponding relationship" for convenience of description) between the privacy level and the privacy budget can be constructed in advance, based on which the corresponding privacy budget can be determined according to the privacy level of each user behavior data after determining the privacy level of each user behavior data. In the above first corresponding relationship, the privacy level is inversely proportional to the privacy budget, that is, the higher the privacy level of the user behavior data, the smaller the privacy budget.

[0161] As an optional implementation, when the data features include data types, after determining the data type of each user behavior data, whether the user behavior data belongs to continuous data can be determined according to the data type of the user behavior data. The continuous data represents that the user behavior data is continuous data.

[0162] Optionally, when it is determined that the user behavior data belongs to continuous data (for example, the running time length of the air conditioner), the historical maximum change amount of the user behavior data in a preset historical time period (for example, the maximum running time length of the intelligent air conditioner in a week) can be obtained. Then, the historical maximum change amount can be determined as the sensitivity of the user behavior data.

[0163] Optionally, when it is determined that the user behavior data belongs to discrete data, the sensitivity of the user behavior data can be set to a preset value (for example, 1).

[0164] Step 403, generating a covariance matrix according to the privacy budget and the sensitivity of each user behavior data.

[0165] Step 404, generating multi-dimensional noise according to the covariance matrix.

[0166] Step 405, superimposing the multi-dimensional noise on the multiple user behavior data included in the user data to obtain perturbed user data.

[0167] The steps 403 to 405 are described as follows:

[0168] The covariance matrix is a square matrix with covariance as an element, wherein the element in the i-th row and the j-th column represents the covariance between the i-th variable and the j-th variable, and is used to describe the linear correlation degree and the dispersion degree between multiple variables.

[0169] The multi-dimensional noise is a vector composed of multiple correlated noise components, and the distribution characteristics of each component are defined by the covariance matrix, which can correspond to the perturbation requirements of multiple data dimensions at the same time.

[0170] In the embodiments of the present application, when the collected user data includes multiple user behavior data, in order to improve the correlation between the user behavior data when adding noise data to the user behavior data, the smart home device can generate a covariance matrix according to the privacy budget and the sensitivity of each user behavior data after determining the privacy budget and the sensitivity of each user behavior data.

[0171] As an optional implementation, the covariance matrix can be generated by the following steps:

[0172] Step 1, constructing a diagonal matrix.

[0173] For a data set containing n kinds of user behavior data, an n x n diagonal matrix D is initialized, where: the diagonal elements D ii It can be determined by the following formula (three):

[0174]

[0175] Where, ε i is the privacy budget of the i-th user behavior data (the smaller the value, the higher the protection strength), Δ i is the sensitivity of the i-th user behavior data (maximum change amount).

[0176] Step 2-1, introduce inter-dimension correlation.

[0177] If it is necessary to preserve the statistical correlation between different user behavior data, the Pearson correlation coefficient can be estimated through historical data, and then the covariance matrix shown in the following formula (four) is generated:

[0178]

[0179] Where, ∑ij is the covariance matrix, ρ ij is the correlation coefficient between user behavior data i and j (-1≤ρ ij ≤1).

[0180] Step 2-2, do not introduce inter-dimension correlation.

[0181] If there is no need to consider inter-dimension correlation, the diagonal matrix can be directly used as the covariance matrix, as shown in the following formula (five):

[0182]

[0183] The above ∑ is the covariance matrix, the above Δ n is the sensitivity of the n-th user behavior data, and the above ε n is the privacy budget of the n-th user behavior data.

[0184] At this time, the generated multi-dimensional noise is independent between dimensions.

[0185] Then, multi-dimensional noise can be generated according to the above covariance matrix, and the multi-dimensional noise is superimposed on the multiple user behavior data included in the user data to obtain perturbed user data.

[0186] As an optional implementation manner, when the multi-dimensional noise is generated, the noise dimension (consistent with the user behavior data category) can be determined first, and a group of independent random numbers conforming to the standard normal distribution (mean value is 0, and variance is 1) is generated as a basic noise vector. Then, Cholesky decomposition can be performed on the covariance matrix to obtain a lower triangular matrix. Finally, the basic noise vector is multiplied by the lower triangular matrix, and the result obtained is the multi-dimensional noise conforming to the target covariance structure.

[0187] As an optional implementation manner, when the multi-dimensional noise is superimposed on the multiple user behavior data included in the user data, for each kind of user behavior data, the sub-noise data corresponding to the user behavior data can be determined from the multi-dimensional noise. Then, the user behavior data and the sub-noise data are superimposed to obtain the perturbed user data corresponding to the user data.

[0188] The technical scheme provided by the embodiments of the present application determines the data characteristics of each kind of user behavior data, determines the privacy budget and the sensitivity corresponding to the user behavior data according to the data characteristics, the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change amount of the user behavior data. According to the privacy budget and the sensitivity of each kind of user behavior data, a covariance matrix is generated, multi-dimensional noise is generated according to the covariance matrix, the multi-dimensional noise is superimposed on the multiple user behavior data included in the user data, and perturbed user data is obtained. This technical scheme differentiates the privacy budget and the sensitivity according to the characteristics of different user behavior data, realizes accurate protection of various user behavior data, that is, stronger privacy protection is applied to high-sensitivity data (for example, a lower privacy budget is allocated to enhance noise interference), and over-perturbation of low-sensitivity data is avoided to affect the usability; meanwhile, the covariance matrix generated based on the privacy budget and the sensitivity enables the multi-dimensional noise to meet the protection requirements of each data dimension and retain the internal correlation between the data, so that the perturbed user data after superimposing the noise still maintains the overall statistical characteristics and the correlation between the dimensions of the original data while effectively masking individual privacy information (by offsetting the maximum change amount of the data by the noise), thereby ensuring that the perturbed data can be used in subsequent data analysis, model training and other scenarios on the premise of protecting user privacy and security, and realizing the organic balance between privacy protection and data value utilization.

[0189] Reference is made to Figure 5 An embodiment flowchart of another data processing method provided by the embodiments of the present application is shown. Figure 5 The flowchart shown in Figure 2 On the basis of the flowchart shown, from the perspective of interaction between the server and the smart home device, it is described how the server specifically processes the ciphertext user data, and how the smart home device decrypts the processing result of the server. For example,Figure 5 As shown in the figure, the flow can include the following steps:

[0190] Step 501, the server, in the case of receiving the ciphertext user data, performs data processing on the ciphertext user data according to a preset aggregation operation, to obtain a ciphertext processing result.

[0191] Step 502, the server sends the ciphertext processing result to the smart home device.

[0192] The following uniformly describes step 501 and step 502:

[0193] In the embodiment of the application, after the server receives the ciphertext user data sent by the smart home device, the server can perform data processing on the ciphertext user data according to a preset aggregation operation, to obtain a ciphertext processing result. The aggregation operation can be addition operation, average calculation, multiplication operation, or simple linear operation, and the embodiment of the application does not limit this.

[0194] Then, in order to enable the smart home device to decrypt and apply the processing result of the server, the server can send the obtained ciphertext processing result to the smart home device.

[0195] Step 503, the smart home device generates a decryption key according to a preset key generation method.

[0196] Step 504, the smart home device, in the case of receiving the ciphertext processing result sent by the server, decrypts the ciphertext processing result according to the decryption key, to obtain a first plaintext processing result.

[0197] Step 505, the smart home device acquires a control strategy for the smart home device, and adjusts the control strategy according to the first plaintext processing result, to obtain a target control strategy.

[0198] The following uniformly describes step 503 to step 505:

[0199] The decryption key is used to decrypt the ciphertext processing result.

[0200] In the embodiment of the application, the smart home device can pre-generate a decryption key for decrypting the ciphertext processing result of the server according to a preset key generation method. Based on this, the smart home device can directly decrypt the ciphertext processing result according to the decryption key in the case of receiving the ciphertext processing result.

[0201] As an optional implementation manner, the smart home device can generate the decryption key at the same time of generating the encryption key.

[0202] As another optional implementation, the smart home device can generate the decryption key according to a preset key generation method after sending the ciphertext user data to the server.

[0203] As an optional implementation, when generating the encryption key, two different prime numbers can be randomly obtained, and then a preset operation is performed on the two prime numbers to obtain the encryption key.

[0204] As an embodiment, two different prime numbers can be obtained, and the product of the two prime numbers is calculated first to obtain a first value. Then, the least common multiple of the two new values obtained by subtracting a preset value from the two prime numbers respectively is calculated to obtain a second value. Then, the generator of a preset cyclic group is calculated according to the first value to obtain a third value. Finally, the first value, the second value, and the third value are calculated according to a preset formula to obtain a fourth value.

[0205] Based on this, the public key can be generated based on the first value and the third value, and the public key is determined as the encryption key, and the private key can be generated based on the second value and the fourth value, and the private key is determined as the decryption key.

[0206] Based on this, the smart home device can decrypt the ciphertext processing result according to the decryption key to obtain a first plaintext processing result when receiving the ciphertext processing result sent by the server.

[0207] In an embodiment, the smart home device can obtain a control strategy for the smart home device after obtaining the first plaintext processing result, and adjust the control strategy according to the first plaintext processing result to obtain a target control strategy.

[0208] In another embodiment, the smart home device can train a preset model using the first plaintext processing result after obtaining the first plaintext processing result.

[0209] In addition, in an embodiment, the smart home device can also send the generated decryption key to other devices to decrypt and apply the ciphertext processing result of the server by the other devices.

[0210] Specifically, the smart home device can determine a decryption device and obtain a device identifier of the decryption device after generating the decryption key. The decryption device can be another smart home device or a gateway device other than the smart home device, and the device identifier can be a unique identifier of the decryption device, which can be a factory number of the device or a number set by the user for the decryption device in advance. The embodiments of the present application do not limit this.

[0211] Afterwards, the decryption key can be sent to the decryption device, and the device identity can be sent to the server. Based on this, the server can send the ciphertext processing result to the decryption device according to the device identity in the case of receiving the device identity, so that the decryption device decrypts the ciphertext processing result according to the decryption key to obtain the plaintext processing result (for the sake of distinction, the following is referred to as "second plaintext processing result")

[0212] The technical scheme provided by the embodiments of the present application, through the server, in the case of receiving the ciphertext user data, the server performs data processing on the ciphertext user data according to the preset aggregation operation to obtain the ciphertext processing result, the server sends the ciphertext processing result to the smart home device, the smart home device generates a decryption key according to the preset key generation method, the smart home device, in the case of receiving the ciphertext processing result sent by the server, decrypts the ciphertext processing result according to the decryption key to obtain the first plaintext processing result, the smart home device obtains the control strategy for the smart home device, and adjusts the control strategy according to the first plaintext processing result to obtain the target control strategy. This technical scheme directly performs aggregation operation processing on the ciphertext user data by the server, avoiding the privacy leakage risk caused by data decryption on the server side, ensuring the security of user data; at the same time, the smart home device generates a decryption key and completes decryption by itself, ensuring the privacy and autonomy of the decryption process, reducing the security risks in the key transmission process; in addition, the control strategy is dynamically adjusted based on the decrypted plaintext processing result, which can make the smart home device more in line with the needs reflected by the actual data of the user, improving the accuracy and intelligent level of the control strategy, and realizing the effective combination of data security protection and device intelligent control.

[0213] Referring to Figure 6 An embodiment flowchart of another data processing method provided by the embodiments of the present application is shown in FIG. 6. As shown in FIG. 6, the flowchart can include the following steps: Figure 6

[0214] First, in the smart home device, there is a data perturbation module for differentially private perturbation processing of the collected user behavior data. The perturbation method can use Laplace mechanism to add noise conforming to a specific distribution to the original data, so that the output difference of the query result under different user data inputs is not significant. The Laplace mechanism realizes differential privacy by adding random noise from the Laplace distribution to the output of the query function. A certain behavior data of a user (such as the use frequency of a certain electrical appliance, the number of activities in a room, etc.) can be modeled as a function f(x). The system applies the Laplace mechanism to process the data on the local device to generate noise, η ~ Laplace(0, Δf / ε), and the perturbed user data is f ~ = f + η.

[0215] ​After that, the smart home device will use the homomorphic encryption algorithm Paillier to encrypt the disturbed data to generate ciphertext data, and the key can be generated by the user. The encrypted data still maintains the homomorphic operation capability, further ensuring that the data cannot be restored.

[0216] The server does not have the private key, so it cannot decrypt the ciphertext, but with the help of the homomorphic encryption algorithm, it can directly perform the following calculation operations in the ciphertext space; After uploading the data to the cloud server, the user data needs to be analyzed, the server does not need to perform decryption operations on the ciphertext data, and the operation in the encrypted state, including addition, average, simple linear operation, etc., can get the aggregation result without decryption. For example, to count the total number, perform multiplication operation on multiple ciphertext data C1, C2,..., Cn: Csum==Enc(m1+m2+…+mn), which is used to calculate the total behavior frequency, total energy consumption estimation, batch index merging, etc.

[0217] After the server completes the aggregation or analysis operation, the result (in ciphertext form) is provided to the key holder, who decrypts it and visualizes it or further uses it for model training, control policy adjustment, etc. The decryption operation is not performed locally on the server, but by an entity with key permission. The entity with key permission in this scheme is the device itself.

[0218] For example, data collectors: smart home devices (such as smart sockets, air conditioners) locally record user behavior data for each smart device, such as: air conditioner daily running time (hours), socket daily power consumption (kilowatt hours). The device end is equipped with a "differential privacy disturbance module" that adds noise η to the original behavior data f to get the disturbed data For example: the original data 6.5kWh becomes 6.9kWh after adding noise.

[0219] Data encrypter: the smart home device itself. The device generates its own Paillier key pair (private key remains local, public key used for encryption); encrypt the disturbed data Use the public key to encrypt and generate ciphertext Upload the ciphertext data to the cloud server.

[0220] Server side: aggregate and analyze ciphertext data, cloud platform does not decrypt, only performs homomorphic addition on ciphertext: assume that the ciphertext from N air conditioners is Server performs Get the aggregated ciphertext result.

[0221] The server can also perform other aggregation and analysis operations, such as: classification statistics by device brand / house type, multi-day data trend comparison

[0222] Data decryptor: local gateway / user authorization device. The aggregated ciphertext result is returned to the user gateway device (i.e. the original data encryptor) through the cloud platform; the gateway device decrypts using the private key to restore the plaintext information of the aggregated total power consumption, power consumption trend, etc.; for example: it is learned after decryption that the total power consumption of the family in the past 24 hours is 48.3 kWh

[0223] Application mode: used for energy saving optimization and control strategy adjustment.

[0224] Model training: feed the decrypted power consumption data into a local or cloud AI model for energy consumption prediction or load optimization training; for example, predict the power consumption peak of the next period and automatically adjust the air conditioner pre-cooling time.

[0225] Control strategy automatic adjustment: if it is found that the energy consumption of a certain device (such as a water heater) is abnormal, the system automatically adjusts the on period or sends a notification; the system can adaptively plan "non-peak period power consumption" to save electricity bills.

[0226] The technical scheme provided by the embodiments of the present application proposes a differential privacy data aggregation method based on homomorphic encryption. In the smart home terminal device, first, the differential privacy mechanism is used to add noise to the data to form perturbed data, and the perturbed data is encrypted using the additive or multiplicative homomorphic encryption algorithm to generate ciphertext data. The server performs operations in the encrypted state on the ciphertext data, including addition, averaging, simple linear operation, etc., without decryption to obtain the aggregation result. The authorized party or trusted intermediate service node with a key permission decrypts the aggregation result and uses it for further model optimization or control strategy generation. Thus, while ensuring that the individual privacy of the user cannot be reversed, the data usability and security are balanced, especially suitable for smart home scenarios that require a large amount of behavior data training, such as energy saving scheduling, device linkage optimization, etc.

[0227] Reference Figure 7 An embodiment block diagram of a data processing device provided by the embodiments of the present application. Figure 7 The device shown can be applied to a smart home device, for example Figure 1 The smart home device 11 shown. As Figure 7 The device can include:

[0228] The acquisition module 71 is configured to acquire user data;

[0229] The perturbation module 72 is configured to add noise data to the user data to obtain perturbed user data;

[0230] The encryption module 73 is configured to encrypt the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data has homomorphic operation capability;

[0231] sending module 74 is configured to send the ciphertext user data to a server; and the server directly performs data processing on the ciphertext user data to obtain a processing result when the ciphertext user data is received.

[0232] Referring to Figure 8 A structural schematic diagram of an intelligent home device provided by an embodiment of the present application includes a processor 81, a communication interface 82, a memory 83, and a communication bus 84, wherein the processor 81, the communication interface 82, and the memory 83 complete mutual communication through the communication bus 84,

[0233] The memory 83 is configured to store a computer program.

[0234] In an embodiment of the present application, the processor 81 is configured to execute the program stored in the memory 83 to implement the data processing method provided by any one of the preceding method embodiments, including:

[0235] collecting user data;

[0236] adding noise data to the user data to obtain perturbed user data;

[0237] encrypting the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data has homomorphic operation capability;

[0238] sending the ciphertext user data to a server; and the server directly performs data processing on the ciphertext user data to obtain a processing result when the ciphertext user data is received.

[0239] Referring to Figure 9 Another structural schematic diagram of a data processing system provided by an embodiment of the present application is shown in FIG. 9. As shown in FIG. 9, the data processing system 90 can include an intelligent home device 91 and a server 92. Figure 9 The above-described intelligent home device 91 can be the intelligent home device shown in FIG. 8, which can be used to implement the data processing method provided by any one of the preceding method embodiments.

[0240] Figure 8 The above-described server 92 can be used to directly perform data processing on the ciphertext user data sent by the intelligent home device to obtain a processing result when the ciphertext user data is received.

[0241] An embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the data processing method provided by any one of the preceding method embodiments.

[0242] An embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the data processing method provided by any one of the preceding method embodiments. ​

[0243] The device embodiments described above are only illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0244] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software plus a general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0245] It should be understood that the terms used herein are for the purpose of describing particular example embodiments only and are not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described, unless specifically indicated as such. It is also to be understood that additional or alternative steps can be employed.

[0246] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Various modifications can be made to the embodiments described herein, and the general principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Accordingly, the application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized by, The method is applied to a smart home device, and the method comprises: collecting user data; adding noise data to the user data to obtain perturbed user data; encrypting the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein the ciphertext user data supports homomorphic operation; sending the ciphertext user data to a server; so that the server directly performs data processing on the ciphertext user data to obtain a processing result when the ciphertext user data is received.

2. The method of claim 1, wherein, The user data comprises one or more kinds of user behavior data, and the adding of noise data to the user data to obtain perturbed user data comprises: determining, for each kind of user behavior data, a data feature of the user behavior data; determining, according to the data feature, a privacy budget and a sensitivity corresponding to the user behavior data; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change amount of the user behavior data; randomly generating noise data of the user behavior data according to the privacy budget and the sensitivity; performing a preset operation on the user behavior data and the noise data to obtain the perturbed user data.

3. The method of claim 1, wherein, The user data comprises one or more kinds of user behavior data, and the adding of noise data to the user data to obtain perturbed user data comprises: determining, for each kind of user behavior data, a data feature of the user behavior data; determining, according to the data feature, a privacy budget and a sensitivity corresponding to the user behavior data; the privacy budget is inversely proportional to the protection strength of the user behavior data, and the sensitivity is used to represent the maximum change amount of the user behavior data; generating a covariance matrix according to the privacy budget and the sensitivity of each kind of user behavior data; generating multi-dimensional noise according to the covariance matrix; superimposing the multi-dimensional noise on the multiple kinds of user behavior data included in the user data to obtain perturbed user data.

4. The method according to claim 2 or 3, characterized in that, The data feature comprises a privacy level and a data type of the user behavior data; The determining, according to the data feature, of a privacy budget and a sensitivity corresponding to the user behavior data comprises: determining, according to the privacy level of the user behavior data, a privacy budget of the user behavior data from a first correspondence relationship between a privacy level and a privacy budget that is constructed in advance; wherein the privacy level is inversely proportional to the privacy budget; determining, according to the data type of the user behavior data, whether the user behavior data belongs to continuous data; in a case where it is determined that the user behavior data belongs to the continuous data, obtaining a historical maximum change amount of the user behavior data in a preset historical time period, and determining the historical maximum change amount as the sensitivity of the user behavior data; in a case where it is determined that the user behavior data belongs to discrete data, setting the sensitivity of the user behavior data as a preset value.

5. The method of claim 1, wherein, The encrypting of the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data comprises: generating an encryption key for encrypting the perturbed user data according to a preset key generation method; The perturbed user data is encrypted by the encryption key and a preset homomorphic encryption algorithm to obtain ciphertext user data.

6. The method of claim 1, wherein, The server performs data processing on the ciphertext user data to obtain a processing result by the following manner: The ciphertext user data is processed according to a preset aggregation operation to obtain ciphertext processing result.

7. The method of claim 6, wherein, The method further comprises: generating a decryption key according to a preset key generation method; in a case where the ciphertext processing result sent by the server is received, the ciphertext processing result is decrypted according to the decryption key to obtain a first plaintext processing result; wherein, after the ciphertext processing result is obtained, the server sends the ciphertext processing result to the smart home device.

8. The method of claim 7, wherein, After the first plaintext processing result is obtained, the method further comprises: obtaining a control strategy for the smart home device; adjusting the control strategy according to the first plaintext processing result to obtain a target control strategy.

9. The method of claim 7, wherein, After the decryption key is generated, the method further comprises: determining a decryption device and obtaining a device identifier of the decryption device; sending the decryption key to the decryption device and sending the device identifier to the server; wherein, in a case where the device identifier is received, the server sends the ciphertext processing result to the decryption device according to the device identifier, so that the decryption device decrypts the ciphertext processing result according to the decryption key to obtain a second plaintext processing result.

10. A data processing apparatus, characterized by The device is applied to a smart home device and comprises: a collection module configured to collect user data; a perturbation module configured to add noise data to the user data to obtain perturbed user data; an encryption module configured to encrypt the perturbed user data according to a preset homomorphic encryption algorithm to obtain ciphertext user data; wherein, the ciphertext user data supports homomorphic operation; a sending module configured to send the ciphertext user data to a server, so that the server directly performs data processing on the ciphertext user data to obtain a processing result in a case where the ciphertext user data is received.

11. A smart home device, comprising: comprise: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is configured to store a computer program; and the processor is configured to execute the computer program to implement the data processing method in any one of claims 1-9.

12. A data processing system, characterized by comprise: a smart home device and a server; the smart home device is the smart home device in claim 11 and is configured to implement the data processing method in any one of claims 1-9 and send generated ciphertext user data to the server; the server is configured to directly perform data processing on the ciphertext user data to obtain a processing result in a case where the ciphertext user data sent by the smart home device is received.

13. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the data processing method in any one of claims 1-9.