Task data processing method and device, equipment and readable storage medium

By using blockchain and multi-party secure computation technology in anonymous queries, the problem of auditing anonymous queries is solved, achieving a balance between data security and business compliance, and supporting transparent auditing of query results.

CN121958629AActive Publication Date: 2026-05-01CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-03-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Anonymous query technology has difficulty in effectively auditing the query records of the querying party, which limits its application in business scenarios.

Method used

By uploading fragmented data and task identifiers corresponding to query tasks to the blockchain network for storage on both the client and server sides, and utilizing multi-party secure computation and zero-polynomial homomorphic encryption technology, the query results are encrypted and audited, ensuring data security.

Benefits of technology

While ensuring data security, it supports third-party organizations to conduct post-event audits, solving the compliance audit challenges of anonymous query business and achieving transparency and auditability of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958629A_ABST
    Figure CN121958629A_ABST
Patent Text Reader

Abstract

The invention discloses a task data processing method, device and equipment and a readable storage medium, relates to the technical field of data security, and aims to solve the problem that query records of a query party are difficult to effectively audit. The method is applied to a client and comprises the steps that first fragment data corresponding to a query task is acquired, and the first fragment data comprises a first matching result fragment and a first sample feature fragment; uploading the first fragment data and the task identifier to a block chain network for storage; the first matching result fragment is used for cooperatively determining a matching result of the query task with a second matching result fragment stored in the server, and when the matching result represents that the second identifier is matched with the first identifier, the query task is queried. The first sample feature fragment is used for generating a sample feature corresponding to the second identifier in cooperation with a second sample feature fragment stored in the server side. According to the embodiment of the invention, on the premise that the data security is ensured, a third-party mechanism is supported to serve as an auditing end to audit the query task.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, equipment and readable storage media for processing task data Technical Field

[0001] This invention relates to the field of data security technology, and in particular to a method, apparatus, device, and readable storage medium for processing task data. Background Technology

[0002] Private Information Retrieval (PIR) is a technology that ensures a user's identity and the content of their query are not disclosed when searching for information. The main purpose of PIR is to protect user information security, ensuring that the server cannot know the specific content of the user's query. It also features strict access control, allowing users to access only the data they have queried, while keeping other data completely hidden from them. PIR technology is widely used in web search, database queries, location services, and other fields, providing users with a secure and private way to retrieve information.

[0003] However, this protection mechanism creates an imbalance for data source providers, as they can only confirm the query behavior but cannot understand the specific query content. This poses challenges for auditing and compliance review, limiting the comprehensive application of anonymous query technology in business scenarios. Currently, many industry organizations find it difficult to effectively audit the query records of the querying party, making anonymous query technology unusable by business users. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and readable storage medium for processing task data, in order to solve the problem of difficulty in effectively auditing the query records of the querying party caused by anonymous queries.

[0005] To address the aforementioned technical problems, this application provides the following: Firstly, embodiments of this application provide a method for processing task data, applied to a client, comprising: acquiring first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; uploading the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein the query task is used to query whether a second identifier exists on the server that matches the first identifier provided by the client, the first matching result fragment being used in conjunction with the second matching result fragment stored on the server to determine the matching result of the query task, and if the matching result indicates that the second identifier matches the first identifier, the first sample feature fragment being used in conjunction with the second sample feature fragment stored on the server to generate sample features corresponding to the second identifier.

[0006] Optionally, after uploading the first fragment data and the task identifier to the blockchain network for storage, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the first fragment data from the blockchain network based on the task identifier; and sending the first fragment data to the auditing terminal.

[0007] Optionally, obtaining the first matching result fragment corresponding to the query task includes: encoding the first identifier to obtain a first encoded value; segmenting the first encoded value based on a first random number to obtain a first encoded fragment and a second encoded fragment; sending the second encoded fragment to the server and receiving a third encoded fragment sent by the server, wherein the third encoded fragment is used to form a second encoded value with a fourth encoded fragment, the second encoded value being obtained by encoding the second identifier; inputting the first encoded fragment and the third encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, the matching result being used to characterize whether the first identifier and the second identifier match, and the matching result being jointly determined by the first matching result fragment and the second matching result fragment.

[0008] Optionally, the number of first identifiers is multiple, the number of second identifiers is multiple, and before obtaining the first fragment data corresponding to the query task, the method further includes: receiving encryption coefficients sent by the server, wherein the encryption coefficients are obtained by encrypting the coefficients of a null polynomial, and the coefficients of the null polynomial are determined based on multiple second identifiers; for each first identifier, using the first identifier as a variable of the null polynomial, calculating a first encryption result corresponding to the first identifier based on the encryption coefficients; multiplying the first encryption result by a second random number to obtain a second encryption result; arranging the multiple second encryption results in random order to obtain a target sequence; and sending the target sequence to the server.

[0009] Secondly, embodiments of this application provide a method for processing task data, applied to a server, comprising: obtaining second fragment data corresponding to a query task, the second fragment data including a second matching result fragment and a second sample feature fragment; uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there exists a second identifier on the server that matches a first identifier provided by a client, the second matching result fragment being used to collaboratively determine the matching result of the query task with the first matching result fragment stored by the client, and only when the matching result indicates that the second identifier matches the first identifier, the second sample feature fragment being used to collaboratively generate a sample feature corresponding to the second identifier with the first sample feature fragment stored by the client.

[0010] Optionally, after uploading the second fragment data and the task identifier to the blockchain network for storage, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the second fragment data from the blockchain network based on the task identifier; and sending the second fragment data to the auditing terminal.

[0011] Optionally, obtaining the first matching result fragment corresponding to the query task includes: encoding the second identifier to obtain a second encoded value; segmenting the second encoded value based on a third random number to obtain a third encoded fragment and a fourth encoded fragment; sending the third encoded fragment to the client and receiving the second encoded fragment sent by the client, wherein the second encoded fragment is used to form a first encoded value with the first encoded fragment, and the first encoded value is obtained by encoding the first identifier; inputting the second encoded fragment and the fourth encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, and the matching result is used to characterize whether the first identifier and the second identifier match, and the matching result is determined collaboratively by the first matching result fragment and the second matching result fragment.

[0012] Optionally, the number of the first identifiers is multiple, the number of the second identifiers is multiple, and before obtaining the second fragment data corresponding to the query task, the method further includes: constructing a null polynomial, the coefficients of which are determined based on multiple second identifiers; encrypting the coefficients using a public key to obtain encrypted coefficients; sending the encrypted coefficients to the client; receiving a target sequence sent by the client, the target sequence including multiple second encrypted results; decrypting the second encrypted results using a private key to obtain multiple decrypted results, wherein if a second identifier matches a first identifier, the value of the second encrypted result corresponding to the first identifier is 0, and the private key matches the public key; determining the number of second identifiers matched by the query task based on the number of second encrypted results with a value of 0 among the multiple second encrypted results.

[0013] Thirdly, embodiments of the present invention provide a task data processing apparatus. A client includes the task data processing apparatus, which includes: a first acquisition module for acquiring first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; and a first upload module for uploading the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task. The query task is used to query whether a second identifier exists on the server that matches the first identifier provided by the client. The first matching result fragment is used in conjunction with the second matching result fragment stored on the server to determine the matching result of the query task. If the matching result indicates that the second identifier matches the first identifier, the first sample feature fragment is used in conjunction with the second sample feature fragment stored on the server to generate sample features corresponding to the second identifier.

[0014] Fourthly, embodiments of the present invention provide a task data processing apparatus. A server includes the task data processing apparatus, comprising: a second acquisition module for acquiring second fragment data corresponding to a query task, the second fragment data including a second matching result fragment and a second sample feature fragment; and a second upload module for uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task. The query task is used to query whether a second identifier exists on the server that matches a first identifier provided by a client. The second matching result fragment is used in conjunction with the first matching result fragment stored by the client to determine the matching result of the query task. Only when the matching result indicates that the second identifier matches the first identifier, the second sample feature fragment is used in conjunction with the first sample feature fragment stored by the client to generate sample features corresponding to the second identifier.

[0015] Fifthly, embodiments of the present invention provide a task data processing device, a client including the task data processing device, the task data processing device including: a memory, a processor and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the task data processing method as described in the first aspect.

[0016] In a sixth aspect, embodiments of the present invention provide a task data processing device, a server including the task data processing device, the task data processing device including: a memory, a processor and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the task data processing method as described in the second aspect.

[0017] In a seventh aspect, embodiments of the present invention provide a readable storage medium for storing a program, which, when executed by a processor, implements the steps of the task data processing method as described in the first or second aspect.

[0018] In this embodiment, after completing the query task, the client associates the first fragment data, containing the first matching result fragment and the first sample feature fragment, with the task identifier and uploads it to the blockchain network for storage. The server associates the second fragment data, containing the second matching result fragment and the second sample feature fragment, with the task identifier and uploads it to the blockchain network for storage. Since both the first and second fragment data are fragmented data, neither the server nor the client can obtain complete data based on their own stored fragmented data. Therefore, this method, while ensuring data security, supports third-party institutions as auditing entities for post-event auditing, solving the compliance auditing challenge of anonymous query services. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 is a flowchart illustrating one of the task data processing methods provided in this application embodiment; Figure 2 is a flowchart illustrating a fully anonymous secure intersection method provided in this application embodiment; Figure 3 is a flowchart illustrating a server-side metering audit provided in this application embodiment; Figure 4 is a partial flowchart illustrating one of the task data processing methods provided in this application embodiment; Figure 5 is a schematic diagram illustrating the calculation mode of anonymous query task fragment data during the audit process provided in this application embodiment; Figure 6 is another flowchart illustrating one of the task data processing methods provided in this application embodiment; Figure 7 is a structural schematic diagram illustrating one of the task data processing devices provided in this application embodiment; Figure 8 is another structural schematic diagram illustrating one of the task data processing devices provided in this application embodiment; Figure 9 is a structural schematic diagram illustrating one of the task data processing equipment provided in this application embodiment; Figure 10 is another structural schematic diagram illustrating one of the task data processing equipment provided in this application embodiment. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms "a" or "one," and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms "connected" or "linked," and similar terms, are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right," etc., are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship also changes accordingly.

[0023] The following description, in conjunction with the accompanying drawings, further illustrates the task data processing method, apparatus, device, and readable storage medium proposed in the embodiments of the application.

[0024] First, a brief introduction to some of the terms used in the embodiments of this invention will be given.

[0025] 1. Secure Multi-Party Computation (MPC). MPC is a type of cryptographic protocol that allows multiple participants to collaboratively compute a pre-agreed function without revealing their private inputs, and to obtain only the correct output. MPC technology implements a computational paradigm where "data is usable but not visible." Each party encrypts or segments its data before participating in joint computation; the plaintext data is never exposed to any party during the computation process, yet the accurate computation result is obtained.

[0026] The following introduces three commonly used MPC operators: comparison operator, multiplication operator, and addition operator.

[0027] Comparison operators are used to securely determine the size or equality relationship between two secret shared values. In MPC, directly determining A=B is difficult and is usually achieved indirectly. Specifically, a subtraction and Most Significant Bit (MSB) extraction technique can be used: first, calculate MSB(B−A) to determine if A>B is true, then calculate MSB(A−B) to determine if B>A is true. If both are false (i.e., both differences are non-negative and non-positive), then A=B can be deduced. The subtraction operation in this process is usually implemented using a high-efficiency parallel prefix adder (PPA) circuit, as it can quickly generate carry chains, thereby accelerating MSB extraction.

[0028] Multiplication operators are fundamental and critical operations in MPC, used to implement secure multiplication between secret shared values. Since multiplication increases the number of algebraic iterations of the sharing operation, it is typically necessary to introduce beaver triples or reshaping to maintain the security and correctness of the protocol.

[0029] In MPC, addition is a linear operation that can be performed locally and efficiently without interaction. Each participant simply adds its share bit by bit to obtain the secret shared form of the result. When used to build more complex arithmetic circuits (such as subtraction, comparison, or overflow detection), it is often combined with a PPA structure to optimize latency, especially in MSBs where fast results are required (e.g., sign determination or equality verification).

[0030] 2. Elimination polynomial. An elimination polynomial is a polynomial that makes matrix A satisfy... polynomial Specifically, if a polynomial Make If true, then this polynomial This is called the null polynomial of matrix A.

[0031] The annihilated polynomial form is shown in the following formula: ;in, For variables of a polynomial, The function representation of the nullable polynomial is about the variable A polynomial, The coefficients of the nullification polynomial, In polynomials The coefficient of the term, where n is the degree of the polynomial, representing the exponent of the highest power in the polynomial. For example, if 𝑛=2, then the polynomial is... The specific form and coefficients of a polynomial determine its properties, such as whether it satisfies specific matrix conditions (e.g., a null matrix). Specifically, the coefficients are calculated based on the eigenvalues ​​(or other matrix properties) of matrix A.

[0032] Constructing a zeroing polynomial requires finding multiple roots such that the polynomial is zero on these roots. For example, first, the degree of the polynomial is determined based on the requirements of the problem or given conditions. Second, multiple roots are found, which can be real or complex numbers, usually determined by solving equations or observing the characteristics of the problem. Finally, the found roots are transformed into factors of the polynomial, and the polynomial is constructed. If a root is r, then (x - r) is a factor of the polynomial. Multiplying all factors together yields the final zeroing polynomial, ensuring that each factor is a factor of the polynomial.

[0033] 3. Oblivious PseudoRandom Function (OPPRF): Its core principle can be summarized as follows: the sender holds the key. With the recipient holding input Under the premise that both parties use several rounds of encrypted interaction protocols, the receiver eventually obtains the output of the pseudo-random function. It also satisfies the following security constraint: the receiver cannot deduce the sender's key. Or any other input function value .

[0034] The sender cannot know the receiver's input. Or its final output value.

[0035] To achieve this goal, typical protocol constructions usually incorporate mechanisms such as randomization and homomorphic encryption—the receiver first generates a randomization factor. For input Perform masking to blind the result Send to the sender; the sender uses its key right Perform pre-calculation or generate a set of response messages, and use methods such as unintentional transmission to ensure that the receiver can only decrypt and obtain information related to its own input. Corresponding target value However, other mapping relationships cannot be obtained.

[0036] Please refer to Figure 1, which is a flowchart illustrating one of the task data processing methods provided in this application embodiment. The method can be applied to a client and executed by the client. As shown in Figure 1, the method specifically includes the following steps: Step 101, obtaining the first fragment data corresponding to the query task, wherein the first fragment data includes a first matching result fragment and a first sample feature fragment.

[0037] The query task is used to query whether there is a second identifier on the server that matches the first identifier provided by the client. The first matching result fragment is used to work with the second matching result fragment stored on the server to determine the matching result of the query task. If the matching result indicates that there is a second identifier that matches the first identifier, the first sample feature fragment is used to work with the second sample feature fragment stored on the server to generate the sample feature corresponding to the second identifier.

[0038] In some embodiments, the identifier is used to identify a sample (or data object), and its specific form is not limited herein. For example, in some embodiments, the data object is a user, and the identifier can be a user code, user identifier (ID), or other data used to uniquely identify a user. In other embodiments, the data object is a project, and the identifier can be a project code, project code, or other data used to uniquely identify a project.

[0039] In some embodiments, sample features are used to describe attributes or metrics of various aspects of a data object. They are often used as input to machine learning models to help the model understand and predict the behavior of the data. In some embodiments, sample features typically refer to sensitive data portions related to the data object. For example, when the data object is a user, sample features include at least one of the following: the user's historical purchase records, the user's geographic location, and the user's interests and preferences.

[0040] The server stores multiple pre-stored data sets, each containing an identifier and sample features. The client initiates a query task to the server based on a first identifier, checking if there is a matching identifier (i.e., a second identifier) ​​among the server's stored identifiers. Upon finding a matching second identifier, the client can retrieve the corresponding sample features. In practice, the number of first identifiers and second identifiers can be one or more, depending on the specific requirements; no limitation is imposed here.

[0041] As a specific implementation, the query task is an anonymous query. PIR technology is used for fully anonymous secure intersection, thereby achieving secure intersection without exposing the intersection and obtaining the second identifier that matches the first identifier. Specifically, by introducing OPPRF and multi-party secure computation comparison operators, the identifier matching task can be transformed into a function-encoded value comparison task. That is, the judgment of whether the client's first identifier 'a' and the server's second identifier 'b' are equal is transformed into a comparison task of whether the first encoded value 'y' and the second encoded value 'y*' are equal. If 'y' == 'y*' at a certain position, it means that 'a' and 'b' at that position are the same identifier; otherwise, 'a' and 'b' are different. The first encoded value 'y' is obtained by encoding the first identifier 'a', and the second encoded value 'y*' is obtained by encoding the second identifier 'b'.

[0042] Optionally, in some embodiments, obtaining the first matching result fragment corresponding to the query task includes: encoding the first identifier to obtain a first encoded value; segmenting the first encoded value based on a first random number to obtain a first encoded fragment and a second encoded fragment; sending the second encoded fragment to the server and receiving a third encoded fragment sent by the server, the third encoded fragment being used to form a second encoded value with a fourth encoded fragment, the second encoded value being obtained by encoding the second identifier; inputting the first encoded fragment and the third encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein, the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, the matching result being used to characterize whether the first identifier and the second identifier match, the matching result being jointly determined by the first matching result fragment and the second matching result fragment.

[0043] First, the client encodes the first identifier using the fully stealth PSI protocol to obtain the first encoded value corresponding to the first identifier. If there are multiple first identifiers, the client encodes each first identifier using the fully stealth PSI protocol to obtain the first encoded value for each first identifier. Then, for each first encoded value, the client randomly generates a first random number and performs arithmetic secret partitioning on the first encoded value based on this first random number to obtain a first encoded fragment and a second encoded fragment. The second encoded fragment is then sent to the server for storage.

[0044] It should be understood that the server performs the same operations as the client. First, the server encodes the second identifier using the fully anonymous PSI protocol to obtain the second encoded value corresponding to the second identifier. If there are multiple second identifiers, the server encodes each second identifier using the fully anonymous PSI protocol to obtain the second encoded value for each second identifier. Then, for each second encoded value, the server randomly generates a second random number and performs arithmetic secret partitioning on the second encoded value based on this second random number to obtain a third encoded fragment and a fourth encoded fragment. The third encoded fragment is then sent to the client for holding.

[0045] It should be understood that the specific method by which the client and server perform arithmetic secret partitioning of the encoded value is not limited here. For example, in some embodiments, the client generates a first random number r, and then performs the calculation yr on the first encoded value y to obtain a first encoded fragment yr and a second encoded fragment r. The client holds the first encoded fragment yr and sends the second encoded fragment r to the server. Similarly, the server generates a second random number r*, and then performs the calculation y*-r* on the second encoded value y* to obtain a third encoded fragment r* and a fourth encoded fragment y*-r*. The server holds the fourth encoded fragment y*-r* and sends the third encoded fragment r* to the client.

[0046] In the above manner, the client and server complete the secret splitting and secret sharing of the encoded value. The client holds its own first encoded fragment and the third encoded fragment sent by the server, while the server holds its own fourth encoded fragment and the second encoded fragment sent by the client.

[0047] Then, the client inputs the first encoded fragment into the bit addition circuit for comparison, and the server inputs the fourth encoded fragment into the bit addition circuit for comparison. The bit addition circuit is used to complete the fragment output of the most significant bit based on the first and fourth encoded fragments, thus obtaining the matching result of the fragment state. The matching result includes two parts, the first matching result fragment and the second matching result fragment, which work together to determine the matching result.

[0048] It should be understood that the client inputs its first encoded fragment into the bit addition circuit to obtain the first matching result fragment, while the server inputs its fourth encoded fragment into the bit addition circuit to obtain the second matching result fragment. Through this method, neither the client nor the server can obtain a complete matching result based solely on their own data, thus ensuring the security of the query results.

[0049] The first matching result fragment stored on the client needs to work together with the second matching result fragment stored on the server to determine the matching result of the query task. This makes it impossible for either the client or the server to directly obtain the matching result based on its own stored data, thereby improving the security of the matching result.

[0050] The following is an example of a specific implementation. In this embodiment, after the fully stealthy PSI protocol is executed, the client's i-th first identifier is used. The j-th second identifier of the server For example, the client receives the... The first coded value after consistency coding The server receives The first coded value after consistency coding According to the correctness guarantee of the PSI protocol, if and only if When, satisfy ;otherwise .

[0051] To prevent the server from knowing the client's query intent, the two parties cannot directly compare data in plaintext. and Instead, the dense-state equality comparison scheme in MPC needs to be used. The specific execution steps are as follows: First, the client compares the first encoded value... To perform secret sharing: The client generates an initial random number. and calculate The client retains the first encoded fragment. and will As the second encoding segment Send to the server. The server only holds... Unable to restore .

[0052] Similarly, the server handles the second encoded value. To perform secret sharing: The server generates a second random number. and calculate The server retains the fourth encoding fragment. and will As the third encoding segment Send to the client. The client only holds... Unable to restore .

[0053] Subsequently, the client and server invoke the equality comparison operator in MPC to complete the equality determination in the dense state. Specifically, the first encoded value... As the first input x, the second encoded value As the second input y. In actual execution, the client and server, based on their respective data, calculate the most significant bit (MSB) of the difference xy using a bit-level addition circuit in a secret sharing state. If x = y, then xy = 0, and the MSB is 0; otherwise, the MSB is 1.

[0054] After logical transformation, the operator outputs a Boolean matching indicator, which is the plaintext matching result. The secret sharing format is denoted as: .

[0055] in, For the first matching result fragment, For the second matching result fragment, specifically, express At this point, the matching result indicates the presence of a second identifier. With the first identifier match, express At this point, the matching result represents the second identifier. With the first identifier Mismatch.

[0056] In this way, neither the client nor the server can know the plaintext matching result separately, thus effectively protecting the query security of the client and the data security of the server.

[0057] It should be noted that in some embodiments, the bit addition circuit is a third-party computing node. The client and server send data to the third-party computing node for comparison to obtain matching result fragments. In other embodiments, the client and server each have a built-in bit addition circuit module for executing the MPC protocol. The client and server can obtain each other's fragmented data and compare it in their built-in bit addition circuits to obtain the corresponding matching result fragments. It should be understood that, due to the security guarantee of multi-party secure computation, in any of the above embodiments, the client and server can only obtain their respective corresponding matching result fragments. They cannot independently recover the plaintext matching result, nor can they infer the other party's encoded value or identifier, thus effectively protecting the data security of both parties.

[0058] By employing the above method and using full anonymity technology, anonymity query is achieved. The client and server can only obtain encrypted matching result fragments and cannot recover the plaintext matching results separately, thus ensuring that the original sensitive information of the client and server in the entire query task is not leaked.

[0059] Optionally, in some embodiments, obtaining the first sample feature fragment corresponding to the query task includes: receiving the first sample feature fragment sent by the server.

[0060] In this embodiment, the server secretly segments its own sample features to obtain a first sample feature fragment and a second sample feature fragment. The server sends the first sample feature fragment to the client, while the server itself holds the second sample feature fragment.

[0061] The first sample feature fragment stored on the client side needs to collaborate with the second sample feature fragment stored on the server side to generate complete sample features. Furthermore, the first and second sample feature fragments can only collaboratively generate sample features if the second identifier matches the first identifier based on the collaborative confirmation of the first and second matching result fragments; otherwise, the output of the first and second sample feature fragments will be cleared. Through this setting, the client can only obtain its anonymous query results and is unaware of information about non-matching data.

[0062] It should be understood that the first matching result fragment and the first sample feature fragment are both fragmented data obtained by the client during the execution of the query task. The second matching result fragment and the second sample feature fragment are both fragmented data obtained by the server during the execution of the query task. All three fragments—the first matching result fragment, the first sample feature fragment, the second matching result fragment, and the second sample feature fragment—are encrypted data.

[0063] Optionally, in some embodiments, the number of first identifiers is multiple, the number of second identifiers is multiple, and before step 101, the method further includes: receiving encryption coefficients sent by the server, wherein the encryption coefficients are obtained by encrypting the coefficients of a null polynomial, and the coefficients of the null polynomial are determined based on multiple second identifiers; for each first identifier, using the first identifier as a variable of the null polynomial, calculating a first encryption result corresponding to the first identifier based on the encryption coefficients; multiplying the first encryption result by a second random number to obtain a second encryption result; arranging the multiple second encryption results in random order to obtain a target sequence; and sending the target sequence to the server.

[0064] In this embodiment, the server can perform metering audits on query tasks. First, the server constructs a null polynomial and generates a public and private key for homomorphic encryption. The public key is used to homomorphically encrypt the coefficients of the null polynomial to obtain encrypted coefficients. These encrypted coefficients are then sent to the client. Upon receiving the encrypted coefficients, the client performs homomorphic plaintext-ciphertext multiplication with the encrypted coefficients using a first identifier, and then performs ciphertext-ciphertext addition to obtain the encrypted polynomial calculation result, i.e., the first encrypted result.

[0065] Then, the client generates a second random number locally for each identifier, multiplies the second random number by the first encryption result, and obtains the second encryption result. The client then scrambles the second encryption result and sends the scrambled target sequence to the server.

[0066] The server uses its private key to decrypt, obtaining a sequence of multiple decryption results. Since the coefficients of the null polynomial are determined based on multiple second identifiers, according to the characteristics of the null polynomial, if a first identifier matches a second identifier from among the multiple second identifiers, the decryption result for that first identifier is 0; otherwise, only a random number is obtained. Therefore, the server can identify the magnitude of the client's query success by the number of decryption results with a value of 0, and thus perform measurement auditing. In this embodiment, the server can only know whether the client's query was successful, but not which first identifier matched which second identifier, thereby ensuring the security of the client.

[0067] To facilitate understanding, a specific embodiment will be used as an example for illustration below.

[0068] In this embodiment, a homomorphic encryption scheme based on null polynomials is used to implement server-side metering auditing. In this embodiment, it is assumed that the number of second identifiers is n, the set of second identifiers is denoted as b, and the i-th second identifier is denoted as... Specifically, P(x) is obtained by taking the n second identifiers as roots and then multiplying the factors together: Furthermore, expanding P(x) into standard polynomial form, we construct the annihilated polynomial as shown below: .

[0069] The server generates a homomorphic encryption public key PK and a private key SK. The public key PK is used to encrypt data, and the private key SK is used to decrypt data. The server uses the public key PK to nullify each coefficient in the polynomial (e.g., ...). Homomorphic encryption is performed to obtain encryption coefficients. For example, for the coefficients... Encryption will yield the encryption coefficient. .

[0070] The server sends the encryption coefficients to the client. After receiving the encryption coefficients, the client uses each first identifier as a variable of the null polynomial, performs homomorphic plaintext-ciphertext multiplication with the encryption coefficients, and performs ciphertext-ciphertext addition to obtain the encrypted polynomial calculation result.

[0071] For example, for the first identifier The corresponding polynomial calculation result is Since the coefficients of the polynomial have been encrypted, the result of the polynomial calculation obtained by using the encrypted coefficients is also encrypted data, i.e., the first encrypted result. .

[0072] The client generates a random number sequence, where the i-th second random number in the random number sequence is... and Correspondingly, the second random number The corresponding multiplier ,get The corresponding second encryption result It can also be written as Multiple first identifiers can yield multiple second encryption results. The client performs a scrambling operation on these multiple second encryption results to obtain the target sequence, thus protecting data security. The target sequence is then sent back to the server.

[0073] The server receives the target sequence sent back by the client and decrypts each second encryption result in the received target sequence using the private key SK. For example, the server... Decryption will yield the result. Based on the aforementioned structural characteristics of the null polynomial, since the coefficients of the null polynomial are constructed based on the second identifier, if a certain So there are Otherwise, you can only get random numbers.

[0074] The decryption results, obtained through the above method, will reveal whether a matching identifier exists. The server can identify the magnitude of the client's query by the number of decryption results with a value of 0, thereby enabling measurement and auditing. Specifically, the server saves the audit results (such as the number of matches) as an audit log. The audit log is stored on the blockchain using blockchain technology to ensure the transparency and immutability of data processing. The auditing end can access the audit records on the blockchain for independent verification and auditing; details will not be elaborated here.

[0075] Since all calculations are performed within the encrypted space, the server identifies the number of matches (i.e., the hit rate) by checking the decryption results. Because the target sequence is shuffled, even if the server knows that the i-th decryption result is 0, it cannot determine which first identifier matched the corresponding second identifier. Therefore, through this method, the server cannot know which specific first identifier matched, thus protecting the client's security.

[0076] In this embodiment, metering auditing is achieved using a homomorphic encryption scheme based on null polynomials. Since all calculations are performed within an encrypted space, the server cannot know the specific matching information, but it can determine the number of successful matches. This approach enables server-side metering auditing while ensuring data security. Furthermore, this method achieves an anonymous query technique that simultaneously supports server-side metering auditing.

[0077] Step 102: Upload the first fragment data and the task identifier to the blockchain network for storage. The task identifier is used to identify the query task.

[0078] In this embodiment, the client packages the first fragment data and the task identifier it has obtained into a blockchain transaction and uploads it to the blockchain network for storage. As a specific example, this blockchain transaction includes the following: the first fragment data, the task identifier, a timestamp, the sender's blockchain address, and other necessary metadata.

[0079] In some embodiments, to ensure the authenticity and integrity of a transaction, the client digitally signs the transaction using its private key, and the signed transaction is broadcast to all consensus nodes in the blockchain network. Upon receiving the transaction, each node in the blockchain network executes a verification process, and transactions that pass verification are temporarily stored in a pending transaction pool.

[0080] Similarly, the server packages the second fragment data and task identifier it obtains into a blockchain transaction and uploads it to the blockchain network for storage. As a specific example, this blockchain transaction includes the following: second fragment data, task identifier, timestamp, sender's blockchain address, and other necessary metadata.

[0081] In some embodiments, to ensure the authenticity and integrity of a transaction, the server digitally signs the transaction using its private key. The signed transaction is then broadcast to all consensus nodes in the blockchain network. Upon receiving the transaction, each node in the blockchain network executes a verification process, and transactions that pass verification are temporarily stored in a pending transaction pool.

[0082] It should be understood that after receiving the transaction, each node in the blockchain network performs verifications including but not limited to the following: verifying whether the digital signature was generated by a legitimate sender; checking whether the transaction data format conforms to preset rules; verifying whether the transaction content meets the constraints of the smart contract or on-chain protocol; and confirming that the transaction has not been submitted repeatedly (to prevent replay attacks).

[0083] In some embodiments, consensus nodes aggregate multiple valid transactions and package them into a new block. This block is confirmed through the consensus mechanism of the blockchain network (such as Proof of Work (PoW), Proof of Stake (PoS), or other Byzantine Fault Tolerance (BFT) mechanisms) to ensure its legitimacy, uniqueness, and global consistency.

[0084] Blocks confirmed through consensus are appended to the end of the existing blockchain, becoming immutable on-chain records. Once on-chain, the system can obtain at least one of the following key identifying information: Transaction Hash: A unique, fixed-length identifier generated by hashing the transaction content, used for precise retrieval, verification, or auditing of specific transactions.

[0085] Block height: Indicates the sequential position of the block in the blockchain. It is equal to the height of the previous block plus one, reflecting the historical depth of the block.

[0086] Block Hash: A unique hash value calculated based on the block header and all transaction data, used to ensure the integrity and immutability of the block content.

[0087] The aforementioned identification information plays a crucial role in subsequent auditing or querying processes. For example, auditors can quickly locate specific shard transactions using transaction hashes, or determine the block where data resides and retrieve the complete context using block height, thereby verifying the authenticity, time sequence, and completeness of the data. Further details will not be elaborated here.

[0088] Ultimately, the client and server associate their respective on-chain transactions with the same task identifier. This task identifier serves as a logical link across transactions, enabling the auditing end (i.e., the third-party auditing institution) to, after obtaining authorization, aggregate the data uploaded by the client and server based on the task identifier, collaboratively recover the plaintext matching results, and achieve verifiable measurement auditing.

[0089] It should be noted that blockchain itself does not perform data aggregation or task allocation logic; its core function is to provide a decentralized, tamper-proof, and secure storage and verification mechanism. Actual data aggregation, task construction, and secure computation coordination are handled by the system's core coordinator (e.g., the server).

[0090] As a specific implementation method, when the server performs security protection operations such as multi-party secure computation or homomorphic encryption, it binds fragmented data from the client and the server with task identifiers to organize them into a complete secure computation task, and completes fee settlement or compliance audit based on the on-chain evidence storage results.

[0091] Optionally, in some embodiments, after step 102, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the second fragment data from the blockchain network based on the task identifier; and sending the second fragment data to the auditing terminal.

[0092] The auditing end is a third-party auditing firm that audits transactions. Specifically, in some embodiments, the auditing end acts as a data-less initiator, while the client and server exist as two computing nodes. Since the task identifier is data that can be shared by the third-party auditing firm, the firm can initiate audits of one or more task transactions based on the task identifier.

[0093] In this embodiment, the auditing end initiates an audit task, sending an audit notification carrying a task identifier to the client and server. This triggers the client and server to download their respective uploaded fragment data from the blockchain network. Specifically, in response to the audit notification sent by the auditing end, the client downloads the first fragment data from the blockchain network based on the task identifier, and the server downloads the second fragment data from the blockchain network based on the task identifier.

[0094] After the client downloads the first fragment of data and the server downloads the second fragment of data, various statistical analysis operations can be collaboratively performed based on MPC technology without revealing plaintext. In some embodiments, the client sends the first fragment of data to the auditing end, and the server sends the second fragment of data to the auditing end. The auditing end uses a pre-built MPC calculation operator to perform encrypted operations on the first and second fragments of data; the specific calculation method is not limited here. In other embodiments, the client uses a pre-built MPC calculation operator to perform encrypted operations on the first and second fragments of data; the specific calculation method is not limited here. In other embodiments, the server uses a pre-built MPC calculation operator to perform encrypted operations on the first and second fragments of data; the specific calculation method is not limited here.

[0095] It should be understood that the specific MPC calculation operators used are not limited here. For example, in some embodiments, dense-state operations can be performed using operators such as the aforementioned multiplication operator and equality comparison operator. In other embodiments, depending on the audit business requirements, complex aggregation and analysis functions such as summation, mean, variance, standard deviation, median, sorting, maximum / minimum values, etc., can also be supported. For example, in some embodiments, the mean of sample features within the intersection can be calculated through secure summation and secure division. In other embodiments, based on secure comparison and selection protocols, secure calculation of the median or quantiles can be achieved. In other embodiments, variance and standard deviation can be further derived by using a combination of secure squares and mean.

[0096] It should be understood that all the above calculations are performed within the sharded domain, and the final output is still a result shard in a secret shared form. Each participating party can only obtain its local shard and cannot recover plaintext statistical indicators independently, thus ensuring data security while meeting the auditability requirements in scenarios such as supervision, billing, and risk control.

[0097] In this embodiment, the above method enables the auditing institution (after obtaining authorization from both parties or through on-chain evidence verification) to collaboratively restore the final statistical results based on the sharded transactions stored on the blockchain, and verify the integrity and correctness of the calculation process without accessing the original sensitive data.

[0098] It should be understood that, in some embodiments, the auditing end can download the first fragment data and the second fragment data from the blockchain network to verify whether the first fragment data sent by the client and / or the second fragment data sent by the server are authentic. The specific process will not be described in detail here.

[0099] The following is an example of a specific implementation, please refer to Figures 2-5 for details. The client and server can be understood as any two computing nodes in the blockchain network, and the auditing end is a third-party authoritative institution without data. For example, when the first computing node initiates a query to the second computing node, the first computing node is the client and the second computing node is the server.

[0100] For ease of description, the client includes four first identifiers, denoted as a1, a2, a3, and a4. The server stores four second identifiers, denoted as b1, b2, b3, and b4. Each second identifier is associated with a corresponding sample feature; specifically, b1 corresponds to msg1, b2 to msg2, b3 to msg3, and b4 to msg4.

[0101] Step 1: Securely request interaction with complete anonymity.

[0102] In this embodiment, by introducing an Oblivious Programmable Pseudorandom Function (OPPRF) and MPC comparison operator technology, the identifier matching task is transformed into a task of comparing function-encoded values. Specifically, the determination of whether the client's first identifier and the server's second identifier are equal is transformed into a task of comparing whether the encoded values ​​y and y* are equal. If y == y* at a certain position, it means that the query item ID at that position is the same ID as the ID to be matched; otherwise, they are different IDs.

[0103] As shown in Figure 2, through the fully anonymous secure intersection process, the client obtains a series of first encoded values, namely y1, y2, ..., yt. The value of t depends on the size of the Cuckoo hash table. The order of each first identifier in the first encoded values ​​is shuffled, thereby obfuscating the input order and further enhancing the security of the query process. The server also obtains a series of second encoded values ​​(y1*, y2*, ..., yt*) and their corresponding values ​​(Value) (Value 1, Value 2, ..., Value t), where Value i is the value corresponding to yi*. For example, in Figure 2, Value 1 corresponding to y1* is {b1||msg1,b3||msg3}. It should be understood that if y1* belongs to the intersection, then value 1 is the sample feature corresponding to the real b. The client segments its series of first encoded values ​​y to obtain a series of fragments, and sends the corresponding fragments to the server; at the same time, the server also segments its series of second encoded values ​​y* and their corresponding values ​​value to obtain a series of fragments, and sends the corresponding fragments to the client.

[0104] Step 2: Server-side metering audit.

[0105] As shown in Figure 3, in this embodiment, a homomorphic encryption scheme based on a null polynomial is used to implement server-side metering auditing. First, the server uses each second identifier as a root, and then multiplies the factors to obtain the null polynomial P(x).

[0106] ;in, For the i-th second identifier, when x equals any first identifier, The result is zero. Finally, the zero-reduction polynomial is constructed as follows: Then, the server generates a homomorphic encryption public key PK and a private key SK. The public key PK is used to encrypt data, and the private key SK is used to decrypt data. The server uses the public key PK to homomorphically encrypt each coefficient in the null polynomial, obtaining encrypted coefficients. These encrypted coefficients are then converted into ciphertext. For example, for the coefficients... Encrypt to obtain .

[0107] The server sends the encrypted coefficients to the client. After receiving the encrypted coefficients, the client performs homomorphic plaintext-ciphertext multiplication with its own query item ID and the encrypted polynomial coefficients, and then performs ciphertext-ciphertext addition to obtain the encrypted polynomial calculation result, which is the first encrypted result. The client generates a random number sequence r and... Perform a multiplication operation to produce a new encrypted result. For example, the i-th random number in a sequence of random numbers generated locally by the client. The corresponding ride The second encryption result is obtained. The client scrambles the encrypted result to protect data security, and then sends the scrambled target sequence back to the server.

[0108] The server receives the target sequence sent back by the client and decrypts the received out-of-order ciphertext using its private key SK. For example, the server... Decryption will yield the result. Among them, if one of them So there are Otherwise, only random numbers will be obtained. Therefore, the decrypted result will reveal whether there is a matching identifier. The server can identify the magnitude of the client's query hit by counting the number of zero results, thereby performing metering audits. The metering audit results can be used for billing or other auditing purposes. Moreover, since all calculations are performed in encrypted space, the server identifies the number of matching results (i.e., query hits) by checking the decrypted data, but cannot know which specific identifier matched, thus protecting the client's security.

[0109] The server saves audit results (such as the number of matches) as audit logs. These audit logs are stored on the blockchain to ensure transparency and immutability of data processing. Third-party organizations can access the audit records on the blockchain for independent verification and auditing.

[0110] Step 3: The client obtains the anonymous query results.

[0111] As shown in Figure 4, based on the aforementioned content, after the full stealth PSI is executed, a new encoded value for the original data is obtained. When the client... With the server When they are equal, there exists ,otherwise , For the client The encoded value obtained after encoding For the server The encoded value is obtained after encoding. However, in order to protect the client's query information from being exposed to the server, we cannot directly use plaintext for comparison. Instead, we need to adopt a secure computation scheme, namely, a multi-party secure computation comparison operator for encrypted comparison.

[0112] First, the client generates a random number. Then calculate This yields two pieces of information, namely... and Client-side reservation At the same time, The data is sent to the server for storage. Similarly, the server first generates a random number. Then calculate This yields two pieces of information, namely... and The server retains fragment information. At the same time, Send it to the client for holding.

[0113] Subsequently, based on the aforementioned fragment information, the client and server invoke the equality comparison operator in MPC to perform a closed-state comparison. This operator uses the client's... For input x, server-side Given input y, in a secret shared state, the most significant bit of xy is calculated using a bit-level adder circuit, and a fragmented form of a Boolean match indicator result is output, denoted as . ,in, Held by the client, It is held by the server.

[0114] This matching indication result Used to identify the client With the server Match: If ,but The output format is ( <1> _0, <1> _1); if ,but The output format is ( <0> _0, <0> _1).

[0115] Simultaneously, the sample features are also fragmented and secretly shared. It should be understood that in this embodiment, only the fragmentation and secret sharing of sample features held by the server are considered. In other embodiments, if the client also holds sample features, fragmentation and secret sharing can also be performed on the client's sample features simultaneously to achieve bidirectional querying; specific implementation is not limited here.

[0116] Based on server-side sample features For example, the server generates random numbers. and calculate Server-side retention At the same time The fragment is sent to the client for storage. Through this fragmentation and secret sharing operation, the client and server each hold a fragment of the sample feature.

[0117] Then the matching indication result With sample feature fragments When performing MPC dot multiplication, sample feature fragments are only retained after the multiplication is completed for equal entries; otherwise, the result is 0. The calculated result is then sent back to the client, so the client can only obtain the sample feature information corresponding to the matched identifier.

[0118] In this step, the client and server perform an MPC comparison operation to obtain the compared fragments, i.e., fragments with 0 (not in the intersection) or fragments with 1 (in the intersection), along with the fragments with the value. If they are in the intersection, both parties obtain the fragments of the real sample features.

[0119] Through these steps, combining MPC operators, additive circuits, secret segmentation, and fragmentation, the client can securely obtain matching results without exposing its query information, and ensures that the server cannot access the client's sensitive data. Furthermore, encryption and computation throughout the process are securely protected, preventing any party from leaking unnecessary sensitive information.

[0120] Step 4: Audit fragment information and store it on the blockchain.

[0121] In this step, the matching result fragments and sample feature fragments generated in the security set intersection protocol are stored on the blockchain to achieve audit traceability and data immutability. Specifically, the client packages its first matching result fragment and first sample feature fragment into a blockchain transaction. This transaction includes the first matching result fragment, the first sample feature fragment, the task identifier of the stealth query task, a timestamp, and the sender's address. The server packages its second matching result fragment and second sample feature fragment into a blockchain transaction. This transaction includes the second matching result fragment, the second sample feature fragment, the task identifier of the stealth query task, a timestamp, and the sender's address.

[0122] Step 5: A third-party organization obtains fragmented statistical data for auditing.

[0123] Please refer to Figure 5. When a third-party authoritative institution (i.e., the auditing end) audits a transaction, it needs to collect relevant metrics. Since the task identifier is data that can be shared by the third-party authoritative institution, it can initiate an audit of one or even multiple task transactions based on the task identifier.

[0124] In practice, a third-party authoritative institution can obtain the first and second fragments of data from the blockchain network in two ways. The first method involves sending an audit notification to both the client and server, triggering the client to download the first fragment and send it to the authoritative institution, while simultaneously triggering the server to download the second fragment and send it to the authoritative institution as well. The second method involves the authoritative institution downloading both fragments directly from the blockchain network. If the authoritative institution suspects dishonest behavior from a participant, it can use the second method to obtain the fragments to verify the accuracy of the data obtained through the first method.

[0125] As a specific embodiment, the task data processing method provided by this invention includes five steps: fully anonymous secure intersection, server-side metering audit, client-side acquisition of anonymous query results, on-chain storage of audit fragment information, and third-party institution acquisition of fragment statistical data for auditing. By introducing various technical means such as fully anonymous, homomorphic encryption, and multi-party secure computation, the ability of server-side metering audit and third-party institution post-audit is realized. Under the premise of protecting the client query information from being exposed, the audit compliance problem is solved.

[0126] Please refer to Figure 6, which is a second flowchart illustrating a task data processing method provided in this application embodiment. The method can be applied to a server and executed by the server. As shown in Figure 6, the method specifically includes the following steps: Step 601, obtaining second fragment data corresponding to a query task, the second fragment data including a second matching result fragment and a second sample feature fragment; Step 602, uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether a second identifier exists on the server that matches a first identifier provided by the client, the second matching result fragment is used to collaboratively determine the matching result of the query task with the first matching result fragment stored on the client, and only when the matching result indicates that the second identifier matches the first identifier, the second sample feature fragment is used to collaboratively generate sample features corresponding to the second identifier with the first sample feature fragment stored on the client.

[0127] In this embodiment, after completing the query task, the server uploads the second fragment data, which includes the second matching result fragment and the second sample feature fragment, to the blockchain network for storage. While ensuring data security, this supports post-event auditing by third-party institutions, solves the compliance auditing problem of anonymous query business, and helps promote the application of anonymous query in the data element circulation platform of the Internet of Things.

[0128] Optionally, in some embodiments, after step 602, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the second fragment data from the blockchain network based on the task identifier; and sending the second fragment data to the auditing terminal.

[0129] Optionally, in some embodiments, obtaining the first matching result fragment corresponding to the query task includes: encoding the second identifier to obtain a second encoded value; segmenting the second encoded value based on a third random number to obtain a third encoded fragment and a fourth encoded fragment; sending the third encoded fragment to the client and receiving the second encoded fragment sent by the client, wherein the second encoded fragment is used to form a first encoded value with the first encoded fragment, and the first encoded value is obtained by encoding the first identifier; inputting the second encoded fragment and the fourth encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, and the matching result is used to characterize whether the first identifier matches the second identifier, and the matching result is determined collaboratively by the first matching result fragment and the second matching result fragment.

[0130] Optionally, in some embodiments, the number of the first identifier is multiple, the number of the second identifier is multiple, and before step 601, the method further includes: constructing a null polynomial, the coefficients of which are determined based on multiple second identifiers; encrypting the coefficients using a public key to obtain encrypted coefficients; sending the encrypted coefficients to the client; receiving a target sequence sent by the client, the target sequence including multiple second encryption results; decrypting the second encryption results using a private key to obtain multiple decryption results, wherein if a second identifier matches a first identifier, the value of the second encryption result corresponding to the first identifier is 0, and the private key matches the public key; determining the number of second identifiers matched by the query task based on the number of second encryption results with a value of 0 among the multiple second encryption results.

[0131] In this embodiment, metering auditing is achieved using a homomorphic encryption scheme based on null polynomials. Through this method, since all calculations are performed within an encrypted space, the server cannot know the specific matching information, but it can determine the number of successful matches. This approach achieves server-side metering auditing while ensuring data security.

[0132] It should be understood that this embodiment is a server-side implementation corresponding to the embodiment shown in Figure 1. For specific implementation details, please refer to the relevant descriptions in the embodiment shown in Figure 1. To avoid repetition, these details will not be repeated here.

[0133] Please refer to Figure 7. This embodiment of the invention also provides a task data processing device 700, and the client includes the task data processing device 700. Figure 7 is one of the structural diagrams of the task data processing device 700 provided in this embodiment of the invention. Since the principle by which the task data processing device 700 solves the problem is similar to the task data processing method shown in Figure 1 of this embodiment of the invention, the implementation of this task data processing device 700 can refer to the implementation of the method, and repeated details will not be described again.

[0134] As shown in Figure 7, the task data processing device 700 includes: a first acquisition module 701, used to acquire first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; and a first upload module 702, used to upload the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there is a second identifier on the server that matches the first identifier provided by the client, the first matching result fragment is used to work with the second matching result fragment stored on the server to determine the matching result of the query task, and if the matching result indicates that there is a second identifier that matches the first identifier, the first sample feature fragment is used to work with the second sample feature fragment stored on the server to generate a sample feature corresponding to the second identifier.

[0135] Optionally, the task data processing device 700 further includes: a first receiving module, configured to receive an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; a first downloading module, configured to download the first fragment data from the blockchain network based on the task identifier; and a first sending module, configured to send the first fragment data to the auditing terminal.

[0136] Optionally, obtaining the first matching result fragment corresponding to the query task includes: encoding the first identifier to obtain a first encoded value; segmenting the first encoded value based on a first random number to obtain a first encoded fragment and a second encoded fragment; sending the second encoded fragment to the server and receiving a third encoded fragment sent by the server, wherein the third encoded fragment is used to form a second encoded value with a fourth encoded fragment, the second encoded value being obtained by encoding the second identifier; inputting the first encoded fragment and the third encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, the matching result being used to characterize whether the first identifier and the second identifier match, and the matching result being jointly determined by the first matching result fragment and the second matching result fragment.

[0137] Optionally, the number of the first identifiers is multiple, the number of the second identifiers is multiple, and the task data processing device 700 further includes: a second receiving module, configured to receive encryption coefficients sent by the server, wherein the encryption coefficients are obtained by encrypting the coefficients of a null polynomial, and the coefficients of the null polynomial are determined based on multiple second identifiers; a first calculation module, configured to, for each first identifier, use the first identifier as a variable of the null polynomial and calculate a first encryption result corresponding to the first identifier based on the encryption coefficients; a second calculation module, configured to multiply the first encryption result by a second random number to obtain a second encryption result; a sorting module, configured to randomly arrange multiple second encryption results to obtain a target sequence; and a second sending module, configured to send the target sequence to the server.

[0138] The task data processing device 700 provided in this embodiment of the invention can execute the task data processing method embodiment shown in FIG1. ​​Its implementation principle and technical effect are similar, and will not be described again here.

[0139] Please refer to Figure 8. This embodiment of the invention also provides a task data processing device 800, and the server includes the task data processing device 800. Figure 8 is a second structural diagram of the task data processing device 800 provided in this embodiment of the invention. Since the principle by which the task data processing device 800 solves the problem is similar to the task data processing method shown in Figure 6 of this embodiment, the implementation of this task data processing device 800 can refer to the implementation of the method, and repeated details will not be described again.

[0140] As shown in Figure 8, the task data processing device 800 includes: a second acquisition module, used to acquire second fragment data corresponding to the query task, the second fragment data including a second matching result fragment and a second sample feature fragment; and a second upload module, used to upload the second fragment data and the task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there is a second identifier on the server that matches a first identifier provided by the client, the second matching result fragment is used to collaboratively determine the matching result of the query task with the first matching result fragment stored by the client, and only when the matching result indicates that there is a second identifier that matches the first identifier, the second sample feature fragment is used to collaboratively generate a sample feature corresponding to the second identifier with the first sample feature fragment stored by the client.

[0141] Optionally, the task data processing device 800 further includes: a third receiving module for receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; a second downloading module for downloading the second fragment data from the blockchain network based on the task identifier; and a third sending module for sending the second fragment data to the auditing terminal.

[0142] Optionally, obtaining the first matching result fragment corresponding to the query task includes: encoding the second identifier to obtain a second encoded value; segmenting the second encoded value based on a third random number to obtain a third encoded fragment and a fourth encoded fragment; sending the third encoded fragment to the client and receiving the second encoded fragment sent by the client, wherein the second encoded fragment is used to form a first encoded value with the first encoded fragment, and the first encoded value is obtained by encoding the first identifier; inputting the second encoded fragment and the fourth encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, and the matching result is used to characterize whether the first identifier and the second identifier match, and the matching result is determined collaboratively by the first matching result fragment and the second matching result fragment.

[0143] Optionally, the number of the first identifiers is multiple, the number of the second identifiers is multiple, and the task data processing device 800 further includes: a construction module for constructing a null polynomial, the coefficients of which are determined based on the multiple second identifiers; an encryption module for encrypting the coefficients using a public key to obtain encrypted coefficients; a fourth sending module for sending the encrypted coefficients to the client; a fourth receiving module for receiving a target sequence sent by the client, the target sequence including multiple second encryption results; a decryption module for decrypting the second encryption results using a private key to obtain multiple decryption results, wherein if a second identifier matches a first identifier, the value of the second encryption result corresponding to the first identifier is 0, and the private key matches the public key; and a determination module for determining the number of second identifiers matched by the query task based on the number of second encryption results with a value of 0 among the multiple second encryption results.

[0144] The task data processing device 800 provided in this embodiment of the invention can execute the task data processing method embodiment shown in FIG6. Its implementation principle and technical effect are similar, and will not be described again here.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0146] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.

[0147] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0148] As shown in Figure 9, this embodiment of the invention also provides a task data processing device 900. The client includes the task data processing device 900, which includes a processor 901 for reading a program from a memory 902 and executing the following steps: obtaining first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; uploading the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein the query task is used to query whether a second identifier matching the first identifier provided by the client exists on the server, the first matching result fragment is used to collaboratively determine the matching result of the query task with the second matching result fragment stored on the server, and when the matching result indicates that the second identifier matches the first identifier, the first sample feature fragment is used to collaboratively generate sample features corresponding to the second identifier with the second sample feature fragment stored on the server.

[0149] Optionally, the processor 901 is further configured to read a program from the memory 902 and execute the following steps: receiving an audit notification sent by the auditing terminal, the audit notification carrying the task identifier; downloading the first fragment data from the blockchain network based on the task identifier; and sending the first fragment data to the auditing terminal.

[0150] Optionally, the processor 901 is further configured to read a program from the memory 902 and execute the following steps: encode the first identifier to obtain a first encoded value; segment the first encoded value based on a first random number to obtain a first encoded fragment and a second encoded fragment; send the second encoded fragment to the server and receive a third encoded fragment sent by the server, the third encoded fragment being used to form a second encoded value with a fourth encoded fragment, the second encoded value being obtained by encoding the second identifier; input the first encoded fragment and the third encoded fragment into a bit addition circuit for comparison to obtain a first matching result fragment; wherein, the bit addition circuit is configured to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, the matching result being used to characterize whether the first identifier matches the second identifier, and the matching result being determined collaboratively by the first matching result fragment and the second matching result fragment.

[0151] Optionally, the number of the first identifiers is multiple, the number of the second identifiers is multiple, and the processor 901 is further configured to read the program in the memory 902 and execute the following steps: receiving encryption coefficients sent by the server, the encryption coefficients being obtained by encrypting the coefficients of a null polynomial, the coefficients of the null polynomial being determined based on multiple second identifiers; for each first identifier, using the first identifier as a variable of the null polynomial, calculating a first encryption result corresponding to the first identifier based on the encryption coefficients; multiplying the first encryption result by a second random number to obtain a second encryption result; arranging the multiple second encryption results in random order to obtain a target sequence; and sending the target sequence to the server.

[0152] The task data processing device 900 provided in this embodiment of the invention can execute the task data processing method embodiment shown in FIG1. ​​Its implementation principle and technical effect are similar, and will not be described again here.

[0153] As shown in Figure 10, this embodiment of the invention also provides a task data processing device 1000. The client includes the task data processing device 1000, which includes a processor 1001 for reading a program in a memory 1002 and executing the following steps: obtaining second fragment data corresponding to a query task, the second fragment data including a second matching result fragment and a second sample feature fragment; uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there is a second identifier on the server that matches a first identifier provided by the client, the second matching result fragment is used to collaboratively determine the matching result of the query task with the first matching result fragment stored by the client, and only when the matching result indicates that the second identifier matches the first identifier, the second sample feature fragment is used to collaboratively generate a sample feature corresponding to the second identifier with the first sample feature fragment stored by the client.

[0154] Optionally, the processor 1001 is further configured to read a program from the memory 1002 and execute the following steps: receiving an audit notification sent by the auditing terminal, the audit notification carrying the task identifier; downloading the second fragment data from the blockchain network based on the task identifier; and sending the second fragment data to the auditing terminal.

[0155] Optionally, the processor 1001 is further configured to read a program from the memory 1002 and execute the following steps: encode the second identifier to obtain a second encoded value; segment the second encoded value based on a third random number to obtain a third encoded fragment and a fourth encoded fragment; send the third encoded fragment to the client and receive the second encoded fragment sent by the client, wherein the second encoded fragment is used to form a first encoded value with the first encoded fragment, and the first encoded value is obtained by encoding the first identifier; input the second encoded fragment and the fourth encoded fragment into a bit addition circuit for comparison to obtain a first matching result fragment; wherein the bit addition circuit is configured to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, wherein the matching result is used to characterize whether the first identifier matches the second identifier, and the matching result is determined collaboratively by the first matching result fragment and the second matching result fragment.

[0156] Optionally, the number of the first identifiers is multiple, the number of the second identifiers is multiple, and the processor 1001 is further configured to read a program in the memory 1002 and execute the following steps: constructing a null polynomial, the coefficients of which are determined based on multiple second identifiers; encrypting the coefficients using a public key to obtain encrypted coefficients; sending the encrypted coefficients to the client; receiving a target sequence sent by the client, the target sequence including multiple second encryption results; decrypting the second encryption results using a private key to obtain multiple decryption results, wherein if a second identifier matches a first identifier, the value of the second encryption result corresponding to the first identifier is 0, and the private key matches the public key; determining the number of second identifiers matched by the query task based on the number of second encryption results with a value of 0 among the multiple second encryption results.

[0157] The task data processing device 1000 provided in this embodiment of the invention can execute the task data processing method embodiment shown in FIG6. Its implementation principle and technical effect are similar, and will not be described again here.

[0158] This application also provides a readable storage medium storing a program. When the program is executed by a processor, it implements the various processes of the task data processing method embodiments shown in FIG1 or FIG6 above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0159] The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as compact disks (CD), digital video discs (DVD), Blu-ray discs (BD), high-definition universal discs (HVD), etc.), and semiconductor storage (such as read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), non-volatile memory (NAND FLASH), solid-state disks (SSD), etc.).

[0160] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0161] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0162] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for processing task data, characterized in that, Applied to a client, the method includes: acquiring first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; uploading the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there is a second identifier on the server that matches the first identifier provided by the client, the first matching result fragment is used to collaboratively determine the matching result of the query task with the second matching result fragment stored on the server, and if the matching result indicates that there is a second identifier that matches the first identifier, the first sample feature fragment is used to collaboratively generate sample features corresponding to the second identifier with the second sample feature fragment stored on the server.

2. The method according to claim 1, characterized in that, After uploading the first fragment data and the task identifier to the blockchain network for storage, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the first fragment data from the blockchain network based on the task identifier; and sending the first fragment data to the auditing terminal.

3. The method according to claim 1, characterized in that, Obtaining the first matching result fragment corresponding to the query task includes: encoding the first identifier to obtain a first encoded value; segmenting the first encoded value based on a first random number to obtain a first encoded fragment and a second encoded fragment; sending the second encoded fragment to the server and receiving a third encoded fragment sent by the server, wherein the third encoded fragment is used to form a second encoded value with a fourth encoded fragment, the second encoded value being obtained by encoding the second identifier; inputting the first encoded fragment and the third encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, the matching result being used to characterize whether the first identifier and the second identifier match, and the matching result being jointly determined by the first matching result fragment and the second matching result fragment.

4. The method according to claim 1, characterized in that, The method further includes, before obtaining the first fragment data corresponding to the query task, a plurality of first identifiers and a plurality of second identifiers, wherein the method further includes: receiving encryption coefficients sent by the server, the encryption coefficients being obtained by encrypting the coefficients of a null polynomial, the coefficients of the null polynomial being determined based on a plurality of second identifiers; for each first identifier, using the first identifier as a variable of the null polynomial, calculating a first encryption result corresponding to the first identifier based on the encryption coefficients; multiplying the first encryption result by a second random number to obtain a second encryption result; arranging the plurality of second encryption results in random order to obtain a target sequence; and sending the target sequence to the server.

5. A method for processing task data, characterized in that, The method is applied on the server side and includes: acquiring second fragment data corresponding to a query task, the second fragment data including a second matching result fragment and a second sample feature fragment; uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein, the query task is used to query whether there is a second identifier on the server that matches a first identifier provided by the client, the second matching result fragment is used to collaboratively determine the matching result of the query task with the first matching result fragment stored by the client, and only when the matching result indicates that there is a second identifier that matches the first identifier, the second sample feature fragment is used to collaboratively generate a sample feature corresponding to the second identifier with the first sample feature fragment stored by the client.

6. The method according to claim 5, characterized in that, After uploading the second fragment data and the task identifier to the blockchain network for storage, the method further includes: receiving an audit notification sent by an auditing terminal, the audit notification carrying the task identifier; downloading the second fragment data from the blockchain network based on the task identifier; and sending the second fragment data to the auditing terminal.

7. The method according to claim 5, characterized in that, Obtaining the first matching result fragment corresponding to the query task includes: encoding the second identifier to obtain a second encoded value; segmenting the second encoded value based on a third random number to obtain a third encoded fragment and a fourth encoded fragment; sending the third encoded fragment to the client and receiving the second encoded fragment sent by the client, wherein the second encoded fragment is used to form a first encoded value with the first encoded fragment, and the first encoded value is obtained by encoding the first identifier; inputting the second encoded fragment and the fourth encoded fragment into a bit addition circuit for comparison to obtain the first matching result fragment; wherein the bit addition circuit is used to output the matching result based on the first encoded fragment, the second encoded fragment, the third encoded fragment, and the fourth encoded fragment, and the matching result is used to characterize whether the first identifier and the second identifier match, and the matching result is determined collaboratively by the first matching result fragment and the second matching result fragment.

8. The method according to claim 5, characterized in that, The method further includes: constructing a null polynomial, the coefficients of which are determined based on the multiple second identifiers; encrypting the coefficients using a public key to obtain encrypted coefficients; sending the encrypted coefficients to the client; receiving a target sequence sent by the client, the target sequence including multiple second encrypted results; decrypting the second encrypted results using a private key to obtain multiple decrypted results; where a second identifier matches a first identifier, the value of the second encrypted result corresponding to the first identifier is 0, and the private key matches the public key; and determining the number of second identifiers matched by the query task based on the number of second encrypted results with a value of 0 among the multiple second encrypted results.

9. A task data processing apparatus, characterized in that, The client includes a task data processing device, which includes: a first acquisition module for acquiring first fragment data corresponding to a query task, the first fragment data including a first matching result fragment and a first sample feature fragment; and a first upload module for uploading the first fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein the query task is used to query whether there is a second identifier on the server that matches the first identifier provided by the client, the first matching result fragment is used to collaboratively determine the matching result of the query task with the second matching result fragment stored on the server, and if the matching result indicates that there is a second identifier that matches the first identifier, the first sample feature fragment is used to collaboratively generate a sample feature corresponding to the second identifier with the second sample feature fragment stored on the server.

10. A task data processing apparatus, characterized in that, The server includes a task data processing device, comprising: a second acquisition module for acquiring second fragment data corresponding to the query task, the second fragment data including a second matching result fragment and a second sample feature fragment; and a second upload module for uploading the second fragment data and a task identifier to a blockchain network for storage, the task identifier being used to identify the query task; wherein the query task is used to query whether there exists a second identifier on the server that matches a first identifier provided by the client, the second matching result fragment being used in conjunction with the first matching result fragment stored by the client to determine the matching result of the query task, and only when the matching result indicates that there is a second identifier that matches the first identifier, the second sample feature fragment being used in conjunction with the first sample feature fragment stored by the client to generate a sample feature corresponding to the second identifier.

11. A task data processing device, wherein a client includes the task data processing device, the task data processing device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program from the memory to implement the steps of the method for processing task data as described in any one of claims 1 to 4.

12. A task data processing device, wherein the server includes the task data processing device, the task data processing device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps of the method for processing task data as described in any one of claims 5 to 8.

13. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the task data processing method as described in any one of claims 1 to 4, or the steps in the task data processing method as described in any one of claims 5 to 8.

Citation Information

Patent Citations

  • Hidden trace query method and device based on oblivious transmission protocol and secret sharing

    CN114143000A

  • Data processing method and device

    CN115630399A

  • Query processing method and device, equipment and medium

    CN116702215A

  • Information retrieval method and device, equipment, storage medium and program product

    CN121029804A

  • Computer-implemented system and method for providing data privacy in a cloud using discrete homomorphic encryption

    US9031229B1