Data query method and device, equipment, storage medium and program product

Through the method of generating ciphertext vectors by the client and calculating ciphertext results by the server, and using the user behavior probability model for data query, it solves the problem of data transmission security in user anti-fraud risk assessment and realizes an efficient and safe data query process.

CN118659897APending Publication Date: 2024-09-17CHINA MOBILE COMM GRP SHAANXI CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410668805.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

During the user anti-fraud risk assessment process, there is a risk of data leakage in the transmission of user personal information and corporate information, and the security of data query cannot be guaranteed.

Method used

The client generates ciphertext vectors and the server calculates ciphertext results. The user behavior probability model is used for data query to avoid direct transmission of plaintext data. Homomorphic encryption and logistic regression models are used for user behavior evaluation to ensure the security of data transmission. .

Benefits of technology

It improves the security of data query, avoids the risk of data leakage, enhances the protection of user data, and improves the security and accuracy of the data transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659897A
    Figure CN118659897A
Patent Text Reader

Abstract

The invention discloses a data query method and device, equipment, a storage medium and a program product, and is applied to a server, and the specific technical scheme comprises the steps that a query instruction sent by a client is received, the query instruction carries a ciphertext vector generated by the client, and a target component in the ciphertext vector is used for querying plaintext data corresponding to a specified user; the vector inner product of the ciphertext vector and locally-stored plaintext data is calculated, a ciphertext result is obtained, and the plaintext data is the probability that the user corresponding to the locally-stored user data, output by each participating device through a user behavior probability model, of each participating device is an abnormal behavior user; and sending the ciphertext result to the client, so that the client decrypts the ciphertext result to obtain a query result. Therefore, the security of data query can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular, relates to a method, device, equipment, storage medium and program product for data query. Background Art

[0002] At present, when conducting anti-fraud risk assessment on users, the anti-fraud risk assessment is mainly conducted on the actual controllers and legal persons of the enterprise.

[0003] Specifically, the user's personal information is obtained through the certificate image uploaded by the user, the enterprise's corporate information data is obtained from the enterprise's business platform, and the obtained user's personal information and the enterprise's corporate information data are aggregated into a trusted execution environment for risk assessment.

[0004] In this case, the user's personal information and corporate information data need to be transmitted. During the transmission process, there is a risk of data leakage and the security of data query cannot be guaranteed. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for data query, which can improve the security of data query.

[0006] In a first aspect, an embodiment of the present application provides a data query method, which is applied to a server, and the method includes:

[0007] Receiving a query instruction sent by a client, the query instruction carrying a ciphertext vector generated by the client, wherein a destination component in the ciphertext vector is used to query plaintext data corresponding to a specified user;

[0008] Calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result, wherein the plaintext data is the probability that the user corresponding to the user data locally stored by each participating device is an abnormal behavior user output by each participating device using the user behavior probability model;

[0009] The ciphertext result is sent to the client so that the client can decrypt the ciphertext result to obtain the query result.

[0010] In a possible implementation, before calculating the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain the ciphertext result, the method further includes:

[0011] Obtaining a shared ciphertext sent by each participating device, wherein the shared ciphertext is obtained by encrypting a parameter value of a target behavior indicator by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user;

[0012] Using the shared ciphertext corresponding to each participating device, the logistic regression model is trained to obtain the user behavior probability model corresponding to each participating device;

[0013] The model parameters of the user behavior probability model corresponding to each participating device are sent to each participating device, so that each participating device builds a user behavior probability model according to the model parameters of the user behavior probability model corresponding to each participating device, calculates the probability that the user corresponding to the locally stored user data is an abnormal behavior user, and sends the probability that each user is an abnormal behavior user to the server.

[0014] In a second aspect, an embodiment of the present application provides a data query method, which is applied to a participating device, and the method includes:

[0015] The probability that the user corresponding to the locally stored user data is an abnormal behavior user is calculated using the user behavior probability model corresponding to the participating device, wherein the user behavior probability model is obtained by the server training based on the shared ciphertext sent by the participating device, and the shared ciphertext is the parameter value of the target behavior indicator encrypted by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user;

[0016] The probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior is sent to the server, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior as plaintext data. When the server receives a query instruction sent by the client, the server calculates the inner product of the ciphertext vector and the vector of the plaintext data included in the query instruction to obtain a ciphertext result, and sends the ciphertext result to the client. The client decrypts the ciphertext result to obtain a query result.

[0017] In a possible implementation, before calculating the probability that a user corresponding to the locally stored user data is an abnormal behavior user by using the user behavior probability model corresponding to the participating device, the method further includes:

[0018] Encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext;

[0019] Sending the shared ciphertext to the server, so that the server can use the shared ciphertext to train a logistic regression model to obtain a user behavior probability model corresponding to the participating device;

[0020] Receiving model parameters of the user behavior probability model sent by the server;

[0021] The user behavior probability model is constructed using the model parameters.

[0022] In a possible implementation, the target behavior indicator includes an abnormal call behavior evaluation indicator, a user abnormal online behavior evaluation indicator, and a user whitelist identification indicator; before encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext, the method further includes:

[0023] Obtaining locally stored user behavior data, where the user behavior data is used to measure whether the user is an abnormal behavior user;

[0024] Based on the user behavior data, parameter values ​​of the abnormal call behavior evaluation index, the user abnormal Internet behavior evaluation index and the user whitelist identification index are constructed.

[0025] In a possible implementation, the user behavior data includes communication behavior data and online behavior data; and constructing the abnormal call behavior evaluation index, the user abnormal online behavior evaluation index, and the user whitelist identification index based on the user behavior data includes:

[0026] constructing a communication feature using the communication behavior data, wherein the communication feature is used to characterize the abnormal communication behavior of the user;

[0027] Calculating a first weight of each communication feature using a random forest algorithm, where the first weight is used to characterize the degree of influence of the communication feature on the classification accuracy of the classification model;

[0028] Summing the product of each communication feature and the first weight of each communication feature to obtain the abnormal call behavior evaluation index;

[0029] constructing online behavior characteristics using the online behavior data;

[0030] According to a preset correspondence between each online behavior feature and the second weight, obtaining a second weight corresponding to each online behavior feature;

[0031] Summing each online behavior feature and the product of the second weight of each online behavior feature to obtain the user abnormal online behavior evaluation index;

[0032] When the user behavior data meets the requirement information of each model covered by the whitelist system, the user whitelist identification indicator is constructed.

[0033] In a possible implementation manner, before encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext, the method further includes:

[0034] Obtaining the same user identity information in the participating device and the target participating device;

[0035] Encrypting user data corresponding to the same user identity information using a homomorphic encryption algorithm, wherein the user data includes parameter values ​​of different behavior indicators;

[0036] The encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext includes:

[0037] The parameter value of the target behavior indicator is encrypted to obtain the shared ciphertext, wherein the target behavior indicator is a behavior indicator shared by the participating device and the target participating device.

[0038] In a possible implementation, encrypting the user data corresponding to the same user identity information by using a homomorphic encryption algorithm includes:

[0039] generating a first random number;

[0040] Performing hash calculation on the user data using a hash algorithm, mapping the user data onto a preset elliptic curve, and obtaining first mapped user data;

[0041] Calculating the product of the first mapped user data and the first random number to obtain a first product;

[0042] Receiving a second product and a second random number sent by the target participating device;

[0043] respectively calculating the product of the first product and the second random number to obtain a third product, and the product of the second product and the first random number to obtain a fourth product;

[0044] taking user data corresponding to the same elements in the third product and the fourth product as overlapping user data;

[0045] Determining an overlapping behavior indicator corresponding to the overlapping user data;

[0046] The user data of the overlapping behavior indicator is encrypted.

[0047] In a third aspect, an embodiment of the present application provides a data query device, which is applied to a server, and the device includes:

[0048] A receiving module, configured to receive a query instruction sent by a client, wherein the query instruction carries a ciphertext vector generated by the client, and a destination component in the ciphertext vector is used to query plaintext data corresponding to a specified user;

[0049] A calculation module, used to calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result, wherein the plaintext data is the probability that the user corresponding to the user data locally stored by each participating device is an abnormal behavior user output by each participating device using the user behavior probability model;

[0050] The sending module is used to send the ciphertext result to the client, so that the client can decrypt the ciphertext result to obtain the query result.

[0051] In a fourth aspect, an embodiment of the present application provides a data query device, which is applied to a participating device, and the device includes:

[0052] A calculation module, used to calculate the probability that the user corresponding to the locally stored user data is an abnormal behavior user by using the user behavior probability model corresponding to the participating device, wherein the user behavior probability model is obtained by the server training based on the shared ciphertext sent by the participating device, and the shared ciphertext is the parameter value of the target behavior indicator encrypted by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user;

[0053] A sending module is used to send to the server the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior as plaintext data. When the server receives a query instruction sent by the client, the server calculates the inner product of the ciphertext vector and the vector of the plaintext data included in the query instruction to obtain a ciphertext result, sends the ciphertext result to the client, and the client decrypts the ciphertext result to obtain a query result.

[0054] In a fifth aspect, an embodiment of the present application provides a server, the server comprising: a processor and a memory storing computer program instructions;

[0055] When the processor executes the computer program instructions, the method according to any one of the first aspects is implemented.

[0056] In a sixth aspect, an embodiment of the present application provides a participating device, the participating device comprising: a processor and a memory storing computer program instructions;

[0057] When the processor executes the computer program instructions, the method described in any one of the second aspects is implemented.

[0058] In a seventh aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in the first aspect is implemented, or the method described in the second aspect is implemented.

[0059] In an eighth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method described in the first aspect, or implements the method described in the second aspect.

[0060] The data query method, apparatus, device, storage medium and program product provided in the embodiments of the present application. After receiving the query instruction sent by the client, the server calculates the inner product of the ciphertext vector in the query instruction and the vector of the locally stored plaintext data to obtain the ciphertext result. The server then sends the ciphertext result to the client, and the client can decrypt the ciphertext result to obtain the query result of the specified user. In this way, the plaintext data stored locally on the server is the result calculated by each participating device using a pre-trained user behavior probability model, that is, each participating device does not need to send the user data stored locally on each participating device to the server, avoiding the problem of data leakage caused by data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0062] Figure 1 It is a flowchart of a method for data query applied to a server provided in an embodiment of the present application;

[0063] Figure 2 It is a flowchart of a method for training a user behavior probability model provided in an embodiment of the present application;

[0064] Figure 3 is a flowchart of a method for data query applied to a participating device provided in an embodiment of the present application;

[0065] Figure 4 is an exemplary schematic diagram of a data query method provided in an embodiment of the present application;

[0066] Figure 5 is an exemplary schematic diagram of a data processing method provided in an embodiment of the present application;

[0067] Figure 6 is an exemplary schematic diagram of a behavior indicator construction method provided in an embodiment of the present application;

[0068] Figure 7 is an exemplary schematic diagram of a method for calculating elements of the exchanges of each participating device provided in an embodiment of the present application;

[0069] Figure 8is an exemplary schematic diagram of a user behavior probability model training method provided in an embodiment of the present application;

[0070] Fig. 9 This is an exemplary schematic diagram of another data query method provided in an embodiment of the present application.

[0071] Fig.10 It is a structural diagram of a device for data query applied to a server provided in an embodiment of the present application;

[0072] Fig.11 It is a structural diagram of an apparatus for querying data of a participating device provided in an embodiment of the present application;

[0073] Fig.12 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0075] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0076] In order to solve the problems of the prior art, the embodiments of the present application provide a method, apparatus, device, storage medium and program product for data query. Figure 1 As shown, Figure 1 A flow chart of a data query method provided by an embodiment of the present application is shown. The data processing method can be applied to a server, and the method includes:

[0077] S101: Receive a query instruction sent by a client.

[0078] The query instruction carries a ciphertext vector generated by the client, and the destination component in the ciphertext vector is used to query the plaintext data corresponding to the specified user.

[0079] Specifically, there are multiple plaintext data. The ciphertext vector is composed of multiple vector components, and the number of vector components is consistent with the number of plaintext data. Among them, for the specified user that the user wants to query, the target component corresponding to the specified user and the vector components corresponding to other users are different, so that when the ciphertext vector and the plaintext data are subsequently operated on by the vector inner product to obtain the ciphertext result, the data corresponding to the specified user can be accurately found from the ciphertext result.

[0080] In one example, the server stores n plaintext data, represented as (m1,…mt,…,mn), and the plaintext data corresponding to the specified user that the user wants to query is the tth item of data, then the ciphertext vector generated by the client is represented as (s1,…,st,…,sn). Among them, the tth vector component is the destination component, and the destination component can be the result of the client encrypting the number 1 using the public key. The other vector components in the ciphertext vector are the result of the client encrypting the number 0 using the public key. In this way, after the server subsequently calculates the vector inner product of the ciphertext vector and the plaintext data to obtain the ciphertext result, the client uses the private key to decrypt the ciphertext result, and the client can accurately identify the data corresponding to the specified user in the ciphertext result.

[0081] S102. Calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result.

[0082] The plaintext data is the probability that the user corresponding to the user data stored locally on each participating device is an abnormal behavior user, which is output by each participating device using a user behavior probability model.

[0083] In one example, an abnormal behavior user refers to a user who has engaged in fraudulent behavior.

[0084] S103: Send the ciphertext result to the client, so that the client can decrypt the ciphertext result to obtain the query result.

[0085] Using the above method, after receiving the query instruction sent by the client, the server calculates the inner product of the ciphertext vector in the query instruction and the vector of the locally stored plaintext data to obtain the ciphertext result. The server then sends the ciphertext result to the client, and the client can decrypt the ciphertext result to obtain the query result of the specified user. In this way, the plaintext data stored locally on the server is the result calculated by each participating device using a pre-trained user behavior probability model, that is, each participating device does not need to send the user data stored locally on each participating device to the server, avoiding the problem of data leakage caused by data transmission.

[0086] The following combination Figure 2 Introduce how each participating device obtains the corresponding user behavior probability model, such as Figure 2 As shown, before the above S102, calculating the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain the ciphertext result, the method includes:

[0087] S201. Obtain the shared ciphertext sent by each participating device.

[0088] The shared ciphertext is obtained by encrypting the parameter value of the target behavior indicator by the participating devices. The target behavior indicator is used to determine whether the user is an abnormal behavior user.

[0089] Specifically, the method for generating the shared ciphertext will be described in detail in subsequent embodiments.

[0090] S202: Use the shared ciphertext corresponding to each participating device to train a logistic regression model to obtain a user behavior probability model corresponding to each participating device.

[0091] Specifically, for the user behavior probability model corresponding to each participating device, the training process is as follows:

[0092] Obtain user training data, which consists of samples and sample labels, wherein each sample includes a shared ciphertext corresponding to each user, and the sample label indicates whether each user is an abnormal behavior user.

[0093] Construct a model expression, which can be a sigmoid function.

[0094] In one example, the model expression could be:

[0095]

[0096] Among them, x represents the sample and w represents the model parameters.

[0097] The training data is input into the model, and the model parameters are adjusted by the gradient descent method to make the loss function of the model as small as possible, and the final user behavior probability model is obtained. The loss function can be cross entropy.

[0098] S203. Send the model parameters of the user behavior probability model corresponding to each participating device to each participating device, so that each participating device builds a user behavior probability model according to the model parameters of the user behavior probability model corresponding to each participating device, calculates the probability that the user corresponding to the locally stored user data is an abnormal behavior user, and sends the probability that each user is an abnormal behavior user to the server.

[0099] Using the method provided in the embodiment of the present application, the server obtains the shared ciphertext sent by each participating device. Since the shared ciphertext is obtained by encrypting the parameter value of the target behavior indicator by the participating device, and the target behavior indicator can be used to determine whether the user is an abnormal behavior user, the shared ciphertext can be used to determine whether the user is an abnormal behavior user. Furthermore, the server uses the shared ciphertext to train the logistic regression model, and can obtain a user behavior probability model for each participating device to predict whether the user is an abnormal behavior user. In this way, each participating device can directly construct a user behavior probability model based on the model parameters sent by the server, and each participating device does not need to send the locally stored user data to the server, avoiding the risk of data being out of the game, thereby improving the security of data storage.

[0100] The following describes the data query method provided by the embodiment of the present application from the perspective of the participating devices. Figure 3 As shown, the method is applied to participating devices and specifically includes:

[0101] S301 , using a user behavior probability model corresponding to a participating device to calculate the probability that a user corresponding to locally stored user data is an abnormal behavior user.

[0102] Among them, the user behavior probability model is trained by the server based on the shared ciphertext sent by the participating devices. The shared ciphertext is the encrypted parameter value of the target behavior indicator by the participating devices. The target behavior indicator is used to determine whether the user is an abnormal behavior user.

[0103] S302. Send the probability that the user corresponding to the user data locally stored in the participating device is the abnormal behavior user to the server, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is the abnormal behavior user as plaintext data. When the server receives the query instruction sent by the client, the server calculates the inner product of the ciphertext vector included in the query instruction and the vector of the plaintext data to obtain the ciphertext result, sends the ciphertext result to the client, and the client decrypts the ciphertext result to obtain the query result.

[0104] Using the method provided in the embodiment of the present application, the participating device uses the corresponding user behavior probability model to calculate the probability that the user corresponding to the locally stored user data is an abnormal behavior user, and then sends the calculated probability to the server. The server uses the received probability as plaintext data, and then after receiving the query instruction sent by the client, the server calculates the inner product of the ciphertext vector in the query instruction and the vector of the locally stored plaintext data to obtain the ciphertext result. The server then sends the ciphertext result to the client, and the client can decrypt the ciphertext result to obtain the query result of the specified user. In this way, the plaintext data stored locally on the server is the result calculated in advance by each participating device using the user behavior probability model, rather than the user data stored locally by each participating device, that is, each participating device does not need to send the user data stored locally by each participating device to the server, avoiding the problem of data leakage caused by data transmission.

[0105] It should be noted that when the server pre-trains the user behavior probability model corresponding to each participating device, each participating device does not need to send the user data stored locally on each participating device to the server. Specifically, the implementation steps of training the user behavior probability model are as follows:

[0106] Step 1: Encrypt the parameter value of the target behavior indicator to obtain a shared ciphertext.

[0107] Among them, the participating devices encrypt the parameter values ​​of the target behavior indicators based on secure multi-party computing to obtain a shared ciphertext.

[0108] In one example, the parameter value of the target behavior indicator in participant device 1 is x, and the parameter value of the target behavior indicator in participant device 2 is y. The participating devices calculate [x+y] t and [xy] t . Among them, [x]+[y]=[x+y]=(z0,z1),z0=x0+y0,z1=x1+y1,[xy]=[x′y′]-y′[a]-x′[b]-[c],x′=x+a,y′=y+b, and a and b are multiplication triplets.

[0109] Step 2: Send the shared ciphertext to the server so that the server can use the shared ciphertext to train the logistic regression model and obtain the user behavior probability model corresponding to the participating devices.

[0110] It should be noted that before sending the shared ciphertext to the server, the coefficients in the shared ciphertext can be extracted. Since the shared ciphertext is in the form of a polynomial, and only a part of the coefficients in the polynomial indicate a valid matrix-vector product, the coefficients in the polynomial are extracted by setting a rotation private key.

[0111] In one example, the rotating private key is defined i∈[0,N), the decryption algorithm is d(x)=b(x)=a(x)·s(x), then the i-th term of a(x)·s(x) can be expressed as <a,SkewRot i (s)>.

[0112] In this way, the data that the participating devices originally want to transmit is (x), b(x), and the communication overhead is 2N·log2 q. After coefficient extraction, only the valid matrix-vector product is transmitted, and the transmitted data is b(x), a ki ,k i , the communication overhead is (N+l)·log2 q. In actual use, when l<<N, the communication overhead is almost halved, thus reducing the communication overhead.

[0113] Step 3: Receive the model parameters of the user behavior probability model sent by the server.

[0114] Step 4: Use model parameters to build a user behavior probability model.

[0115] It can be understood that both the server and the participating devices can construct the same model expression. Therefore, after receiving the model parameters sent by the server, the participating devices can directly use the model parameters to construct the model expression.

[0116] In this way, each participating device encrypts the parameter value of the target behavior indicator and sends the encrypted shared ciphertext to the server. In this way, during the interaction between each participating device and the server, the server does not receive the user data sent by each participating device, thereby reducing the risk of user data leakage during data transmission.

[0117] It should be noted that before the server trains the user behavior probability model corresponding to each participating device, since the user behavior probability model trained using the user data corresponding to the same user in each participating device has reference value, the user data corresponding to the user shared by each participating device is determined, and the specific implementation method is as follows:

[0118] Step A: Obtain the same user identity information in the participating device and the target participating device.

[0119] Among them, the participating device can be an operator, and the target participating device can be a bank. When determining the same user identity information between the operator and the bank, the prior art usually uses the mobile phone number to determine the same identity information between the operator and the bank. However, since the user may change the mobile phone number and fail to update the bank's reserved mobile phone number in time, the mobile phone number may not be used to accurately determine the same identity information between the operator and the bank. Therefore, the same identity information between the operator and the bank can be used by the ID card number.

[0120] Step B: Encrypt user data corresponding to the same user identity information using a homomorphic encryption algorithm, where the user data includes parameter values ​​of different behavior indicators.

[0121] After the parameter values ​​of different behavior indicators are obtained by the above calculation, the parameter values ​​of the target behavior indicators are encrypted accordingly to obtain a shared ciphertext, which can be specifically implemented as follows:

[0122] The parameter value of the target behavior indicator is encrypted to obtain a shared ciphertext, wherein the target behavior indicator is a behavior indicator shared by the participating device and the target participating device.

[0123] In this way, the user data corresponding to the same user identity information in the participating device and the target participating device is encrypted, ensuring that the original user data does not go out, that is, the data sent by the participating device to the server is encrypted user data, ensuring the security of data transmission.

[0124] Regarding the above step B, step B can be specifically implemented as follows:

[0125] Generate a first random number. Perform hash calculation on user data using a hash algorithm, map the user data onto a preset elliptic curve, and obtain first mapped user data. Calculate the product of the first mapped user data and the first random number to obtain a first product. Receive a second product and a second random number sent by the target participating device. Calculate the product of the first product and the second random number respectively to obtain a third product, and the product of the second product and the first random number to obtain a fourth product. Use the user data corresponding to the same elements in the third product and the fourth product as overlapping user data. Determine the overlapping behavior indicator corresponding to the overlapping user data. Encrypt the user data of the overlapping behavior indicator.

[0126] The value range of the first random number is the same as the number of behavior indicators in the user data.

[0127] In an example, the user data includes parameter values ​​of n behavior indicators, and the value range of the first random number is (0, n).

[0128] The method for calculating the second product is consistent with the method for calculating the first product, and the method for determining the value range of the second random number is consistent with the method for determining the value range of the first random number, which will not be repeated here.

[0129] In one example, the third product is the product of the first mapped user data and the first random number and the second random number, and the fourth product is the product of the second mapped user data and the first random number and the second random number calculated by the target participating device. Assume that the first mapped user data is {x1 ′ , x2 ′ , x3 ′ , …, xn ′}, the first random number is k0, and the second mapped user data is {y1 ′ , y2 ′ ,y3 ′ , …, y m ′}, the second random number is k1, then the third product is {x1 ′ , x2 ′ , x3 ′ , …, x n ′}×k0×k1. It can be seen that the user data is encrypted in the same way, that is, homomorphic encryption. Therefore, by judging the same elements in the third product and the fourth product, the user data shared by the operator and the bank can be judged. In the subsequent training of the logistic regression model using the shared user data, the obtained user behavior probability model can accurately predict users with abnormal behavior.

[0130] Specifically, the target behavior indicators include abnormal call behavior evaluation indicators, user abnormal Internet behavior evaluation indicators, and user whitelist identification indicators. The method for obtaining the target behavior indicators is as follows:

[0131] Obtain the locally stored user behavior data, and based on the user behavior data, construct parameter values ​​for abnormal call behavior evaluation indicators, user abnormal Internet behavior evaluation indicators, and user whitelist identification indicators.

[0132] Among them, user behavior data is used to measure whether the user is an abnormal behavior user.

[0133] Among them, the abnormal call behavior evaluation index and the user abnormal Internet behavior evaluation index can be constructed using user behavior data, and the user whitelist identification index can be determined based on the requirement information of each model included in the whitelist system obtained by the operator or the public security system. The specific implementation method is as follows:

[0134] Step 1: Use communication behavior data to construct communication features.

[0135] Among them, the communication characteristics are used to characterize the user's abnormal communication behavior.

[0136] Specifically, the communication characteristics may include the proportion of callers, the dispersion of callers, the proportion of callers from other provinces, and the dispersion of callers from other provinces.

[0137] In an example, assuming that the number of peer numbers is not N, the number of non-deduplicated calling peer numbers is Q1, the number of deduplicated calling peer numbers is Q2, the number of non-deduplicated calling peer numbers in other provinces is Q3, and the number of deduplicated calling peer numbers in other provinces is Q4.

[0138] The caller ratio is the ratio of the number of undeduplicated caller peer numbers to the number of peer numbers, expressed as Q1 / N.

[0139] The calling dispersion is the ratio of the number of duplicate caller peer numbers to the number of non-duplicate caller peer numbers, expressed as Q2 / Q1;

[0140] The proportion of out-of-province numbers is expressed as the ratio of the number of out-of-province numbers of the calling party without deduplication to the number of the calling party, expressed as Q3 / N;

[0141] The dispersion of the calling out-of-province numbers is the ratio of the number of out-of-province numbers of the deduplicated calling parties to the number of out-of-province numbers of the non-deduplicated calling parties, expressed as Q4 / Q3.

[0142] It should be noted that the above communication features are only examples. In actual implementation, the types and quantities of communication features are not limited thereto.

[0143] Step 2: Calculate the first weight of each communication feature using the random forest algorithm.

[0144] The first weight is used to characterize the influence of the communication feature on the classification accuracy of the classification model.

[0145] Specifically, the parameter values ​​of the communication features are used to train the random forest model. For each communication feature, the parameter value of the communication feature is replaced with the parameter value in the out-of-bag (OOB) data set to obtain the influence of each communication feature on the model accuracy of the random forest model, thereby calculating the first weight corresponding to each communication feature.

[0146] Step 3: sum each communication feature and the product of the first weight of each communication feature to obtain an abnormal call behavior evaluation index.

[0147] In an example, assuming that the communication features are P1, S1, P2 and S2, the first weight corresponding to P1 is m1; the first weight corresponding to S1 is m2; the first weight corresponding to P2 is m3; and the first weight corresponding to S2 is m4. Then the abnormal fairy tale behavior evaluation index can be expressed as S = P1*w1+S1*w2+P2*w3+S2*w4, where i=1, 2, 3, 4.

[0148] Step 4: Use online behavior data to construct online behavior characteristics.

[0149] Specifically, the online behavior characteristics may include the proportion of the number of various types of applications (Application, apps), the proportion of the access time of various types of apps, and the proportion of the access time of various types of apps at night.

[0150] In an example, suppose the number of financial apps is Fc , the access time is F t , the daytime visit duration is F nt The number of remote control apps is C c , the access duration is C t , the daytime visit duration is C nt The number of social apps is S c , the access time is S t , the daytime visit duration is S nt The number of entertainment apps is E c , the access time is E t , the daytime visit duration is E nt .

[0151] The proportion of each type of app A∈(F,C,S,E), where F,C,S,E represent financial apps, remote control apps, social apps, and entertainment apps, respectively.

[0152] Percentage of visit time of various apps A∈(F,C,S,E).

[0153] The proportion of nighttime access time of various apps A∈(F,C,S,E).

[0154] It should be noted that the above communication features are only examples. In actual implementation, the types and quantities of communication features are not limited thereto.

[0155] Step 5: According to the preset corresponding relationship between each online behavior feature and the second weight, obtain the second weight corresponding to each online behavior feature.

[0156] The second weight is preset based on experience.

[0157] Step 6: sum each online behavior feature and the product of the second weight of each online behavior feature to obtain an evaluation index of the user's abnormal online behavior.

[0158] In an example, the evaluation index of user abnormal online behavior is expressed as:

[0159]

[0160] Step 7: When the user behavior data meets the required information of each model covered by the whitelist system, a user whitelist identification indicator is constructed.

[0161] The whitelist system includes multiple models, such as a good person model, a campus information machine model, a courier model, and a machine-card binding model, etc. The embodiment of the present application does not limit the type and number of models in the whitelist system.

[0162] In an example, the whitelist identification indicator can be specifically expressed as:

[0163]

[0164] Among them, u represents user behavior data, and W represents the requirement information of each model in the whitelist system.

[0165] It can be understood that the random forest algorithm is used to calculate the first weight for the communication features constructed based on the communication behavior data, so that the first weight is used to quantitatively analyze the impact of each feature in the communication features on the user's abnormal communication behavior, thereby accurately judging whether the user has abnormal communication behavior from multiple communication features, thereby improving the accuracy of the judgment. Similarly, for the user's upper-level behavior characteristics, through the preset correspondence between the Internet behavior characteristics and the second weight, it is possible to judge whether the user has abnormal Internet behavior based on multiple Internet behavior characteristics, thereby improving the accuracy of judging abnormal behavior users. In this way, by participating in the user behavior data stored locally on the device, multiple judgment indicators can be constructed to judge whether the user is an abnormal behavior user, thereby improving the accuracy of the user behavior probability model obtained by subsequent training.

[0166] The following combination Figure 4-Figure 9 The detailed process of the data query method provided by this application is introduced, such as Figure 4 As shown, the method specifically includes S401-S405:

[0167] S401: Standardize user data.

[0168] It can be understood that user data includes continuous data and discrete data. For continuous data, the Z-score can be used to standardize the user data, or the minimum and maximum values ​​(Min-Max) can be used for normalization; for discrete data, ordinal encoding (Ordinal Encoding) or one-hot encoding (One-Hot Encoding) can be used for processing.

[0169] Specifically, the Z score of continuous data is calculated using the following formula for standardization:

[0170]

[0171] Among them, X is user data, μ is mean, and σ is standard deviation. It should be noted that the calculated Z score of continuous data conforms to the normal distribution, and the mean of the normal distribution is 0 and the variance is 1.

[0172] The continuous data were normalized using the following formula:

[0173]

[0174] Among them, X is the user data, min is the minimum value, and max is the maximum value.

[0175] S402. Based on user behavior data, comprehensively identify abnormal user call behavior and abnormal Internet behavior, and filter abnormal users through a whitelist system.

[0176] Specifically, based on user behavior data, the above-mentioned user abnormal call behavior evaluation index and user abnormal Internet behavior evaluation index are constructed, and the whitelist system is used to filter abnormal users, thereby constructing a whitelist identification index.

[0177] S403: Perform intersection and alignment on the user data of each participating device based on privacy computing.

[0178] Among them, privacy computing refers to the process of obtaining overlapping user data through the above calculation. For specific content, please refer to the relevant description in the above embodiment and will not be repeated here.

[0179] S404: Calculate logistic regression model parameters based on a multi-party secure computing method based on secret sharing.

[0180] Among them, the multi-party secure computing method for secret sharing refers to the process of encrypting the parameter values ​​of the target behavior indicators by the above-mentioned participating devices, which will not be repeated here.

[0181] S405: Initiate a device query request and use an anonymous query method to search for the plaintext data of the specified user in the server.

[0182] Among them, the anonymous query method refers to the client generating a ciphertext vector in response to the specified user that the user wants to query. In this way, during the data interaction process, the ciphertext vector in the query instruction is encrypted by the client, which improves the security of data query.

[0183] exist Figure 4 Based on the embodiment shown, S401-S405 are described in detail. Figure 5 As shown, for the above S401, this step can be specifically implemented as follows:

[0184] S4011. Preparation for basic data cleaning and conversion.

[0185] The basic data refers to the original user data in the participating devices.

[0186] S4012. Initiate a data conversion request to the participating devices.

[0187] The data conversion request is used to instruct the participating devices to start standardizing the user data.

[0188] S4013. Standardization of continuous features.

[0189] The continuous feature refers to the above-mentioned continuous data. The process of standardization processing refers to the relevant description in the above-mentioned embodiment, which will not be repeated here.

[0190] S4014, Discrete feature standardization.

[0191] The discrete features refer to the above-mentioned discrete data. The process of standardization processing refers to the relevant description in the above-mentioned embodiment and will not be described again here.

[0192] like Figure 6 As shown, for the above S402, this step can be specifically implemented as follows:

[0193] S4021. Preparation for cleaning and conversion of operator basic data.

[0194] Among them, operator basic data refers to the original user data stored in the operator server.

[0195] S4022. Construct an evaluation index for abnormal call behavior.

[0196] S4023. Construct evaluation indicators for abnormal Internet behavior.

[0197] S4024. Construct whitelist identification indicators.

[0198] Specifically, the method of constructing the abnormal call behavior evaluation index, the abnormal Internet behavior evaluation index and the whitelist identification index refers to the relevant description in the above embodiments, which will not be repeated here.

[0199] S4025. Generate an operator indicator system.

[0200] Specifically, the above-mentioned abnormal call behavior evaluation index, abnormal Internet behavior evaluation index and whitelist identification index and the user data stored in the operator server constitute an indicator system.

[0201] like Figure 7 As shown, for the above S403, this step can be specifically implemented as follows:

[0202] S4031, PSI algorithm based on ECDH, P0:X={x1,x2,x3…x n},x i ∈ (0, 1), P1:Y={y1, y2, y3,…y m},x i ∈(0, 1), the two parties negotiate an elliptic curve E(p, a, b, G, n', h).

[0203] The parameters in the elliptic curve E are pre-set based on experience, and X and Y represent user data in different participating devices.

[0204] S4032, P0 generates a random number k0, k0∈(0,n); P1 generates a random number k1, k1∈(0,m).

[0205] S4033. Hash each of X until they are mapped to the value of a certain point on E; hash each of Y until they are mapped to the value of a certain point on E.

[0206] For every x in X i Hash until they are all mapped to the value of a point on E, that is, {x1 ′ , x2 ′ , x3 ′ , …, x n ′}; For each y in Y i Hash until they are all mapped to the value of a point on E, that is, {y1 ′ , y2 ′ ,y3 ′ , …, y m ′}.

[0207] S4034, calculate {x1 ′ , x2 ′ , x3 ′ , …, x n ′}×k0 to get X′×k0, and send it to P1; calculate {y1 ′ , y2 ′ ,y3 ′ , …, y m ′}×k1 to get Y′×k1.

[0208] S4035. Calculate G1=H(Y′×k0×k1), set G0=H(X′×k0×k1); calculate H(X′×k0×k1), and intercept Y′×k1 and send it to P0.

[0209] S4036, compare the elements in G0 and G1, the same elements represent the corresponding x i is the element in the intersection.

[0210] It is understandable that the calculated x corresponding to the same element i The user data shared by different participating devices. On this basis, the prediction results of the user behavior probability model trained with the user data shared by different participating devices are of reference value.

[0211] like Figure 8 As shown, for the above S404, this step can be specifically implemented as follows:

[0212] S4041. Given security parameter pp, generate private key sk, public key pk, and calculate key evk. Return (sk, pk, evk).

[0213] S4042, the participating devices P0 and P1 each hold two Z t Input x, y in the calculation [x+y] t ,[x·y] t .

[0214] Among them, Z t is the preset duration, [x+y] t ,[x·y] t is the shared ciphertext.

[0215] S4043. Extract coefficients from the product polynomial.

[0216] The method of extracting the coefficients is described in the above embodiment and will not be described again here.

[0217] S4044. Train a logistic regression model to obtain a user behavior probability model.

[0218] like Fig. 9 As shown, for the above S405, this step can be specifically implemented as follows:

[0219] S4051. The client generates a public key and a private key.

[0220] S4052. The client generates an n-dimensional ciphertext vector.

[0221] Among them, the method for generating the ciphertext vector refers to the relevant description in the above embodiment and will not be repeated here.

[0222] S4053. The client sends the n-dimensional ciphertext vector and the public key to the server.

[0223] S4054. The server calculates the inner product of the ciphertext vector and the plaintext data vector to obtain a ciphertext result.

[0224] The server can use the public key to perform secondary encryption on the result of the vector inner product, thereby improving the security of data transmission.

[0225] S4055. The client uses the private key to decrypt the ciphertext result.

[0226] With the above method, when generating shared ciphertext, each participating device does not directly transmit user data, but uses encryption to avoid data leakage, thereby improving the security of the data transmission process. When the server aggregates the plaintext data of each participating device, the plaintext data is obtained by each participating device processing the original user data using the user behavior probability model, which also avoids data leakage in the participating devices and improves the security of data transmission. In addition, since the user behavior probability model is trained based on the parameter values ​​of multiple behavior indicators, the output result of the user behavior probability model is more accurate.

[0227] Based on the same concept, the present application embodiment provides a data query device, such as Fig.10 As shown, the device is applied to a server, and the device includes:

[0228] The receiving module 1001 is used to receive a query instruction sent by a client, wherein the query instruction carries a ciphertext vector generated by the client, and a destination component in the ciphertext vector is used to query plaintext data corresponding to a specified user;

[0229] A calculation module 1002 is used to calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result, wherein the plaintext data is the probability that the user corresponding to the user data locally stored by each participating device is an abnormal behavior user output by each participating device using the user behavior probability model;

[0230] The sending module 1003 is used to send the ciphertext result to the client, so that the client can decrypt the ciphertext result to obtain the query result.

[0231] In a possible implementation, the device further includes an acquisition module and a training module:

[0232] An acquisition module, used to acquire a shared ciphertext sent by each participating device, wherein the shared ciphertext is obtained by encrypting a parameter value of a target behavior indicator by the participating device, and the target behavior indicator is used to determine whether a user is an abnormal behavior user;

[0233] A training module is used to train a logistic regression model using the shared ciphertext corresponding to each participating device to obtain a user behavior probability model corresponding to each participating device;

[0234] The sending module 1003 is also used to send the model parameters of the user behavior probability model corresponding to each participating device to each participating device, so that each participating device builds a user behavior probability model according to the model parameters of the user behavior probability model corresponding to each participating device, calculates the probability that the user corresponding to the locally stored user data is an abnormal behavior user, and sends the probability that each user is an abnormal behavior user to the server.

[0235] The present application also provides a data query device, which is applied to participating devices, such as Fig.11 As shown, the device comprises:

[0236] A calculation module 1101 is used to calculate the probability that the user corresponding to the locally stored user data is an abnormal behavior user by using the user behavior probability model corresponding to the participating device, wherein the user behavior probability model is obtained by the server training based on the shared ciphertext sent by the participating device, and the shared ciphertext is the parameter value of the target behavior indicator encrypted by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user;

[0237] The sending module 1102 is used to send to the server the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior as plaintext data. When the server receives a query instruction sent by the client, the server calculates the inner product of the ciphertext vector included in the query instruction and the vector of the plaintext data to obtain a ciphertext result, and sends the ciphertext result to the client. The client decrypts the ciphertext result to obtain a query result.

[0238] In a possible implementation, the device further includes an encryption module, a receiving module, and a building module:

[0239] An encryption module, used to encrypt the parameter value of the target behavior indicator to obtain a shared ciphertext;

[0240] The sending module 1102 is further used to send the shared ciphertext to the server, so that the server can use the shared ciphertext to train a logistic regression model to obtain a user behavior probability model corresponding to the participating device;

[0241] A receiving module, used for receiving the model parameters of the user behavior probability model sent by the server;

[0242] A construction module is used to construct the user behavior probability model using the model parameters.

[0243] In a possible implementation, the target behavior indicator includes an abnormal call behavior evaluation indicator, a user abnormal Internet behavior evaluation indicator, and a user whitelist identification indicator; the device also includes an acquisition module:

[0244] An acquisition module is used to acquire locally stored user behavior data, where the user behavior data is used to measure whether the user is an abnormal behavior user;

[0245] The construction module is also used to construct parameter values ​​of the abnormal call behavior evaluation index, the user abnormal Internet behavior evaluation index and the user whitelist identification index based on the user behavior data.

[0246] In a possible implementation, the user behavior data includes communication behavior data and online behavior data; the construction module is specifically used to:

[0247] constructing a communication feature using the communication behavior data, wherein the communication feature is used to characterize the abnormal communication behavior of the user;

[0248] Calculating a first weight of each communication feature using a random forest algorithm, where the first weight is used to characterize the degree of influence of the communication feature on the classification accuracy of the classification model;

[0249] Summing the product of each communication feature and the first weight of each communication feature to obtain the abnormal call behavior evaluation index;

[0250] constructing online behavior characteristics using the online behavior data;

[0251] According to a preset correspondence between each online behavior feature and the second weight, obtaining a second weight corresponding to each online behavior feature;

[0252] Summing each online behavior feature and the product of the second weight of each online behavior feature to obtain the user abnormal online behavior evaluation index;

[0253] When the user behavior data meets the requirement information of each model covered by the whitelist system, the user whitelist identification indicator is constructed.

[0254] In one possible implementation,

[0255] The acquisition module is further used to acquire the same user identity information in the participating device and the target participating device;

[0256] The encryption module is further used to encrypt the user data corresponding to the same user identity information using a homomorphic encryption algorithm, wherein the user data includes parameter values ​​of different behavior indicators;

[0257] The parameter value of the target behavior indicator is encrypted to obtain the shared ciphertext, wherein the target behavior indicator is a behavior indicator shared by the participating device and the target participating device.

[0258] In a possible implementation, the encryption module is specifically used to:

[0259] generating a first random number;

[0260] Performing hash calculation on the user data using a hash algorithm, mapping the user data onto a preset elliptic curve, and obtaining first mapped user data;

[0261] Calculating the product of the first mapped user data and the first random number to obtain a first product;

[0262] receiving a second product and a second random number sent by the target participating device;

[0263] respectively calculating the product of the first product and the second random number to obtain a third product, and the product of the second product and the first random number to obtain a fourth product;

[0264] taking user data corresponding to the same elements in the third product and the fourth product as overlapping user data;

[0265] Determining an overlapping behavior indicator corresponding to the overlapping user data;

[0266] The user data of the overlapping behavior indicator is encrypted.

[0267] It should be noted that the above-mentioned data query device is a device corresponding to the above-mentioned data query method applied to the server, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0268] Fig.12 A schematic diagram of the hardware structure of the server provided in an embodiment of the present application is shown.

[0269] The server may include a processor 1201 and a memory 1202 storing computer program instructions.

[0270] Specifically, the processor 1201 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0271] The memory 1202 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1202 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1202 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1202 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1202 is a non-volatile solid-state memory.

[0272] In certain embodiments, the memory 1202 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0273] The processor 1201 implements any one of the data query methods in the above embodiments by reading and executing computer program instructions stored in the memory 1202 .

[0274] In one example, the terminal device may further include a communication interface 1203 and a bus 1204. Fig.12 As shown, the processor 1201, the memory 1202, and the communication interface 1203 are connected via a bus 1204 and communicate with each other.

[0275] The communication interface 1203 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0276] Bus 1204 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1204 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0277] In addition, in combination with the data query method in the above embodiment, the embodiment of the present application can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data query methods in the above embodiment is implemented.

[0278] In combination with the data query method in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any data query method in the above embodiments.

[0279] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

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

[0281] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0282] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0283] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A data query method, characterized in that: Applied to a server, the method comprises: Receiving a query instruction sent by a client, the query instruction carrying a ciphertext vector generated by the client, wherein a destination component in the ciphertext vector is used to query plaintext data corresponding to a specified user; Calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result, wherein the plaintext data is the probability that the user corresponding to the user data locally stored by each participating device is an abnormal behavior user output by each participating device using the user behavior probability model; The ciphertext result is sent to the client so that the client can decrypt the ciphertext result to obtain the query result.

2. The method according to claim 1, characterized in that Before calculating the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain the ciphertext result, the method further includes: Obtaining a shared ciphertext sent by each participating device, wherein the shared ciphertext is obtained by encrypting a parameter value of a target behavior indicator by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user; Using the shared ciphertext corresponding to each participating device, the logistic regression model is trained to obtain the user behavior probability model corresponding to each participating device; The model parameters of the user behavior probability model corresponding to each participating device are sent to each participating device, so that each participating device builds a user behavior probability model according to the model parameters of the user behavior probability model corresponding to each participating device, calculates the probability that the user corresponding to the locally stored user data is an abnormal behavior user, and sends the probability that each user is an abnormal behavior user to the server.

3. A data query method, characterized in that: Applied to a participating device, the method comprises: The probability that the user corresponding to the locally stored user data is an abnormal behavior user is calculated using the user behavior probability model corresponding to the participating device, wherein the user behavior probability model is obtained by the server training based on the shared ciphertext sent by the participating device, and the shared ciphertext is the parameter value of the target behavior indicator encrypted by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user; The probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior is sent to the server, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior as plaintext data. When the server receives a query instruction sent by the client, the server calculates the inner product of the ciphertext vector and the vector of the plaintext data included in the query instruction to obtain a ciphertext result, and sends the ciphertext result to the client. The client decrypts the ciphertext result to obtain a query result.

4. The method according to claim 3, characterized in that Before calculating the probability that the user corresponding to the locally stored user data is an abnormal behavior user using the user behavior probability model corresponding to the participating device, the method further includes: Encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext; Sending the shared ciphertext to the server, so that the server can use the shared ciphertext to train a logistic regression model to obtain a user behavior probability model corresponding to the participating device; Receiving model parameters of the user behavior probability model sent by the server; The user behavior probability model is constructed using the model parameters.

5. The method according to claim 4, characterized in that The target behavior indicators include an abnormal call behavior evaluation indicator, a user abnormal online behavior evaluation indicator, and a user whitelist identification indicator; before encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext, the method further includes: Obtaining locally stored user behavior data, where the user behavior data is used to measure whether the user is an abnormal behavior user; Based on the user behavior data, parameter values ​​of the abnormal call behavior evaluation index, the user abnormal Internet behavior evaluation index and the user whitelist identification index are constructed.

6. The method according to claim 5, characterized in that The user behavior data includes communication behavior data and online behavior data; The constructing of the abnormal call behavior evaluation index, the user abnormal online behavior evaluation index and the user whitelist identification index based on the user behavior data includes: constructing a communication feature using the communication behavior data, wherein the communication feature is used to characterize the abnormal communication behavior of the user; Calculating a first weight of each communication feature using a random forest algorithm, where the first weight is used to characterize the degree of influence of the communication feature on the classification accuracy of the classification model; Summing the product of each communication feature and the first weight of each communication feature to obtain the abnormal call behavior evaluation index; constructing online behavior characteristics using the online behavior data; According to a preset correspondence between each online behavior feature and the second weight, obtaining a second weight corresponding to each online behavior feature; Summing each online behavior feature and the product of the second weight of each online behavior feature to obtain the user abnormal online behavior evaluation index; When the user behavior data meets the requirement information of each model covered by the whitelist system, the user whitelist identification indicator is constructed.

7. The method according to claim 4, characterized in that Before encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext, the method further includes: Obtaining the same user identity information in the participating device and the target participating device; Encrypting user data corresponding to the same user identity information using a homomorphic encryption algorithm, wherein the user data includes parameter values ​​of different behavior indicators; The encrypting the parameter value of the target behavior indicator to obtain a shared ciphertext includes: The parameter value of the target behavior indicator is encrypted to obtain the shared ciphertext, wherein the target behavior indicator is a behavior indicator shared by the participating device and the target participating device.

8. The method according to claim 7, characterized in that The encrypting the user data corresponding to the same user identity information by using a homomorphic encryption algorithm includes: generating a first random number; Performing hash calculation on the user data using a hash algorithm, mapping the user data onto a preset elliptic curve, and obtaining first mapped user data; Calculating the product of the first mapped user data and the first random number to obtain a first product; Receiving a second product and a second random number sent by the target participating device; respectively calculating the product of the first product and the second random number to obtain a third product, and the product of the second product and the first random number to obtain a fourth product; taking user data corresponding to the same elements in the third product and the fourth product as overlapping user data; Determining an overlapping behavior indicator corresponding to the overlapping user data; The user data of the overlapping behavior indicator is encrypted.

9. A data query device, characterized in that: Applied to a server, the device comprises: A receiving module, configured to receive a query instruction sent by a client, wherein the query instruction carries a ciphertext vector generated by the client, and a destination component in the ciphertext vector is used to query plaintext data corresponding to a specified user; A calculation module, used to calculate the inner product of the ciphertext vector and the vector of the locally stored plaintext data to obtain a ciphertext result, wherein the plaintext data is the probability that the user corresponding to the user data locally stored by each participating device is an abnormal behavior user output by each participating device using the user behavior probability model; The sending module is used to send the ciphertext result to the client, so that the client can decrypt the ciphertext result to obtain the query result.

10. A data query device, characterized in that: Applied to participating equipment, the device comprises: A calculation module, used to calculate the probability that the user corresponding to the locally stored user data is an abnormal behavior user by using the user behavior probability model corresponding to the participating device, wherein the user behavior probability model is obtained by the server training based on the shared ciphertext sent by the participating device, and the shared ciphertext is the parameter value of the target behavior indicator encrypted by the participating device, and the target behavior indicator is used to determine whether the user is an abnormal behavior user; A sending module is used to send to the server the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior, so that the server uses the probability that the user corresponding to the user data locally stored in the participating device is a user with abnormal behavior as plaintext data. When the server receives a query instruction sent by the client, the server calculates the inner product of the ciphertext vector and the vector of the plaintext data included in the query instruction to obtain a ciphertext result, sends the ciphertext result to the client, and the client decrypts the ciphertext result to obtain a query result.

11. A server, characterized in that: The server includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1 to 2 is implemented.

12. A participating device, characterized in that: The participating device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 3 to 8 is implemented.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 2 is implemented, or the method according to any one of claims 3 to 8 is implemented.

14. A computer program product, characterized in that The computer product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2 is performed, or the method according to any one of claims 3 to 8 is realized.