Private computing program evaluation method and device, equipment and medium
By obtaining the operating data and protocol description text of the privacy computing program, generating prompt words and evaluating their matching degree, the problem of program execution fidelity in privacy computing is solved, and the processing quality and evaluation efficiency are improved.
Patent Information
- Application Number
- CN202410776115.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-14
AI Technical Summary
During the privacy computing process, it is difficult to determine whether the executed computing program faithfully executes the privacy computing protocol, leading to security and fairness issues.
By obtaining the running data and protocol description text of the execution of the privacy computing program, prompt words are generated and provided to the large model to evaluate the match between the execution process of the program and the protocol description text, and to determine whether the program faithfully executes the secure computing protocol.
Effectively determine whether the privacy computing program faithfully implements the secure computing protocol, improves processing quality, reduces manual evaluation, and ensures the unity and accuracy of evaluation standards.
Smart Images

Figure CN118709189A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and medium for evaluating a privacy computing program. Background Art
[0002] With the development of privacy computing technology, privacy computing is being applied in more and more occasions, and more and more service providers are participating in privacy computing. However, because privacy computing has high requirements for computing power and security, some service providers may improve computing performance at the expense of security during the execution process. The opacity of the privacy computing process performed by each service provider often leads to unfair competition and may also cause security issues in the privacy computing business being executed. Therefore, in the privacy computing process, how to determine whether the executed computing program faithfully executes the privacy computing protocol is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of this specification provide a method, apparatus, device and medium for evaluating a privacy computing program to solve the problem of difficulty in determining whether the executed computing program faithfully implements the privacy computing protocol.
[0004] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0005] An evaluation method for a privacy computing program provided in an embodiment of this specification includes:
[0006] Obtaining the operational data generated during the execution of the privacy computing program;
[0007] Obtaining a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules to be executed by the privacy computing program;
[0008] Based on the operation data and the protocol description text, generate a prompt word containing at least the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the matching degree between the execution process of the privacy computing program and the protocol description text;
[0009] The prompt word is provided to the large model to obtain an evaluation result indicating the degree of matching output by the large model.
[0010] An evaluation device for a privacy computing program provided in an embodiment of this specification includes:
[0011] A first data acquisition module is used to acquire operation data generated during the execution of the privacy computing program;
[0012] A second data acquisition module is used to acquire a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules that the privacy computing program needs to execute;
[0013] A prompt word generation module, used to generate a prompt word containing at least the operation data and the protocol description text based on the operation data and the protocol description text; the prompt word is used to indicate the matching degree between the execution process of the privacy computing program evaluated by the large model and the protocol description text;
[0014] The result determination module is used to provide the prompt word to the large model to obtain the evaluation result output by the large model indicating the matching degree.
[0015] An evaluation device for a privacy computing program provided in an embodiment of this specification includes:
[0016] at least one processor; and,
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0019] Obtaining the operational data generated during the execution of the privacy computing program;
[0020] Obtaining a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules to be executed by the privacy computing program;
[0021] Based on the operation data and the protocol description text, generate a prompt word containing at least the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the matching degree between the execution process of the privacy computing program and the protocol description text;
[0022] The prompt word is provided to the large model to obtain an evaluation result indicating the degree of matching output by the large model.
[0023] An embodiment of this specification provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement a method for evaluating a privacy computing program.
[0024] An embodiment of this specification can achieve the following beneficial effects:
[0025] In the embodiments of this specification, through the summarizing and organizing capabilities of the large model, the acquired operating data can be compared with the existing protocol description text to determine the degree to which the privacy computing program is executed in accordance with the protocol text. This can effectively determine whether the privacy computing program used to process the privacy computing task faithfully executes the security computing protocol that needs to be satisfied by the privacy computing task, and is also conducive to ensuring the processing quality of the privacy computing task. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 A schematic diagram of an application scenario of a privacy computing program evaluation method provided in an embodiment of this specification;
[0028] Figure 2 A flowchart of a privacy computing program evaluation method provided in an embodiment of this specification;
[0029] Figure 3 A swim lane diagram of a privacy computing program evaluation method provided in an embodiment of this specification;
[0030] Figure 4 A schematic diagram of the structure of an evaluation device for a privacy computing program provided in an embodiment of this specification;
[0031] Figure 5 A schematic diagram of the structure of an evaluation device for a privacy computing program provided in an embodiment of this specification. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0033] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0034] In order to more clearly illustrate the method provided in the embodiments of this specification, some technical concepts are first explained here:
[0035] A large model refers to a machine learning model with large-scale parameters and complex computational structures. It is a language model with stronger analytical capabilities by increasing model parameters, and is generally implemented through a natural language interface. It is usually built with a deep neural network and can handle complex tasks and data. It has a wide range of applications, including natural language processing, computer vision, speech recognition, and recommendation systems. The large model learns complex patterns and features by training massive amounts of data. It is a deep learning model trained on massive amounts of text data. The large language model can not only generate natural language text, but also deeply understand the meaning of the text and handle various natural language tasks, such as text summarization, question answering, translation, etc.
[0036] Privacy computing is a general term for a series of technical routes that implement data analysis and computing on the premise of protecting the data itself from external leakage. It can achieve the goal of "data available but invisible" and realize the transformation and release of data value on the premise of fully protecting data and privacy security. Privacy computing is not a single technology, but includes a variety of privacy protection technologies and privacy enhancement technologies. It is a general term for a series of technologies involving multiple disciplines such as cryptography, security hardware, information theory, and distributed computing.
[0037] From a technical perspective, privacy computing can be a cross-disciplinary technology that covers many disciplines, including privacy computing technology based on cryptography represented by multi-party secure computing, technologies derived from the integration of artificial intelligence and privacy protection technology represented by federated learning, privacy computing technology based on trusted hardware represented by trusted execution environment, etc. Different technologies are often used in combination to complete the calculation and analysis tasks of data while ensuring the security and privacy of the original data.
[0038] The call stack can be understood as the call path obtained through memory snapshots when the program is running.
[0039] Vector matching can be understood as finding the most matching segment from massive data or code through logic such as text similarity judgment.
[0040] In order to solve the defects in the prior art, this solution provides the following embodiments:
[0041] Figure 1 A schematic diagram of an application scenario of a privacy computing program evaluation method provided in an embodiment of this specification. Figure 1As shown, in this scheme, the prompt word prompt used by the large model can be generated based on the running data 1 of the privacy computing program executed by the participant and the protocol description text 2 corresponding to the privacy computing program. The prompt word can instruct the large model to evaluate the execution degree of the privacy program, and then use the inductive and collation ability of the large model 3 to judge whether the privacy computing program executed by the participant complies with the provisions of the secure computing protocol set according to the privacy task to be processed, and then the fidelity of the privacy computing program to the computing protocol can be determined, and the ability and credibility of the service provider who provides the privacy computing program can also be reflected. Among them, the large model 3 can summarize and sort out information that can represent the execution degree of the privacy computing program according to the protocol description text based on the prompt word, which can also be understood as the matching degree 4 of the two. Specifically, it can be a score from 0 to 100. The higher the score, the higher the matching degree, which can also indicate that the execution degree of privacy computing is higher and more in line with the protocol requirements of privacy computing. In practical applications, the privacy computing program can be provided by the participants participating in the privacy computing, or by other service providers who have compiled the privacy computing program.
[0042] In practical applications, if the privacy computing program faithfully executes the computing protocol, it can also reflect that the computing results provided by the privacy computing program are highly credible. In scenarios where privacy computing is required, the appropriate service provider can be selected to provide the privacy computing program based on the determined execution level.
[0043] Next, a privacy computing program evaluation method provided in the embodiment of the specification is specifically described with reference to the accompanying drawings:
[0044] Figure 2 A flowchart of a privacy computing program evaluation method provided in an embodiment of this specification. From the program perspective, the execution subject of the process can be a program or application client installed on an application server. Specifically, it can be an evaluation platform or server with evaluation function.
[0045] like Figure 2 As shown, the process may include the following steps:
[0046] Step 202: Obtain the operating data generated during the execution of the privacy computing program.
[0047] In practical applications, in order to ensure data security, privacy computing may need to be used in some business processing processes. For example, in the field of medical health, privacy computing technology can be used to protect the privacy of personal health data. For example, multiple medical institutions can jointly analyze the spread trend of the disease through secure multi-party computing without sharing the specific information of the patient. In the field of financial risk assessment, privacy computing technology can be used to protect the privacy of personal financial data. For example, financial institutions can use homomorphic encryption technology to encrypt customer account information to perform data analysis and risk assessment without exposing the user's specific account information. In the Internet field, privacy computing technology can be used to protect the user's private data. For example, advertisers can obtain the user's advertising preference information through secure multi-party computing without obtaining the user's specific personal information. In the field of artificial intelligence, privacy computing technology can be used to protect the privacy of training data. For example, different institutions can jointly train models through secure multi-party computing without sharing training data, thereby protecting the privacy of data.
[0048] In the embodiments of this specification, the privacy computing program may be a program used by the participants in the privacy computing to perform the privacy computing tasks; the operation data may be the operation data generated during the operation of the privacy computing program. In practical applications, the operation data may be collected through some monitoring tools, provided by the participants, or obtained from the device that carries and runs the privacy computing program. The specific method is not limited here.
[0049] Step 204: Obtain a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules that the privacy computing program needs to execute.
[0050] The protocol description text may represent the program protocol text corresponding to the privacy computing program, specifically, a secure computing protocol for privacy computing, which may include information about the privacy computing steps to be performed, information about the security level of the algorithm to be adopted, and other execution rules. For example, the protocol may state the use of a high-strength encryption algorithm, the sending of all ciphertexts, the use of differential privacy, etc. In practical applications, in the process of handling privacy computing services, secure computing protocols may be pre-formulated according to actual business needs, such as the vendor providing the privacy computing program providing secure computing protocols according to business needs, or the protocol description content may be determined based on some public and recognized information in the field, such as an interoperability algorithm description.
[0051] The protocol description text can be a secure computing protocol determined according to business requirements, or a description text generated based on the secure computing protocol. It can include source code snippets of privacy computing levels, or a natural language process description used to describe the privacy computing process. The source and specific form of the protocol description text are not specifically limited here.
[0052] Step 206: Based on the operation data and the protocol description text, generate a prompt word that at least contains the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the degree of match between the execution process of the privacy computing program and the protocol description text.
[0053] Step 208: Provide the prompt word to the large model to obtain an evaluation result output by the large model indicating the degree of matching.
[0054] A prompt is a form of input that tells an AI model what action it should take or what output it should generate when performing a specific task. A prompt is a natural language input, similar to a command or instruction, that lets the AI model know what it needs to do.
[0055] In the embodiments of this specification, the prompt word Prompt used by the big model can be generated based on the acquired operation data and the protocol description text to instruct the big model to evaluate the privacy computing program, and the execution degree of the privacy computing program according to the protocol description text can be determined with the help of the inductive summary ability of the big model. The execution degree can be understood as the matching degree between the privacy computing program and the protocol description text. The higher the matching degree, the more consistent the privacy computing program is with the protocol description text, and the setting of the privacy computing program is more in line with the actual business needs.
[0056] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0057] Figure 2 The method in the paper can compare the acquired operation data with the existing protocol description text through the inductive and organizing capabilities of the large model to determine the degree to which the privacy computing program is executed according to the protocol text. It can effectively judge whether the privacy computing program used to process the privacy computing task faithfully executes the security computing protocol that needs to be satisfied by the privacy computing task, and is also conducive to ensuring the processing quality of the privacy computing task.
[0058] On the other hand, it can reduce manual intervention and eliminate the need for humans to judge the faithful execution of privacy computing programs based on their own experience. This can improve evaluation efficiency and ensure the uniformity of evaluation standards.
[0059] In practical applications, a secure computing protocol that meets the requirements of the task can be determined based on the privacy computing task that needs to be processed. It can be understood that the protocol description text in the embodiments of this specification is a secure computing protocol that meets the requirements of the task, and can be a correct protocol text that has been manually reviewed. In practical applications, there may be some service providers who provide privacy computing programs that deviate from the protocol for the sake of computing efficiency. For example, the protocol states that a high-intensity encryption algorithm is used, but it is actually useless; the protocol states that full ciphertext is used, but in fact part of the plaintext is sent; the protocol states that differential privacy is used, but in fact no related functions are called, etc. The method in the embodiments of this specification can effectively evaluate whether the privacy computing program deviates from the security protocol. When multiple service providers compete, it can also ensure that everyone competes at the same security level, which can also be used as a factor in evaluating the service provider.
[0060] based on Figure 2 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0061] In order to improve the accuracy of the evaluation, the program source code can also be used as part of the prompt word, so that the large model can combine multi-dimensional information to obtain a more accurate evaluation result. Optionally, the method in the embodiment of this specification can also include:
[0062] Obtaining the source code of the privacy computing program;
[0063] The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes:
[0064] Based on the source code of the privacy computing program, the operating data and the protocol description text, a prompt word is generated that at least includes the source code, the operating data and the protocol description text.
[0065] The source code may be provided by a service provider that provides the privacy computing program. If there are multiple parties involved in the privacy computing, the source code may include the source code of the privacy computing program executed by each party. To facilitate the analysis of the large model, the source code may be converted into an embedding vector database in the embodiments of this specification.
[0066] In the embodiment of this specification, a list of software packages that the source code depends on can also be obtained, and an embedding vector database can be established together with the source code. The database can be constructed in an existing manner, which will not be described in detail here.
[0067] In practical applications, prompt words can include instructions, scenarios, input data, output indicators, etc. Among them, instructions can represent a task or instruction that we want the model to complete, such as in this embodiment, we hope that the model can give the execution degree of the privacy computing program according to the protocol description text, the matching degree of the execution process of the privacy computing program and the protocol description text, etc.; scenarios can represent external information or additional contextual information, which can guide the model to generate better responses, such as in this embodiment, it is aimed at the field of privacy computing; input data can represent the input or problem we are interested in, the response we hope to get, such as the running data, protocol text and problem information that needs to be solved by the large model in this embodiment, etc.; output indicators can indicate the type or format of the output, such as the output form of the execution degree in this embodiment, whether it is in the form of scoring or level, etc.
[0068] The operating data obtained in actual applications may not be exactly the operating data generated by the privacy computing program being executed once. For example, it may be the operating data generated by executing a part of the program, or it may be the operating data generated by executing multiple times. In order to provide the accuracy of the evaluation, the source code corresponding to the current operating data to be evaluated can be determined through the stack information, and the evaluation is performed in combination with the source code. Optionally, the operating data in the embodiments of this specification may include stack information, and the above-mentioned acquisition of the source code of the secure computing privacy computing program may specifically include:
[0069] Based on the stack in the execution data, source code corresponding to the stack is determined.
[0070] The stack information may be collected by stack tracking tools, such as systemtap, oprofile, etc. In the embodiments of this specification, prompt words may be generated based on source code, protocol description text, and operation data determined by the stack.
[0071] In the embodiments of this specification, the stack information and all the source code can also be provided to the big model, and an instruction to find the source code through the stack can be set in the prompt word, and the big model can execute the above steps.
[0072] In order to facilitate data collection and avoid affecting the business processing of the participants who execute the privacy computing program, the operating data obtained in the embodiments of this specification can be obtained by executing the privacy computing program in a virtual machine. Optionally, the operating data generated in the process of executing the privacy computing program can specifically include:
[0073] Obtain the operating data generated in the virtual machine on which the privacy computing program is deployed; the virtual machine has the same configuration as the execution device used by the privacy computing participant to execute the privacy computing program.
[0074] The operating system and version, number of processors, memory, disk size and other configuration information of the virtual machine can be determined according to the configuration of the execution device. In the embodiments of this specification, there can be multiple virtual machines. If there are multiple parties involved in privacy computing, such as multi-party secure computing that requires multiple parties to participate in the calculation, each party can correspond to at least one virtual machine. Of course, if the performance of the virtual machine is high, one virtual machine can also be used. There is no limitation on the number and specific deployment of virtual machines here, as long as they can meet actual needs.
[0075] In order to facilitate data collection, a related collection program or monitoring program can be installed in the virtual machine, which may include stack management tools, collection tools for resources such as CPU, memory, network, and hard disk information, and log collection tools. In the embodiments of this specification, the operating data may include: at least one of log data, stack data, and data on resource usage; wherein the resources include at least one of CPU, memory, network, and hard disk. If there are multiple parties involved in the secure computing, the acquired operating data may include the stack information, log information, and resource information such as CPU of each party.
[0076] It is understandable that if the operating data used in the embodiments of this specification includes data involving privacy, such data is collected and used after obtaining authorization.
[0077] Considering that the calculation process of privacy computing is relatively complicated, the protocol description text for privacy computing may be large. When the amount of data is too large, a large model may not be able to give very accurate results, or it may take a long time. As an implementation method, optionally, the method in the embodiment of this manual may also include:
[0078] Splitting the protocol description text into a plurality of sub-texts;
[0079] The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes:
[0080] For any sub-text among the plurality of sub-texts, based on the any sub-text and the operation data, a prompt word at least including the any sub-text and the operation data is generated.
[0081] In this embodiment, at least one prompt word can be generated for each subtext, and an evaluation result for each subtext can be obtained. Assuming that the protocol description text is divided into M subtexts, M prompt words can be generated, and at least one match can be performed using the large model for each subtext, that is, the large model can perform at least M operations, and an evaluation result for the M subtexts can also be obtained.
[0082] In practical applications, the matching result information corresponding to each sub-text can be integrated with the help of a large model or other small models or manual sorting to obtain information that can reflect the degree of matching of the privacy computing program for the entire protocol description text.
[0083] As an implementation manner, optionally, the evaluation result indicating the matching degree output by the large model in the embodiments of this specification may specifically include:
[0084] For any sub-text among the sub-texts, obtaining a sub-evaluation result generated by the large model for the prompt word of any sub-text; the sub-evaluation result is used to indicate the matching degree between the privacy calculation program and any sub-text;
[0085] Based on the sub-evaluation results corresponding to each sub-text, an overall evaluation result of the privacy program and the protocol description text is obtained.
[0086] In the embodiments of this specification, after obtaining the information of the matching programs of the privacy computing program and each sub-text with the help of the large model, the small model with the weighted summation function can also be used to integrate the obtained information of the matching programs of the privacy computing program and each sub-text to obtain the information of the matching degree of the privacy computing program and the entire protocol description text. Among them, the specific weight value can be positively correlated with the importance of each sub-file, or can be positively correlated with the number of characters contained in each sub-file, or can be set according to expert experience, which is not specifically limited here.
[0087] In practical applications, the need to generate an overall evaluation result can also be included in the prompt words, and the overall evaluation result of the protocol description text can be obtained with the help of the inductive and collation ability of the large model. For example, the generated prompt words can instruct the large model to determine the matching procedures of the privacy calculation program and each sub-text for each sub-text, or it can instruct the large model to determine the matching degree of the privacy calculation program and the entire protocol description text based on the matching procedures of the privacy calculation program and each sub-text. The large model can also be instructed to output the information of the matching procedures of the privacy calculation program and each sub-text, or it can be instructed to output the information of the matching degree of the privacy calculation program and the entire protocol description text.
[0088] In practical applications, the protocol description text can be generated according to the needs of the privacy computing task, and can include the steps or requirements that the participants need to perform in order to complete the task. As an implementation method, the protocol description text in the embodiment of this specification may include descriptions of multiple execution steps; the above splitting of the protocol description text into several sub-texts may specifically include:
[0089] According to the steps included in the protocol description text, the protocol description text is divided into a plurality of sub-texts; wherein one sub-text at least contains the description content of one execution step.
[0090] The execution steps may represent the calculation steps that need to be performed to complete the privacy task, such as how much data needs to be obtained from certain data according to the first rule, and then the obtained data is processed according to the first rule, and then the processed data is sent to a certain node, etc. The steps in the protocol description file can be set according to the actual privacy task to be processed, and no specific limitation is made here.
[0091] In practical applications, the steps in the protocol description text may be steps of the same level or steps of different levels. If the protocol description text contains steps of different levels, they may be divided based on the first level steps or steps of other levels, which is not specifically limited here.
[0092] You can also divide the text based on the amount of text contained in each step. For example, a certain step contains three small steps. If you take this large step as a sub-text, the sub-text is still relatively large. You can also divide the large step into three sub-texts according to the small steps, or divide it into two sub-texts, one sub-text contains the description of one small step, and the other text contains the description of two small steps.
[0093] In actual applications, text division can also be performed based on data volume only, such as dividing the protocol description text into multiple word texts of a preset data volume. The specific division method is not limited here, as long as it can meet actual needs.
[0094] In order to improve the accuracy of the evaluation, the operation data obtained in the embodiments of this specification may be operation data of multiple time periods, which can provide reference data for the large model and help improve the accuracy of the evaluation. Optionally, the above operation data in the embodiments of this specification may include operation data of multiple time periods during the operation of the privacy computing program;
[0095] The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text may specifically include:
[0096] Based on the operation data of any time period in the multiple time periods and the protocol description text, a prompt word at least including the operation data of any time period and the protocol description text is generated.
[0097] Assuming that the operation data of N time periods are collected, at least one prompt word can be generated based on the operation data in each time period, and the large model can perform an evaluation process or a matching process based on a prompt word, so that the large model can perform at least N evaluation processes or matching processes, and the large model can output at least N evaluation results, or it can integrate the various evaluation results into an overall evaluation result. The various evaluation results can be integrated manually or with a small model, or with a large model, which is similar to the above-mentioned way of integrating the evaluation results, and will not be repeated here.
[0098] In the embodiments of this specification, the relevant data of each time period can be organized into a text file, and the duration of the above time period can be greater than or equal to the duration of the security computing privacy computing program being executed once. In this way, it can be ensured as much as possible that the operating data of the entire execution process of the privacy computing is present in each file. If there are multiple parties involved in the privacy computing, the file can contain the operating information of each party. In practical applications, the large model has the ability to summarize and organize, and the results given by the large model are closely related to the prompt words provided to the large model. Providing high-quality prompt words helps the large model provide accurate results. In the embodiments of this specification, a prompt word template can also be pre-set, and the prompt words are obtained based on the template. Optionally, the method in the embodiments of this specification may also include:
[0099] Obtaining a preset prompt word template; the prompt word template includes an area for filling in operation data and protocol description text;
[0100] The generating of the prompt word including at least the operating data and the protocol description text based on the operating data and the protocol description text may specifically include:
[0101] The operation data and the protocol description text are added to the prompt word template to generate the prompt word.
[0102] The prompt word template may be obtained based on expert experience, or may be obtained by using a machine model to learn and analyze historical prompt words and corresponding historical results.
[0103] In the embodiments of this specification, program source code may also be provided to the large model as a reference item. Optionally, the prompt word template may include an area for filling in the source code, and the source code may also be used as a part of the prompt word.
[0104] In order to make the big model more clear about the tasks to be performed, the big model can also be given a role, indicating the problems to be handled by the big model, the result output format, etc. Optionally, the prompt word template in the embodiment of this specification can also include: information indicating the problems to be solved by the big model, role definition information for the big model, output format information, and at least one of information for filling in related source code.
[0105] As an example, the reference model prompt word prompt can be as follows:
[0106] You are an expert in privacy computing security protocols and are good at judging whether the execution of a program complies with the steps defined in the standard. You will make a judgment on the following program:
[0107] First, the program protocol text definition in the standard is: ${protocol text definition};
[0108] The relevant source code of the program is: ${program source code information found through the stack};
[0109] By running the program, the following information is collected:
[0110] The runtime stack information is: ${A's runtime stack}, ${B's runtime stack};
[0111] Related log output: ${A's log}, ${B's log};
[0112] The resource usage during this operation: ${resource usage of A}, ${resource usage of B};
[0113] Now, based on the above information, please judge whether the current program is faithfully executed according to the process defined in the protocol text. Give a score from 0 to 100. The higher the score, the higher the match. Do not output other information. If you cannot judge, please output "cannot judge".
[0114] The above can be an example of a prompt word provided to a large model. Among them, the protocol text definition can be the above-mentioned protocol description text, which can be a description text of a standard protocol text, or a protocol text set for a privacy computing business. The prompt word can include instruction information for the large model, such as the program source code information found through the stack in the above example, which can instruct the large model to find the corresponding source code according to the stack. In actual applications, the server can also find the program source code according to the stack and write the found source code into the prompt word, such as the {program source code information found through the stack} in the above example, which can be filled with the source code corresponding to the program.
[0115] In actual applications, there may be multiple parties involved in privacy computing. For example, for multi-party secure computing, at least two parties are required. In the embodiments of this specification, the prompt words may include the logs, stacks, resource usage and other operating data of each party. For example, in the above example, A can represent a party involved in privacy computing, and B can represent another party. If there is only one party, the prompt word may not indicate the party to which the operating data belongs.
[0116] The prompt words in the embodiments of this description may also include instructions for the problem that the large model is to solve, such as "Now, based on the above information, please determine whether the current program is faithfully executed according to the process defined in the protocol text." The prompt words may also include descriptive information for the output format, such as "Give a score from 0 to 100, the higher the score, the higher the match, do not output other information. If it is impossible to determine, please output "Unable to determine"", which can indicate the format in which the large model should output the results.
[0117] It can be understood that the above prompt word example is only an example given to more clearly illustrate the method provided in the embodiments of this specification, and the specific description content of the prompt word can be set according to actual needs and is not specifically limited here.
[0118] To more clearly illustrate the evaluation method of the privacy computing program provided in the embodiments of this specification, Figure 3 A swim lane diagram of a privacy computing program evaluation method provided in an embodiment of this specification. Figure 3 As shown, the scheme may include a preparation phase, a data collection phase, and a result analysis phase, which may specifically include:
[0119] Step 302: The server obtains the source code and dependent software package list provided by the service provider of the privacy computing program, and establishes an embedding vector library.
[0120] This step can be performed offline. The above data can be acquired and a vector library can be constructed before the program is run, so as to avoid occupying resources for running the program.
[0121] Step 304: The server may obtain the operating data generated by executing the privacy computing program.
[0122] Among them, one or more virtual machines can be prepared, and the manufacturer or other service provider can install the privacy computing program on the virtual machine. Relevant monitoring programs, such as log collection tools, can be installed in the virtual machine, and operation data can be obtained through the monitoring program.
[0123] In actual applications, the duration of the privacy computing program can be set, such as 1 minute, 2 minutes, etc., and the server can save the running data. If there is a lot of running data, the data can also be split, such as organizing the relevant data of each time period into a text file, and splitting the data every 10 seconds. The split files can also be sorted in the order of the time when the data was collected, so that the subsequent large model can be traversed.
[0124] In practical applications, the duration required for the privacy computing program to be executed once can be determined based on experience or historical execution data. The duration of the above-mentioned privacy computing program running can be greater than the duration required for the privacy computing program to be executed once, and can usually be a preset multiple of the duration, such as 5 times, 10 times, etc.
[0125] Step 306: The server obtains the protocol description text of the privacy computing program.
[0126] The protocol description text may be a natural language process description of the computing protocol of the privacy computing program. In the embodiments of this specification, each independent process in the protocol description text may also be split, such as by steps.
[0127] Step 308: The server generates a prompt word prompt based on the constructed embedding vector library, the acquired operation data and the protocol description text, and submits it to the large model.
[0128] Step 310: The large model can organize and summarize the acquired prompt words and analyze the matching between the privacy computing program and the protocol description text.
[0129] Among them, the large model can search or traverse the collected timing files to find the places where the timing files match the protocol description files, or where the privacy computing program matches the protocol description files, and determine the degree of match. The timing files can be understood as the above-mentioned files that store the running data, which can be multiple text files. The degree of match can also be understood as similarity, which can indicate the degree of execution of the privacy computing program according to the protocol description text.
[0130] Step 312: The server obtains the matching information provided by the large model and obtains the evaluation result.
[0131] In practical applications, the large model may be a large language model, which may provide a text description that includes a degree of match and is more in line with human language habits. In this way, the server may also display the result given by the large model as an evaluation result.
[0132] In practical applications, if the protocol description text is split into M sub-texts, and the operation data obtained is the operation data of N time periods, it can be simply understood as a text file of N operation data, so that M×N prompts can be generated, and the large model can obtain a result for each prompt, so that M×N evaluation information representing the degree of matching can be obtained. In the embodiments of this specification, prompts for summarizing the evaluation information can also be generated based on these evaluation information, and the overall evaluation result of the degree of matching can be obtained with the help of the summarizing and collating ability of the large model. It is also possible to use a preset small model to organize the various evaluation information obtained. It is also possible to organize and summarize the various evaluation information manually.
[0133] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 This is a schematic diagram of a privacy computing program evaluation device provided in an embodiment of this specification. Figure 4 As shown, the device may include:
[0134] A first data acquisition module 402, used to acquire operation data generated during the execution of the privacy computing program;
[0135] The second data acquisition module 404 is used to acquire a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules that the privacy computing program needs to execute;
[0136] A prompt word generation module 406 is used to generate a prompt word containing at least the operation data and the protocol description text based on the operation data and the protocol description text; the prompt word is used to indicate the matching degree between the execution process of the privacy computing program evaluated by the large model and the protocol description text;
[0137] The result determination module 408 is used to provide the prompt word to the large model to obtain the evaluation result output by the large model indicating the matching degree.
[0138] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0139] Figure 5 This is a schematic diagram of a privacy computing program evaluation device provided in an embodiment of this specification. Figure 5 As shown, the device 500 may include:
[0140] at least one processor 510; and,
[0141] A memory 530 in communication with the at least one processor; wherein,
[0142] The memory 530 stores instructions 520 executable by the at least one processor 510. The instructions are executed by the at least one processor 510 to enable the at least one processor 510 to:
[0143] Obtaining operational data generated during the execution of privacy computing programs;
[0144] Obtaining a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules to be executed by the privacy computing program;
[0145] Based on the operation data and the protocol description text, generate a prompt word containing at least the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the matching degree between the execution process of the privacy computing program and the protocol description text;
[0146] The prompt word is provided to the large model to obtain an evaluation result indicating the degree of matching output by the large model.
[0147] Based on the same idea, the embodiment of this specification also provides a computer-readable medium corresponding to the above method. The computer-readable medium stores computer-readable instructions, which can be executed by a processor to implement the above privacy computing program evaluation method.
[0148] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 5 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0149] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0150] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0151] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0152] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0153] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0157] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0158] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0159] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0160] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0161] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0162] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0163] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for evaluating a privacy computing program, comprising: Obtaining operational data generated during the execution of privacy computing programs; Obtaining a protocol description text for the privacy computing program; The protocol description text is used to describe the execution rules that the privacy computing program needs to execute; Based on the operation data and the protocol description text, generate a prompt word containing at least the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the matching degree between the execution process of the privacy computing program and the protocol description text; The prompt word is provided to the large model to obtain an evaluation result indicating the degree of matching output by the large model.
2. The method according to claim 1, further comprising: Obtaining the source code of the privacy computing program; The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes: Based on the source code of the privacy computing program, the operating data and the protocol description text, a prompt word is generated that at least includes the source code, the operating data and the protocol description text.
3. According to the method of claim 1, the step of obtaining the operation data generated during the execution of the privacy computing program specifically comprises: Obtain the operating data generated in the virtual machine on which the privacy computing program is deployed; the virtual machine has the same configuration as the execution device used by the privacy computing participant to execute the privacy computing program.
4. The method according to claim 1, further comprising: Splitting the protocol description text into a plurality of sub-texts; The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes: For any sub-text among the plurality of sub-texts, based on the any sub-text and the operation data, a prompt word at least including the any sub-text and the operation data is generated.
5. The method according to claim 4, wherein the protocol description text includes description contents of a plurality of execution steps; The step of splitting the protocol description text into a plurality of sub-texts specifically includes: According to the execution steps contained in the protocol description text, the protocol description text is divided into a plurality of sub-texts; wherein one sub-text at least contains the description content of one execution step.
6. According to the method of claim 4, obtaining the evaluation result indicating the matching degree output by the large model specifically comprises: For any sub-text among the sub-texts, obtaining a sub-evaluation result generated by the large model for the prompt word of any sub-text; The sub-evaluation result is used to indicate the matching degree between the privacy calculation program and any sub-text; Based on the sub-evaluation results corresponding to each sub-text, an overall evaluation result of the privacy program and the protocol description text is obtained.
7. The method according to claim 1, wherein the operation data comprises operation data of multiple time periods during the operation of the privacy computing program; The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes: Based on the operation data of any time period in the multiple time periods and the protocol description text, a prompt word at least including the operation data of any time period and the protocol description text is generated.
8. According to the method of claim 7, the duration of the time period is greater than or equal to the duration of the privacy computing program being executed once.
9. The method according to claim 1, further comprising: Get the preset prompt word template; The prompt word template includes an area for filling in operation data and protocol description text; The generating, based on the operation data and the protocol description text, a prompt word at least including the operation data and the protocol description text specifically includes: The operation data and the protocol description text are added to the prompt word template to generate the prompt word.
10. The method according to claim 9, wherein the prompt word template further comprises: At least one of information indicating a problem to be solved by the large model, role definition information for the large model, output format information, and information for filling in related source code.
11. The method according to any one of claims 1 to 10, wherein the operating data comprises: At least one of log data, stack data, and resource usage data; the resource includes at least one of CPU, memory, network, and hard disk.
12. An evaluation device for a privacy computing program, comprising: A first data acquisition module is used to acquire operation data generated during the execution of the privacy computing program; A second data acquisition module is used to acquire a protocol description text for the privacy computing program; The protocol description text is used to describe the execution rules that the privacy computing program needs to execute; A prompt word generation module, used to generate a prompt word containing at least the operation data and the protocol description text based on the operation data and the protocol description text; the prompt word is used to indicate the matching degree between the execution process of the privacy computing program evaluated by the large model and the protocol description text; The result determination module is used to provide the prompt word to the large model to obtain the evaluation result output by the large model indicating the matching degree.
13. An evaluation device for a privacy computing program, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining operational data generated during the execution of privacy computing programs; Obtaining a protocol description text for the privacy computing program; the protocol description text is used to describe the execution rules to be executed by the privacy computing program; Based on the operation data and the protocol description text, generate a prompt word containing at least the operation data and the protocol description text; the prompt word is used to indicate the large model to evaluate the matching degree between the execution process of the privacy computing program and the protocol description text; The prompt word is provided to the large model to obtain an evaluation result indicating the degree of matching output by the large model.
14. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the evaluation method of the privacy computing program according to any one of claims 1 to 11.
Citation Information
Patent Citations
Application program privacy compliance detection method, device, equipment and medium
CN112257114A
Method and device for verifying multi-party secure computing software and device for verification
CN112464174A
Program evaluation method and device, equipment, medium and program product
CN113391989A
Compliance judgment method and device, storage medium and electronic equipment
CN115168901A
Software service evaluation method and device, electronic equipment and storage medium
CN116719654A
Cited By
RAG data query method and device based on privacy protection, equipment and medium
CN119202339A
