Privacy reasoning method, first node and second terminal
By receiving the privacy reasoning request from the first node, verifying zero-knowledge proof using the detection model, and performing privacy reasoning, the problem of untrustworthy privacy reasoning services in AIGC is solved, and the inference efficiency and quality are improved.
Patent Information
- Application Number
- CN202411524114.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-11
AI Technical Summary
In Artificial Intelligence Generated Content (AIGC), privacy reasoning service providers are unable to check the quality of user input data, resulting in untrustworthy inference results and inability to improve the efficiency and quality of reasoning.
By receiving a privacy inference request from the first node, including demand information and the first zero-knowledge proof, the zero-knowledge proof is verified using the detection model, and privacy inference is performed based on the verification results, and the inference results are sent to the first node.
It ensures that the quality of the input data and filter malicious information can still be verified without obtaining the content input by the user, and improves the credibility and efficiency of the inference results.
Smart Images

Figure CN119416892A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence (AI) and information security, and in particular to a privacy reasoning method, a first node and a second terminal. Background Art
[0002] With the rapid development of artificial intelligence technology, artificial intelligence generated content (AIGC) has gradually become a hot topic in the field of science and technology. AIGC can quickly analyze and utilize large amounts of data and quickly infer user input content.
[0003] In the related technology, in the scenario of AIGC's privacy reasoning service, the reasoning service provider cannot obtain the user's input information, and therefore cannot check the quality of the user's input data, and thus cannot guarantee that the final reasoning result is credible, and cannot further improve the reasoning efficiency and reasoning quality. Summary of the invention
[0004] The present disclosure provides a privacy reasoning method, a first node and a second terminal.
[0005] A first aspect of the present disclosure provides a privacy reasoning method, comprising: receiving a privacy reasoning request from a first node; wherein the privacy reasoning request includes requirement information and a first zero-knowledge proof, and the first zero-knowledge proof is generated for a formation process of the requirement information; verifying the first zero-knowledge proof using a detection model; wherein the detection model is registered by the first node; performing privacy reasoning on the requirement information according to the verification result to obtain a reasoning result; and sending the reasoning result to the first node.
[0006] According to an embodiment of the present disclosure, before receiving a privacy reasoning request, it includes: receiving a registration request from a first node; wherein the registration request includes relevant parameters for converting an initial model and a second zero-knowledge proof, and the second zero-knowledge proof is generated for the conversion process of the initial model; verifying the second zero-knowledge proof using relevant parameters; converting the initial model according to the verification result to obtain a detection model; sending a first notification message to the first node; the first notification message indicates that the detection model has completed registration.
[0007] According to an embodiment of the present disclosure, before receiving a privacy reasoning request, it also includes: using relevant parameters required for registration of a detection model to process randomly acquired data to be evaluated to obtain an identification to be evaluated; sending the identification to be evaluated to a first node; receiving feedback information from the first node; wherein the feedback information includes an evaluation result of the identification to be evaluated and a third zero-knowledge proof, and the third zero-knowledge proof is generated for the evaluation process of the identification to be evaluated; verifying the evaluation result and the third zero-knowledge proof; and sending a second notification information to the first node based on the verification result; the second notification information indicates that the detection model has completed the evaluation.
[0008] The second aspect of the present disclosure provides a privacy reasoning method, including: converting input content to be reasoned to obtain requirement information, and generating a first zero-knowledge proof for the conversion process of the input content; constructing a privacy reasoning request based on the requirement information and the first zero-knowledge proof; sending the privacy reasoning request to a second terminal; receiving the reasoning result fed back by the second terminal; wherein the reasoning result is verified.
[0009] According to an embodiment of the present disclosure, before converting the input content to be inferred, it includes: converting the word unit encoding of the initial model and the weight matrix of the embedding layer to generate a second zero-knowledge proof for the conversion process; constructing a registration request for the detection model according to the second zero-knowledge proof and relevant parameters of the conversion process; wherein the detection model is converted from the initial model; sending a registration request to a second terminal; receiving a first notification message from the second terminal; the first notification message is verified and indicates that the detection model has completed registration.
[0010] According to an embodiment of the present disclosure, before converting the input content to be inferred, it also includes: receiving an identification to be evaluated from a second terminal; wherein the identification to be evaluated is verified and represents an evaluation of the detection model; evaluating the identification to be evaluated, obtaining an evaluation result, and generating a third zero-knowledge proof for the evaluation process; sending the evaluation result and the third zero-knowledge proof to the second terminal; receiving a second notification message from the second terminal; the second notification message is verified and represents that the detection model has completed the evaluation.
[0011] According to an embodiment of the present disclosure, evaluating the identifier to be evaluated and obtaining the evaluation result includes: obtaining relevant parameters required for registration of the detection model; wherein the detection model is obtained by converting the word unit encoding and the weight matrix of the embedding layer of the initial model, and the relevant parameters include a first parameter for converting the word unit encoding and a second parameter for converting the weight matrix; using the first parameter, converting the identifier to be evaluated; using the second parameter, evaluating the converted identifier to be evaluated to obtain the evaluation result.
[0012] According to an embodiment of the present disclosure, converting the input content to be inferred includes: processing the input content using relevant parameters to obtain processed data; and encrypting the processed data to obtain demand information.
[0013] The third aspect of the present disclosure provides a first node, comprising: at least one processor; and a transceiver and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform: converting the input content to be inferred to obtain requirement information, and generating a first zero-knowledge proof for the conversion process of the input content; constructing a privacy reasoning request based on the requirement information and the first zero-knowledge proof; sending the privacy reasoning request to the second terminal; and receiving the reasoning result fed back by the second terminal; wherein the reasoning result is verified.
[0014] The fourth aspect of the present disclosure provides a second terminal, comprising: at least one processor; and a transceiver and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: receiving a privacy reasoning request from a first node; the privacy reasoning request includes requirement information and a first zero-knowledge proof, wherein the first zero-knowledge proof is generated for the formation process of the requirement information; verifying the first zero-knowledge proof using a detection model; the detection model is obtained by registering the first node; performing privacy reasoning on the requirement information according to the verification result to obtain a reasoning result; and sending the reasoning result to the first node.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The foregoing and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 The system architecture diagram of the privacy reasoning method according to an embodiment of the present disclosure is schematically shown.
[0018] Figure 2 The flowchart of the privacy inference method according to the first embodiment of the present disclosure is schematically shown.
[0019] Figure 3 The flowchart of detection model registration according to the first embodiment of the present disclosure is schematically shown.
[0020] Figure 4The schematic diagram shows a principle diagram of detection model registration according to the first embodiment of the present disclosure.
[0021] Figure 5 The flowchart of the detection model evaluation according to the first embodiment of the present disclosure is schematically shown.
[0022] Figure 6 The flowchart of the privacy inference method according to the second embodiment of the present disclosure is schematically shown.
[0023] Figure 7 The flowchart of detection model registration according to the second embodiment of the present disclosure is schematically shown.
[0024] Figure 8 The flowchart of the detection model evaluation according to the second embodiment of the present disclosure is schematically shown.
[0025] Fig. 9 The flowchart of the privacy reasoning method according to the third embodiment of the present disclosure is schematically shown.
[0026] Fig.10 A block diagram of a first node according to an embodiment of the present disclosure is schematically shown.
[0027] Fig.11 A block diagram of a second terminal according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0032] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] Before describing the specific embodiments of the present disclosure in detail, related concepts are first explained.
[0034] Privacy Reasoning:
[0035] In order to protect data privacy and security, the concept of privacy reasoning of neural networks is proposed to protect the input data, output reasoning results, specific information of the model (including model structure, parameters and loss function, etc.) and user information during the reasoning process. Privacy reasoning technology allows users to use neural network reasoning services without disclosing their sensitive data. In addition, this technology can also effectively protect the data security of service providers.
[0036] Zero-knowledge proof technology:
[0037] Zero-Knowledge Proof (ZKP) is a cryptographic concept used to prove the correctness of a statement without revealing any specific information about the statement. In a zero-knowledge proof, the prover (usually a computer program) tries to prove to the verifier that a certain assertion is true, and the verifier only gets the correctness of the proof without any other information about the assertion.
[0038] Zero-knowledge proofs are used in many fields, including cryptography, security protocols, blockchain, etc. It can be used to solve some privacy and security issues, such as identity authentication, anonymous transactions, data privacy, etc. By using zero-knowledge proofs, the correctness of an assertion can be proved to other parties without leaking sensitive information, thereby improving privacy protection and security.
[0039] Figure 1 The system architecture diagram of the privacy inference method according to the embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0040] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first node 101 and a second terminal 102. The first node 101 may be communicatively connected to the second terminal 102 via a network. The network may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0041] The first node 101, also called a user node, may have a display screen, which may provide an interactive interface, and the user may select, edit, and perform other operations on the interactive interface of the first node 101 to input content, convert input content, generate zero-knowledge proofs, construct privacy reasoning requests, and the like. The first node 101 includes, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0042] The second terminal 102 may be a server providing privacy reasoning services, such as a background management server (only as an example) that provides support for the privacy reasoning request constructed by the user using the first node 101. The background management server may analyze and process the received data such as the privacy reasoning request of the user, and feed back the processing result (such as the web page, information, or data obtained or generated according to the user request) to the first node 101.
[0043] The second terminal 102 includes but is not limited to terminal devices such as smart phones, tablet computers, laptop computers, desktop computers, and intelligent robots. It can also be implemented as network devices such as base stations and access points. It can also be implemented as a single server, or a server cluster composed of multiple servers, or a cloud computing center.
[0044] Optionally, the first node and the second terminal can be located on the same device, and the second terminal provides privacy reasoning services for the first node. The first node is an application programming interface (API) integrated in the device for users to input content, convert input content, generate zero-knowledge proofs, construct privacy reasoning requests, etc.
[0045] Optionally, the first node and the second terminal may be two independent devices connected to each other, and the second terminal provides remote services of privacy reasoning for the first node.
[0046] It should be understood that Figure 1 The types and numbers of the first nodes and second terminals in the embodiment are only for illustration purposes. According to implementation requirements, any types and numbers of the first nodes and second terminals may be provided.
[0047] In order to more clearly understand the present disclosure, the present disclosure will be described below in conjunction with several embodiments. It should be understood that although the following embodiments are described in an independent manner, these embodiments can be used in combination without exclusion.
[0048] Figure 2 The flowchart of the privacy inference method according to the first embodiment of the present disclosure is schematically shown.
[0049] like Figure 2 As shown, the privacy reasoning method of this embodiment can be executed by the first node, and the method includes steps S210 to S240.
[0050] Step S210, converting the input content to be inferred to obtain requirement information, and generating a first zero-knowledge proof for the conversion process of the input content.
[0051] For example, the input content may be text, pictures, files, voice, video, etc. The text may be a complete paragraph of text, or one or more prompt words, or an identifier, index, etc. The present disclosure does not limit the type and quantity of the input content.
[0052] For example, the input content may be data of a sensitive type or data of a non-sensitive type. Sensitive data may be an ID card, a bank card, a password, etc. The present disclosure does not limit the data type of the input content.
[0053] Step S220: construct a privacy reasoning request based on the demand information and the first zero-knowledge proof.
[0054] Step S230: Send a privacy reasoning request to the second terminal.
[0055] Step S240, receiving the inference result fed back by the second terminal; wherein the inference result is verified.
[0056] For example, the first zero-knowledge proof may prove to the second terminal that the requirement information of the first node satisfies its filtering condition.
[0057] For example, the inference result is obtained by the second terminal performing privacy inference on the required information when the second terminal verifies the first zero-knowledge proof and the verification passes.
[0058] Through the embodiments of the present disclosure, the user side constructs a privacy reasoning request based on the demand information and the first zero-knowledge proof, and then sends the request to the second terminal, so that the second terminal performs privacy reasoning based on the request. Based on this, when the user of the first node calls the privacy reasoning service provided by the second terminal, it is only necessary to convert the user input content to obtain the demand information, and generate a proof for the conversion process of the input content, so that the second terminal can still ensure that malicious information is filtered out in the input content when it cannot obtain the user input content, which greatly reduces the computing cost and improves the availability of the privacy reasoning service.
[0059] When the privacy inference service is enabled on the second terminal, the first node needs to register with the second terminal in advance to obtain a detection model. The detection model may be, for example, a malicious information detection model, which can detect malicious information in user input.
[0060] Figure 3 The flowchart of detection model registration according to the first embodiment of the present disclosure is schematically shown. Figure 4 The schematic diagram shows a principle diagram of detection model registration according to the first embodiment of the present disclosure.
[0061] like Figure 3 and Figure 4 As shown, in some embodiments, before the aforementioned step S210 converts the input content to be inferred, it can also include steps S301 to S304 executed by the first node.
[0062] Step S301, converting the word unit encoding of the initial model and the weight matrix of the embedding layer to generate a second zero-knowledge proof for the conversion process.
[0063] This step is to split and transform the initial model. The initial model can be a classification model located locally in the first node and including an Embedding layer. The classification model can be a fully connected neural network, a convolutional neural network, a recurrent neural network, a Transformer neural network, etc. The specific network model is not limited in this disclosure.
[0064] According to an embodiment of the present disclosure, the initial model includes a weight part and a tokenizer part. The tokenizer part is responsible for encoding the model input into a tokenID (word unit encoding).
[0065] According to an embodiment of the present disclosure, the word unit encoding and the weight matrix of the embedding layer of the initial model are converted, including: using a preset permutation matrix, respectively converting the word unit encoding and the weight matrix of the embedding layer of the initial model, and generating a second zero-knowledge proof for the conversion process.
[0066] According to an embodiment of the present disclosure, the initial model includes a first word segmenter and a first weight matrix; the word unit encoding and the weight matrix of the embedding layer of the initial model are converted respectively, including: using a permutation matrix to shuffle multiple word units of the first word segmenter to obtain a second word segmenter; using a permutation matrix to perform row permutations on a sub-weight matrix in the first weight matrix to update the first weight matrix to obtain a second weight matrix; wherein the sub-weight matrix is the weight matrix of the embedding layer of the initial model.
[0067] For example, see Figure 4 , the permutation matrix can be the tokenizer part of the initial model DM The number of tokens supported by the (first tokenizer) is generated. Assuming the number of tokens is m, where m is a positive integer, a permutation matrix with dimension m can be generated. , and calculate Hash value , , Hash() represents the hash function.
[0068] First tokenizer for the initial model , using the permutation matrix Disrupt the order of each token to get the second tokenizer .
[0069] The first weight matrix for the initial model , where the Embedding layer weight (For easy distinction, named the first sub-weight matrix) is usually a matrix with dimensions of m rows and d columns, using the permutation matrix Perform row permutation on the first sub-weight matrix to obtain the second sub-weight matrix , so that the first weight matrix Update and get the second weight matrix .
[0070] Next, generate a second zero-knowledge proof for the conversion process of the initial model’s word encoding and the weight matrix of the embedding layer , which can be expressed as:
[0071]
[0072] In the formula, represents zero-knowledge proof, To hide input, The second zero-knowledge proof is The following two conversion methods are mainly proved:
[0073] 1)
[0074] 2)
[0075] Step S302, constructing a registration request for a detection model according to the second zero-knowledge proof and relevant parameters of the conversion process; wherein the detection model is obtained by converting the initial model.
[0076] For example, the relevant parameters of the conversion process include the first tokenizer , the second weight matrix , hash value , Second Zero-Knowledge Proof These relevant parameters may be stored in a predetermined format to construct a registration request for a detection model.
[0077] Step S303: Send a registration request to the second terminal.
[0078] Step S304, receiving a first notification message from the second terminal; the first notification message is verified and indicates that the detection model has completed registration.
[0079] For example, the first notification information is generated after the second terminal converts the initial model to obtain the detection model when the second zero-knowledge proof is verified and the verification passes.
[0080] Through the embodiments of the present disclosure, the first node transforms the initial model, confuses the tokenizer and the embedding layer of the model weight, destroys the mapping relationship between the token and the input, and proves this transformation relationship in the second zero-knowledge proof. Then, the initial model is transformed into a detection model and registered in the second terminal.
[0081] In some embodiments, when the second terminal passes the verification of the second zero-knowledge proof, the second terminal may request the first node to evaluate the detection model requested to be registered based on the issued identification to be evaluated to prove that the detection model requested to be registered can meet the requirements. Figure 5 The flowchart of the detection model evaluation according to the first embodiment of the present disclosure is schematically shown.
[0082] like Figure 5 As shown, before the aforementioned step S210 converts the input content to be inferred, it can also include steps S501 to S504 executed by the first node.
[0083] Step S501: receiving an identification to be evaluated from a second terminal; wherein the identification to be evaluated is verified and represents an evaluation of a detection model.
[0084] For example, the identification to be evaluated may be generated by the second terminal when the second zero-knowledge proof is verified successfully, and is used to request the first node to evaluate the detection model requested to be registered.
[0085] Step S502: Evaluate the identification to be evaluated, obtain an evaluation result, and generate a third zero-knowledge proof for the evaluation process.
[0086] Step S503: Send the evaluation result and the third zero-knowledge proof to the second terminal.
[0087] Step S504, receiving a second notification message from a second terminal; the second notification message is verified and indicates that the detection model has completed evaluation.
[0088] Through the embodiments of the present disclosure, based on the identification to be evaluated issued by the second terminal, the first node evaluates the identification to be evaluated and generates a third zero-knowledge proof for the evaluation process. After receiving the evaluation result and the third zero-knowledge proof, the second terminal can send a notification to the first node after verification. Then, after learning that the detection model has completed the evaluation, the first node can initiate a privacy reasoning request to the second terminal.
[0089] In some embodiments, the aforementioned step S502 evaluates the identification to be evaluated, and the evaluation result obtained includes:
[0090] Obtain relevant parameters required for registration of the detection model; wherein the detection model is obtained by converting the word unit encoding and the weight matrix of the embedding layer of the initial model, and the relevant parameters include a first parameter for converting the word unit encoding and a second parameter for converting the weight matrix;
[0091] Use the first parameter to transform the identifier to be evaluated;
[0092] The converted identifier to be evaluated is evaluated using the second parameter to obtain an evaluation result.
[0093] For example, the flag to be evaluated is represented as , the first parameter can be a permutation matrix , the second parameter can be the second weight matrix . Therefore, we can first use the permutation matrix Identification for evaluation Perform row permutation; then use the second weight matrix The identifier to be evaluated after the row is replaced Conduct an assessment and obtain the assessment results .
[0094] And, generate a third zero-knowledge proof for the evaluation process of the identifier to be evaluated , which can be expressed as:
[0095]
[0096] In the formula, To hide input, The third zero-knowledge proof The following three conversion methods are mainly proved:
[0097] 1)
[0098] 2)
[0099] 3)
[0100] Then, the first node sends the evaluation result to the second terminal. And the third zero-knowledge proof .
[0101] In some embodiments, the aforementioned step S210 converts the input content to be inferred, including the following steps performed by the first node:
[0102] Use relevant parameters to process the input content to obtain processed data;
[0103] The processed data is encrypted to obtain the required information.
[0104] The relevant parameters required for registering the model are used, and this is done after the user completes the model registration with the service provider.
[0105] Through the embodiments of the present disclosure, the first node uses the relevant parameters required by the registration model to convert the input content to be inferred, and generates a first zero-knowledge proof for the conversion process of the input content. As a result, when the second terminal cannot obtain the user input content, it can still use the detection model registered by the first node to verify the first zero-knowledge proof contained in the privacy reasoning request.
[0106] In some embodiments, the relevant parameters include a second word segmenter; and using the relevant parameters to process the input content includes: encoding the input content using the second word segmenter to obtain processed data.
[0107] For example, the input content is represented as input, and the second tokenizer is used first. Encode the input into tokenID format and get the corresponding tokenID list , as the processing data. Then, use the preset private key to process the data Encrypt and obtain the required information .
[0108] And, generate the first zero-knowledge proof for the conversion process of the input content , which can be expressed as:
[0109]
[0110] In the formula, To hide input, The first zero-knowledge proof The following three conversion methods are mainly proved:
[0111] 1)
[0112] 2)
[0113] 3)
[0114] In the formula, SK represents the private key, Indicates encryption using the private key SK.
[0115] For example, processing data For encryption, a symmetric encryption algorithm, a homomorphic encryption algorithm, etc. may be used, and the present disclosure does not limit the specific encryption algorithm.
[0116] In some embodiments, the aforementioned step S220 constructs a privacy reasoning request according to the demand information and the first zero-knowledge proof, including: , demand information and the first zero-knowledge proof Stored in a predetermined format, construct privacy reasoning requests.
[0117] In some embodiments, after the aforementioned step S240 receives the inference result fed back by the second terminal, it may also include the first node performing: decrypting the inference result to obtain the plaintext of the inference result corresponding to the input content. In this way, the first node decrypts the inference result fed back by the second terminal to obtain the actual inference output.
[0118] In the embodiments of the present disclosure, the first zero-knowledge proof, the second zero-knowledge proof and the third zero-knowledge proof can all be circuit systems based on zero-knowledge proof. The steps in the conversion process and the requirements for intermediate results are expressed through the circuit systems. The design of the zero-knowledge proof circuit in the privacy reasoning process is described in detail below.
[0119] Zero-knowledge proof can be abstracted into the components of input, circuit calculation and public output, where input is divided into secret input and public input (input visible to the outside world). The design purpose of the zero-knowledge proof circuit is to allow the first node to input secret input and public input, and obtain output according to the conversion requirements set by the first node. This output allows the second terminal to verify the validity without knowing the secret input of the first node.
[0120] Figure 6 The flowchart of the privacy inference method according to the second embodiment of the present disclosure is schematically shown.
[0121] like Figure 6 As shown, the privacy reasoning method of this embodiment can be executed by the second terminal, and the method includes steps S610 to S640.
[0122] Step S610, receiving a privacy reasoning request from a first node; wherein the privacy reasoning request includes demand information and a first zero-knowledge proof, and the first zero-knowledge proof is generated for a formation process of the demand information.
[0123] For example, the first zero-knowledge proof is a proof document formed by zero-knowledge proof technology, so as to allow the second terminal to subsequently verify the formation process of the demand information.
[0124] Step S620: Use the detection model to verify the first zero-knowledge proof; wherein the detection model is registered by the first node.
[0125] Step S630: perform privacy reasoning on the demand information according to the verification result to obtain a reasoning result.
[0126] For example, the verification result of the first zero-knowledge proof may be a verification pass or a verification fail. In the case of a verification pass, the second terminal may face the first node and enable a privacy reasoning service to perform privacy reasoning on the required information.
[0127] Step S640: Send the inference result to the first node.
[0128] Through the embodiments of the present disclosure, when the second terminal receives a privacy reasoning request from the first node, it first uses the detection model registered by the first node to verify the first zero-knowledge proof contained in the request, and then performs privacy reasoning on the requirement information contained in the request based on the verification result to obtain the reasoning result, and then feeds back the reasoning result to the first node.
[0129] In this way, the second terminal can still verify the privacy inference request from the first node when it cannot obtain the user input content to ensure that malicious information is filtered out of the input content, which greatly reduces the computing cost, improves the availability of the privacy inference service, and improves the efficiency and quality of inference. In this way, the problem of poor inference effect caused by immediately enabling the privacy inference service upon receiving the privacy inference request and the inability to effectively filter or screen the content to be inferred by the user input is avoided.
[0130] When the privacy reasoning service is enabled on the second terminal, the first node needs to register with the second terminal in advance to obtain a detection model. Figure 7 The flowchart of detection model registration according to the second embodiment of the present disclosure is schematically shown.
[0131] like Figure 7 As shown, in some embodiments, before the aforementioned operation S610 receives the privacy inference request, it may also include steps S701 to S704 executed by the second terminal.
[0132] Step S701, receiving a registration request from a first node; wherein the registration request includes relevant parameters for converting an initial model and a second zero-knowledge proof, and the second zero-knowledge proof is generated for the conversion process of the initial model.
[0133] Step S702: Use relevant parameters to verify the second zero-knowledge proof.
[0134] Step S703, converting the initial model according to the verification result to obtain a detection model.
[0135] For example, the verification result of the second zero-knowledge proof may be a verification pass or a verification fail. In the case of a verification pass, the second terminal converts the initial model to obtain a detection model, thereby completing the registration of the detection model.
[0136] Step S704: Send a first notification message to the first node; the first notification message indicates that the detection model has completed registration.
[0137] Through the embodiments of the present disclosure, when the second terminal receives the registration request for the detection model from the first node, it first verifies the second zero-knowledge proof contained in the request, and then registers the detection model based on the verification result. Then, after the first node learns that the registration of the detection model is completed, it can initiate a privacy reasoning request to the second terminal.
[0138] In some embodiments, when the second terminal passes the verification of the second zero-knowledge proof, the second terminal may request the first node to evaluate the detection model requested to be registered based on the issued identification to be evaluated to prove that the detection model requested to be registered can meet the requirements. Figure 8The flowchart of the detection model evaluation according to the second embodiment of the present disclosure is schematically shown.
[0139] like Figure 8 As shown, before the aforementioned operation S610 receives the privacy inference request, it may also include steps S801 to S805 executed by the second terminal.
[0140] Step S801: Use the relevant parameters required for detection model registration to process the randomly acquired data to be evaluated, and obtain an identification to be evaluated.
[0141] According to an embodiment of the present disclosure, the relevant parameters include a first word segmenter; step S801 may include: when the second zero-knowledge proof is verified successfully, the second terminal randomly obtains multiple data to be evaluated from a pre-stored data set to be evaluated; and uses the first word segmenter to encode the multiple data to be evaluated to obtain an identification to be evaluated.
[0142] For example, when the second terminal passes the second zero-knowledge proof verification, it can obtain the locally stored data set to be evaluated. , randomly obtain k pieces of data to be evaluated, k is a positive integer. Then, use the first tokenizer Encode k pieces of data to be evaluated into tokenID format and get the corresponding tokenID list , as the identification to be evaluated, for the first node to evaluate.
[0143] Step S802: Send an identification to be evaluated to the first node.
[0144] Step S803, receiving feedback information from the first node; wherein the feedback information includes an evaluation result of the identifier to be evaluated and a third zero-knowledge proof, and the third zero-knowledge proof is generated for the evaluation process of the identifier to be evaluated.
[0145] Step S804: verify the evaluation result and the third zero-knowledge proof.
[0146] Step S805: Send a second notification message to the first node according to the verification result; the second notification message indicates that the detection model has completed the evaluation.
[0147] For example, the second terminal receives the evaluation result of the first node for the to-be-evaluated identifier And the third zero-knowledge proof When the evaluation result and the third zero-knowledge proof are verified, the first node can be notified if both are verified. Then, after the first node learns that the detection model has completed the evaluation, it can initiate a privacy reasoning request to the second terminal.
[0148] According to an embodiment of the present disclosure, verifying the evaluation result and the third zero-knowledge proof includes: verifying the third zero-knowledge proof when it is determined that the evaluation result is greater than the result threshold; and sending a second notification message to the first node when the verification passes. The result threshold is preset and is not specifically limited by the present disclosure.
[0149] In this way, the second terminal can first check whether the evaluation result meets the requirements. If it does, it can verify the third zero-knowledge proof. If the verification passes, it can be confirmed that the detection model requested to be registered by the first node meets the requirements. At this point, the second terminal can enable the privacy reasoning service for the first node.
[0150] In order to better understand the embodiments of the present disclosure, the technical solution of the present disclosure is further described below through an exemplary embodiment.
[0151] Fig. 9 The flowchart of the privacy reasoning method according to the third embodiment of the present disclosure is schematically shown.
[0152] like Fig. 9 As shown, the privacy reasoning method of this embodiment can be interactively executed by the first node and the second terminal, and the method includes steps A to L.
[0153] Step A: The first node constructs a registration request for the detection model.
[0154] In some embodiments, step A may further include the aforementioned steps S301 to S302, which are not described in detail here. It should be understood that the registration request includes the second zero-knowledge proof and the relevant parameters of the initial model conversion process. The detection model is obtained by converting the initial model.
[0155] Step B: The first node sends a registration request to the second terminal.
[0156] In some embodiments, step B may further include the aforementioned step S303, which will not be described in detail here.
[0157] Step C: The second terminal verifies the registration request and generates an identification to be evaluated.
[0158] In some embodiments, step C may further include the process of verifying the second zero-knowledge proof in the registration request in the aforementioned steps S701 to S702, and the process of generating the identification to be evaluated in step S801, which will not be repeated here.
[0159] Step D: The second terminal sends an identification to be evaluated to the first node.
[0160] In some embodiments, step D may further include the aforementioned step S802, which will not be repeated here.
[0161] In step E, the first node evaluates the identifier to be evaluated, obtains an evaluation result, and generates a third zero-knowledge proof for the evaluation process.
[0162] In some embodiments, step E may further include the aforementioned steps S501 to S502, which will not be repeated here.
[0163] Step F: The first node sends the evaluation result and the third zero-knowledge proof to the second terminal.
[0164] In some embodiments, step F may further include the aforementioned step S503, which will not be described in detail here.
[0165] Step G: The second terminal verifies the evaluation result and the third zero-knowledge proof.
[0166] In some embodiments, step G may further include the aforementioned steps S803 to S804, which will not be repeated here.
[0167] In step H, the second terminal sends a notification to the first node, indicating that the model evaluation is completed.
[0168] In some embodiments, step H may further include the aforementioned step S805, which will not be repeated here.
[0169] In step I, the first node constructs a privacy reasoning request.
[0170] In some embodiments, step I may further include the aforementioned steps S210 to S220, which are not described in detail here. It should be understood that the privacy reasoning request includes the requirement information and the first zero-knowledge proof.
[0171] Step J: The first node sends a privacy reasoning request to the second terminal.
[0172] In some embodiments, step J may further include the aforementioned step S230, which will not be repeated here.
[0173] Step K: The second terminal uses the registered detection model to verify the first zero-knowledge proof in the privacy reasoning request, and performs privacy reasoning on the required information after the verification is passed.
[0174] In some embodiments, step K may further include the aforementioned steps S610 to S630, which will not be repeated here.
[0175] Step L: the second terminal sends the inference result to the first node.
[0176] In some embodiments, step L may further include the aforementioned step S640, which will not be repeated here.
[0177] Through the embodiments of the present disclosure, the first node converts the initial model, converts the initial model into a detection model, and registers it in the second terminal. At the same time, a proof of the detection model function is designed for the second terminal, indicating that the detection model can meet the requirements. In the process of the user of the first node calling the privacy reasoning service provided by the second terminal, it is only necessary to convert the input content to obtain the required information, and generate a proof for the conversion process of the input content, so that when the second terminal cannot obtain the input content, it can still ensure that malicious information is filtered out in the input content, which greatly reduces the computing cost and improves the availability.
[0178] Fig.10 A block diagram of a first node according to an embodiment of the present disclosure is schematically shown.
[0179] like Fig.10 As shown, the first node 1000 of this embodiment includes a processor 1010, a memory 1020, and a transceiver 1030. The processor 1010, the memory 1020, and the transceiver 1030 may be connected via a communication line.
[0180] The memory 1020 is used to store program instructions and / or data so that the processor 1010 calls the instructions and / or data stored in the memory 1020 to implement the privacy reasoning method executed by the first node in any of the aforementioned embodiments.
[0181] For example, the processor 1010 may call instructions in the memory 1020 to perform the following steps:
[0182] The input content to be inferred is converted to obtain requirement information, and a first zero-knowledge proof is generated for the conversion process of the input content; a privacy reasoning request is constructed according to the requirement information and the first zero-knowledge proof; the privacy reasoning request is sent to the second terminal; and the reasoning result fed back by the second terminal is received; wherein the reasoning result is verified.
[0183] The memory 1020 may be a separate device from the processor 1010 , or may be integrated into the processor 1010 .
[0184] The processor 1010 may control the transceiver 1030 to communicate with other devices. Specifically, information or data may be sent to other devices, or information or data sent by other devices may be received. The transceiver 1030 may include a transmitter and a receiver. The transceiver 1030 may further include an antenna, and the number of antennas may be one or more.
[0185] Fig.11 A block diagram of a second terminal according to an embodiment of the present disclosure is schematically shown.
[0186] like Fig.11As shown, the second terminal 1100 of this embodiment includes a processor 1110, a memory 1120, and a transceiver 1130. The processor 1110, the memory 1120, and the transceiver 1130 may be connected via a communication line.
[0187] The memory 1120 is used to store program instructions and / or data so that the processor 1110 calls the instructions and / or data stored in the memory 1120 to implement the privacy reasoning method executed by the second terminal in any of the aforementioned embodiments.
[0188] For example, the processor 1110 may call instructions in the memory 1120 to perform the following steps:
[0189] Receive a privacy reasoning request from a first node; the privacy reasoning request includes demand information and a first zero-knowledge proof, wherein the first zero-knowledge proof is generated for a formation process of the demand information; verify the first zero-knowledge proof using a detection model; the detection model is registered by the first node; perform privacy reasoning on the demand information according to the verification result to obtain a reasoning result; and send the reasoning result to the first node.
[0190] The memory 1120 may be a separate device from the processor 1110 , or may be integrated into the processor 1110 .
[0191] The processor 1110 may control the transceiver 1130 to communicate with other devices. Specifically, information or data may be sent to other devices, or information or data sent by other devices may be received. The transceiver 1130 may include a transmitter and a receiver. The transceiver 1130 may further include an antenna, and the number of antennas may be one or more.
[0192] It should be understood that the processor of the embodiment of the present disclosure may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the aforementioned method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The aforementioned processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the aforementioned method in conjunction with its hardware.
[0193] As an embodiment, the processor may include one or more general-purpose central processing units (CPUs). Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer execution instructions).
[0194] It can be understood that the memory in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a ROM, a programmable ROM (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0195] It should be understood that the aforementioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present disclosure may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is, the memory in the embodiments of the present disclosure is intended to include but not limited to these and any other suitable types of memory.
[0196] The embodiment of the present disclosure also provides a computer-readable storage medium for storing a computer program.
[0197] Optionally, the computer-readable storage medium can be applied to the first node / second terminal in the embodiments of the present disclosure, and the computer program enables the computer to execute the corresponding processes implemented by the first node / second terminal in the various methods of the embodiments of the present disclosure. For the sake of brevity, they are not repeated here.
[0198] In the foregoing embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0199] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present disclosure is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0200] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A privacy reasoning method, comprising: Receiving a privacy reasoning request from a first node; wherein the privacy reasoning request includes requirement information and a first zero-knowledge proof, and the first zero-knowledge proof is generated for a formation process of the requirement information; Using a detection model to verify the first zero-knowledge proof; wherein the detection model is obtained by registering the first node; Perform privacy reasoning on the demand information according to the verification result to obtain a reasoning result; The inference result is sent to the first node.
2. The method according to claim 1, before receiving the privacy inference request, comprising: Receiving a registration request from the first node; wherein the registration request includes relevant parameters for converting the initial model and a second zero-knowledge proof, wherein the second zero-knowledge proof is generated for the conversion process of the initial model; Verifying the second zero-knowledge proof using the relevant parameters; Convert the initial model according to the verification result to obtain the detection model; Sending a first notification message to the first node; the first notification message indicates that the detection model has completed registration.
3. The method according to claim 1, before receiving the privacy inference request, further comprising: Using the relevant parameters required for registering the detection model, the randomly acquired data to be evaluated are processed to obtain an identification to be evaluated; Sending the identification to be evaluated to the first node; Receive feedback information from the first node; wherein the feedback information includes an evaluation result of the identifier to be evaluated and a third zero-knowledge proof, and the third zero-knowledge proof is generated for the evaluation process of the identifier to be evaluated; Verifying the evaluation result and the third zero-knowledge proof; According to the verification result, second notification information is sent to the first node; the second notification information indicates that the detection model has completed the evaluation.
4. A privacy reasoning method, comprising: Converting input content to be inferred to obtain requirement information, and generating a first zero-knowledge proof for the conversion process of the input content; Constructing a privacy reasoning request according to the requirement information and the first zero-knowledge proof; Sending the privacy inference request to the second terminal; Receive the inference result fed back by the second terminal; wherein the inference result is verified.
5. The method according to claim 4, before converting the input content to be inferred, comprising: Convert the word encoding and embedding layer weight matrix of the initial model to generate a second zero-knowledge proof for the conversion process; Constructing a registration request for a detection model according to the second zero-knowledge proof and relevant parameters of the conversion process; wherein the detection model is obtained by converting the initial model; sending the registration request to the second terminal; A first notification message is received from the second terminal; the first notification message is verified and indicates that the detection model has completed registration.
6. The method according to claim 4, before converting the input content to be inferred, further comprising: Receiving an identification to be evaluated from the second terminal; wherein the identification to be evaluated is verified and represents an evaluation of the detection model; Evaluate the identifier to be evaluated, obtain an evaluation result, and generate a third zero-knowledge proof for the evaluation process; Sending the evaluation result and the third zero-knowledge proof to the second terminal; A second notification message is received from the second terminal; the second notification message is verified and indicates that the detection model has completed evaluation.
7. According to the method of claim 6, evaluating the identification to be evaluated and obtaining the evaluation result comprises: Obtaining relevant parameters required for registration of the detection model; wherein the detection model is obtained by converting the word unit encoding and the weight matrix of the embedding layer of the initial model, and the relevant parameters include a first parameter for converting the word unit encoding and a second parameter for converting the weight matrix; Using the first parameter, converting the identifier to be evaluated; The converted identification to be evaluated is evaluated using the second parameter to obtain the evaluation result.
8. The method according to claim 5, wherein converting the input content to be inferred comprises: Using the relevant parameters to process the input content to obtain processed data; The processing data is encrypted to obtain the demand information.
9. A first node, comprising: at least one processor; as well as a transceiver and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: Converting input content to be inferred to obtain requirement information, and generating a first zero-knowledge proof for the conversion process of the input content; Constructing a privacy reasoning request according to the requirement information and the first zero-knowledge proof; Sending the privacy inference request to the second terminal; Receive the inference result fed back by the second terminal; wherein the inference result is verified.
10. A second terminal, comprising: at least one processor; as well as a transceiver and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: Receiving a privacy reasoning request from a first node; the privacy reasoning request includes requirement information and a first zero-knowledge proof, wherein the first zero-knowledge proof is generated for a formation process of the requirement information; Verifying the first zero-knowledge proof using a detection model; the detection model is obtained by registering the first node; Perform privacy reasoning on the demand information according to the verification result to obtain a reasoning result; The inference result is sent to the first node.
Citation Information
Cited By
Safety reasoning method and device of model, electronic equipment and storage medium
CN119990336A
Security Inference Method, Device, Electronic Device and Storage Medium of a Model
CN119990336B