A method and system for evaluating artificial intelligence models
By conducting security verification and detection on the request end and model of the artificial intelligence model testing platform, and using multiple test data, the security and accuracy problems in the existing technology are solved, and the security of the evaluation and the reliability of the results are improved.
Patent Information
- Application Number
- CN202410758560.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-13
AI Technical Summary
The existing model testing platform lacks security verification when testing artificial intelligence models. As a result, the security of the requester and the model itself and the accuracy of the test results cannot be guaranteed.
By performing security verification on the request side and conducting security testing before receiving the model to be evaluated, multiple evaluation data are used for model evaluation to ensure the security and accuracy of the data and model.
It improves the security and accuracy of artificial intelligence model evaluation, ensures the security of request-side data and models, and enhances the reliability of evaluation results through multiple tests.
Smart Images

Figure CN118332304B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and system for evaluating artificial intelligence models. Background Art
[0002] Artificial Intelligence (AI) is a technology that uses big data, network computing and deep learning to achieve human-like task processing. An AI model is a model that uses AI to recognize and process content such as images, voices and text. Model testing is an important part of AI model production. Through model testing technology, the pros and cons of the model can be analyzed to confirm the performance of the model. However, the existing model testing platform is used to test the AI model and obtain the test results of the test indicators corresponding to the AI model, which still has the following disadvantages:
[0003] (1) Existing model testing platforms usually do not perform security verification on the requesting end before receiving the AI model to be evaluated. Therefore, the security of the requesting end cannot be guaranteed, and thus the security of the data sent by the requesting end cannot be guaranteed.
[0004] (2) After the existing model testing platform receives the AI model to be evaluated, it usually does not perform security verification on the AI model itself before evaluating the AI model. Therefore, the security and accuracy of the AI model itself cannot be guaranteed.
[0005] (3) Existing model testing platforms usually only use one set of test data to test the AI model to be evaluated, thereby obtaining the test results. Since the number of test data sets is limited, the accuracy of the test results cannot be guaranteed. Summary of the invention
[0006] The purpose of this application is to provide a method and system for evaluating artificial intelligence models, which can improve the evaluation security and accuracy of artificial intelligence models.
[0007] To achieve the above-mentioned purpose, the present application provides a method for evaluating artificial intelligence models, comprising the following steps: S1: receiving an evaluation request, performing security verification on the requesting end according to the evaluation request, and generating a security result of the requesting end, wherein the security result of the requesting end is safe or unsafe; if the security result of the requesting end is safe, executing S2; if the security result of the requesting end is unsafe, sending a request risk alert; S2: receiving a model to be evaluated, performing a security test on the model to be evaluated, and generating a model test result, wherein the model test result is safe or unsafe; if the model test result is safe, executing S3; if the model test result is unsafe, sending a model risk alert; S3: obtaining an execution evaluation virtual machine according to the model to be evaluated, and evaluating the model to be evaluated through the execution evaluation virtual machine, obtaining an evaluation result, and sending the evaluation result to the requesting end; wherein the evaluation result includes at least: an output accuracy value and an accuracy judgment result.
[0008] As above, the sub-steps of receiving an evaluation request, performing security verification on the requesting end according to the evaluation request, and generating a security result of the requesting end are as follows: S11: receiving a login request or a registration request, and after completing the login or registration, receiving an evaluation request, wherein the evaluation request at least includes: request time, request address and requesting end information; wherein the requesting end information at least includes: the address of the requesting end, the device model, the current usage time, multiple real-time security data, and the value of each real-time security data; S12: determining the current impact weight of each real-time security data according to the device model and the current usage time in the requesting end information; S13: calculating the security value of the requesting end according to the value of each real-time security data in the requesting end information and the current impact weight; S14: judging the security value of the requesting end according to the preset security threshold of the requesting end, and generating a security result of the requesting end; if the security value of the requesting end is greater than or equal to the security threshold of the requesting end, the generated security result of the requesting end is secure; if the security value of the requesting end is less than the security threshold of the requesting end, the generated security result of the requesting end is insecure.
[0009] As above, the sub-steps of determining the current impact weight of each real-time security data according to the device model and the current usage time in the request end information are as follows: S121: Traverse the impact weight database according to the device model in the request end information, and use the impact weight table with the same impact device model as the device model in the request end information as the demand weight table; S122: Traverse the multiple security data in the demand weight table according to the multiple real-time security data in the request end information, and use the impact weight corresponding to the security data that is the same as the real-time security data as the demand impact weight; S123: Analyze the weight difference table corresponding to each demand impact weight according to the current usage time in the request end information to obtain the current weight difference; S124: Calculate the current impact weight based on the current weight difference and the demand impact weight, wherein the current impact weight = demand impact weight + current weight difference.
[0010] As above, wherein the weight difference table corresponding to each demand impact weight is analyzed according to the current usage time in the request end information, and the sub-steps for obtaining the current weight difference are as follows: S1231: Sort multiple standard usage times and current usage times in order from short to long, and take the standard usage time that is less than the current usage time as the short time, and generate a short sequence number for each short time; take the standard usage time that is longer than the current usage time as the long time, and generate a long sequence number for each long time; wherein the short sequence number corresponding to the short time with a short duration is smaller than the short sequence number corresponding to the short time with a long duration, and the long sequence number corresponding to the long time with a short duration is smaller than the long sequence number corresponding to the long time with a long duration; S1232: Analyze all short time to obtain the short difference; S1233: Analyze all long time to obtain the long difference; S1234: Calculate the current weight difference based on the short difference and the long difference.
[0011] As above, the expression of the current weight difference is as follows: ;
[0012] in, For the The current weight difference of real-time security data; The short serial number is The average weight difference corresponding to the short duration; For the A short difference of real-time safety data; The short serial number is The duration value corresponding to the short duration of ; The short serial number is The duration value corresponding to the short duration of ; , is the total number of short serial numbers; The duration value of the current usage time; The long serial number is The average weight difference corresponding to the long duration; The long serial number is The duration value corresponding to the long duration of ; The long serial number is The duration value corresponding to the long duration of ; , is the total number of long serial numbers; For the The long difference of real-time security data.
[0013] As above, the sub-steps of performing security testing on the model to be evaluated and generating model detection results are as follows: S21: calling the simulator, and receiving the model to be evaluated through the simulator; wherein the simulator is used to simulate an isolated operating environment; S22: performing virus detection on the model to be evaluated through the simulator, and generating model detection results; if there is no virus signature code in the model to be evaluated, the generated model detection result is safe; if there is at least one virus signature code in the model to be evaluated, the model to be evaluated is deleted, and the generated model detection result is unsafe.
[0014] As mentioned above, the simulator is provided with a pre-trained artificial intelligence model for virus detection, through which the model to be evaluated is subjected to virus detection, and a model detection result is generated.
[0015] As above, wherein, according to the model to be evaluated, an evaluation virtual machine is obtained, and the model to be evaluated is evaluated by executing the evaluation virtual machine, and the sub-steps for obtaining the evaluation results are as follows: S31: Performing type analysis on the model to be evaluated, and determining the model type to which the model to be evaluated belongs; S32: Taking the evaluation virtual machines with the same virtual machine type and model type as preliminary devices; S33: Reading the number of tasks to be executed of each preliminary device, and selecting the preliminary device with the least number of tasks to be executed as the evaluation virtual machine; S34: Calling multiple evaluation data to evaluate the model to be evaluated by executing the evaluation virtual machine, and obtaining the evaluation results, wherein each evaluation data includes at least: evaluation input data and evaluation output data.
[0016] As above, wherein, by executing the evaluation virtual machine to call multiple evaluation data to evaluate the model to be evaluated, the sub-steps for obtaining the evaluation results are as follows: S341: Randomly generate an evaluation number for each evaluation data, wherein one evaluation data corresponds to one evaluation number, and the evaluation numbers increase in sequence from small to large in the order in which the evaluation numbers are randomly generated; S342: Use the evaluation data with the smallest evaluation number as the current evaluation data, input the evaluation input data of the current evaluation data into the model to be evaluated, the model to be evaluated executes the evaluation input data, and outputs the current execution result, uses the evaluation output data of the current evaluation data to analyze the current execution result, obtains the data similarity value, and executes S343; S343: According to the total number of evaluation numbers, The evaluation number of the previous evaluation data is judged. If the total number of evaluation numbers is greater than the evaluation number of the current evaluation data, the data similarity value is stored, and the evaluation number of the current evaluation data is eliminated, and S342 is executed; if the total number of evaluation numbers is equal to the evaluation number of the current evaluation data, the data similarity value is stored, and S344 is executed; S344: all data similarity values are calculated to obtain the output precision value; S345: the output precision value is judged by the preset precision threshold, and the precision judgment result is generated; if the output precision value is greater than or equal to the precision threshold, the generated precision judgment result is excellent; if the output precision value is less than the precision threshold, the generated precision judgment result is inferior; S346: the evaluation result is generated according to the precision judgment result and the output precision value.
[0017] The present application also provides a system for evaluating artificial intelligence models, which includes at least: multiple request ends and an artificial intelligence model evaluation center; wherein the request end: is used to send evaluation requests; receive evaluation results; receive request risk alerts; receive model risk alerts; the artificial intelligence model evaluation center: is used to execute the above-mentioned method for evaluating artificial intelligence models.
[0018] The beneficial effects achieved by this application are as follows:
[0019] (1) The method and system for evaluating artificial intelligence models of the present application need to perform security verification on the requesting end before receiving the artificial intelligence model to be evaluated (i.e., the model to be evaluated). Therefore, the security of the requesting end can be further ensured, thereby ensuring the security of the data sent by the requesting end.
[0020] (2) The method and system for evaluating artificial intelligence models of the present application need to perform security verification on the artificial intelligence model to be evaluated after receiving the artificial intelligence model to be evaluated and before evaluating the artificial intelligence model to be evaluated. Therefore, the security and accuracy of the artificial intelligence model to be evaluated can be further ensured.
[0021] (3) The method and system for evaluating artificial intelligence models of the present application use multiple evaluation data to evaluate the artificial intelligence model to be evaluated, thereby obtaining an evaluation result. Since the amount of evaluation data is sufficient, the accuracy of the evaluation result can be further guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application 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 the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0023] Figure 1 A schematic diagram of the structure of an embodiment of a system for evaluating an artificial intelligence model;
[0024] Figure 2 A flowchart of an embodiment of a method for evaluating an artificial intelligence model. DETAILED DESCRIPTION
[0025] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0026] like Figure 1 As shown, the present application provides a system for evaluating artificial intelligence models, which at least includes: multiple request ends 110 and an artificial intelligence model evaluation center 120.
[0027] Among them, the request end 110 is used to send evaluation requests; receive evaluation results; receive request risk alerts; and receive model risk alerts.
[0028] Artificial Intelligence Model Evaluation Center 120: used to execute the following method for evaluating artificial intelligence models.
[0029] Furthermore, the artificial intelligence model evaluation center 120 includes at least: a security verification module, a scheduling module, multiple simulators, multiple evaluation virtual machines and a storage unit.
[0030] Among them, the security verification module: receives the evaluation request, performs security verification on the requesting end according to the evaluation request, and generates a security result for the requesting end; if the security result of the requesting end is unsafe, a request risk alert is sent.
[0031] Scheduling module: If the security result of the requesting end is safe, the simulator is called; if the model detection result is safe, one is selected from multiple evaluation virtual machines as the execution evaluation virtual machine.
[0032] Simulator: used to receive the model to be evaluated, perform security testing on the model to be evaluated, and generate model testing results; if the model testing result is unsafe, a model risk alert is sent.
[0033] Evaluation virtual machine: used to evaluate the model to be evaluated, obtain the evaluation results, and send the evaluation results to the requesting end.
[0034] Storage unit: used to store the impact weight database, which stores multiple impact weight tables, each impact weight table corresponds to an impact device model, and each impact weight table at least includes: multiple security data, each security data corresponds to an impact weight; one impact weight corresponds to a weight difference table, and each weight difference table at least includes: multiple standard usage time, one standard usage time corresponds to an average weight difference.
[0035] like Figure 2 As shown, the present application provides a method for evaluating an artificial intelligence model, comprising the following steps:
[0036] S1: Receive the evaluation request, perform security verification on the request side according to the evaluation request, and generate a security result of the request side, where the security result of the request side is secure or unsafe; if the security result of the request side is secure, execute S2; if the security result of the request side is unsafe, send a request risk alert.
[0037] Specifically, the request risk alert includes at least: the alert time and the security result of the requesting end. The AI model evaluation center sends the request risk alert to the requesting end.
[0038] Further, the sub-steps of receiving the evaluation request, performing security verification on the requesting end according to the evaluation request, and generating the security result of the requesting end are as follows:
[0039] S11: Receive a login request or a registration request. After completing the login or registration, receive an evaluation request, wherein the evaluation request includes at least: request time, request address and request end information; wherein the request end information includes at least: the address of the request end, the device model, the current usage time, multiple real-time security data, and the value of each real-time security data.
[0040] Specifically, the request time is the time point when the requesting end sends the evaluation request.
[0041] The request address is the location coordinates of the requesting end when it sends the evaluation request.
[0042] The current usage duration is the actual usage duration from the first run of the request end to the current run.
[0043] Among them, real-time security data includes at least: hardware security data, software security data and network security data.
[0044] Specifically, the value of the hardware security data is the security value of the device hardware of the requesting end collected in real time when sending the evaluation request, and is used to indicate the current hardware security of the requesting end. The value of the hardware security data can be obtained through the existing collection method.
[0045] The value of the software security data is the security value of the software on the requesting end collected in real time when sending the evaluation request, and is used to indicate the current software security of the requesting end. The value of the software security data can be obtained through the existing collection method.
[0046] The value of network security data is the security value of the requesting end's network collected in real time when sending the evaluation request, and is used to indicate the current network security of the requesting end. The value of network security data can be obtained through existing collection methods.
[0047] S12: Determine the current impact weight of each real-time security data according to the device model and current usage duration in the requesting end information.
[0048] Further, the sub-steps of determining the current impact weight of each real-time security data according to the device model and current usage duration in the requesting end information are as follows:
[0049] S121: Traverse the influence weight database according to the device model in the request end information, and use the influence weight table with the same influencing device model as the device model in the request end information as the demand weight table.
[0050] S122: Traverse the multiple security data in the demand weight table according to the multiple real-time security data in the request end information, and use the impact weight corresponding to the security data that is the same as the real-time security data as the demand impact weight.
[0051] S123: Analyze the weight difference table corresponding to each demand impact weight according to the current usage duration in the request end information to obtain the current weight difference.
[0052] Further, the weight difference table corresponding to each demand impact weight is analyzed according to the current usage time in the request end information, and the sub-steps for obtaining the current weight difference are as follows:
[0053] S1231: Sort multiple standard usage times and the current usage time in order from short to long, take the standard usage time with a duration less than the current usage time as the short time, and generate a short sequence number for each short time; take the standard usage time with a duration greater than the current usage time as the long time, and generate a long sequence number for each long time; wherein, the short sequence number corresponding to the short time with a short duration is smaller than the short sequence number corresponding to the short time with a long duration, and the long sequence number corresponding to the long time with a short duration is smaller than the long sequence number corresponding to the long time with a long duration.
[0054] Specifically, the interval between two adjacent standard usage times may be the same or different. In the present application, it is preferred that the interval between two adjacent standard usage times is the same.
[0055] The specific value of the interval between two adjacent standard usage durations depends on the actual situation. For example: if the current usage duration is 3.5 years, the short duration with short sequence number 1 is 1 year, the short duration with short sequence number 2 is 2 years, and the short duration with short sequence number 3 is 3 years. The long duration with long sequence number 1 is 4 years, the long duration with long sequence number 2 is 5 years, the long duration with long sequence number 3 is 6 years, and so on, the long duration with long sequence number N is M years.
[0056] Furthermore, due to the different usage time of the equipment, the actual wear and tear of the equipment is also different, so the average weight difference corresponding to different standard usage time is also different.
[0057] The average weight difference refers to the average value of the actual change between the actual impact weight of the actual security data of multiple request ends and the impact weight corresponding to the security data in the impact weight table under the conditions of the same device model and the same standard usage time.
[0058] S1232: Analyze all short durations to obtain short differences.
[0059] Furthermore, the expression of the short difference is as follows:
[0060] ;
[0061] in, For the A short difference of real-time safety data; The short serial number is The average weight difference corresponding to the short duration; The short serial number is The average weight difference corresponding to the short duration; The short serial number is The duration value corresponding to the short duration of ; The short serial number is The duration value corresponding to the short duration of ; , The total number of short sequence numbers.
[0062] Specifically, Indicates that the short sequence number is The short duration and short sequence number are The change in the average weight difference between the short durations. Indicates that the short sequence number is The short duration and short sequence number are The duration value of a short duration is the actual usage duration value corresponding to the short duration.
[0063] S1233: Analyze all long durations to obtain long differences.
[0064] Furthermore, the expression of the long difference is as follows:
[0065] ;
[0066] in, For the Long difference of real-time security data; The long serial number is The average weight difference corresponding to the long duration; The long serial number is The average weight difference corresponding to the long duration; The long serial number is The duration value corresponding to the long duration of ; The long serial number is The duration value corresponding to the long duration of ; , The total number of long serial numbers.
[0067] Specifically, Indicates that the long sequence number is The long duration and long sequence number of The change in the average weight difference between the long durations. Indicates that the long sequence number is The long duration and long sequence number of The duration value of a long duration is the actual usage duration value corresponding to the long duration.
[0068] S1234: Calculate the current weight difference according to the short difference and the long difference.
[0069] Furthermore, the expression of the current weight difference is as follows:
[0070] ;
[0071] in, For the The current weight difference of real-time security data; The short serial number is The average weight difference corresponding to the short duration; For the A short difference of real-time safety data; The short serial number is The duration value corresponding to the short duration of ; The short serial number is The duration value corresponding to the short duration of ; , is the total number of short serial numbers; The duration value of the current usage time; The long serial number is The average weight difference corresponding to the long duration; The long serial number is The duration value corresponding to the long duration of ; The long serial number is The duration value corresponding to the long duration of ; , is the total number of long serial numbers; For the The long difference of real-time security data.
[0072] Specifically, the duration value of the current usage duration is a value of the actual usage duration corresponding to the current usage duration.
[0073] S124: Calculate the current impact weight according to the current weight difference and the demand impact weight, where the current impact weight=demand impact weight+current weight difference.
[0074] Specifically, the current weight difference may be a positive number or a negative number, depending on the actual impact.
[0075] S13: Calculate the requester security value according to the value of each real-time security data in the requester information and the current impact weight.
[0076] Furthermore, the expression of the request side security value is as follows:
[0077] ;
[0078] in, It is the security value of the requester; If the address of the requesting end is verified as an illegal address through a third-party platform, then If the address of the requesting end is verified as a legal address through a third-party platform, then ; For the The current impact weight corresponding to each real-time security data; For the The value of real-time security data, , It is the total number of real-time security data.
[0079] Specifically, the third-party platform is a platform used to verify the legitimacy of the address of the requesting end, such as an official verification platform.
[0080] S14: The request side security value is judged according to the preset request side security threshold, and a request side security result is generated; if the request side security value is greater than or equal to the request side security threshold, the generated request side security result is safe; if the request side security value is less than the request side security threshold, the generated request side security result is unsafe.
[0081] Specifically, the specific value of the request end security threshold is set according to the actual situation.
[0082] S2: Receive the model to be evaluated, perform security detection on the model to be evaluated, and generate a model detection result, where the model detection result is safe or unsafe; if the model detection result is safe, execute S3; if the model detection result is unsafe, send a model risk alert.
[0083] Specifically, the model risk alert includes at least: the alert time and the model detection result. The models to be evaluated are different types of artificial intelligence models. The artificial intelligence model evaluation center sends the model risk alert to the requesting end.
[0084] Furthermore, as an embodiment, the model to be evaluated is subjected to virus detection through an existing virus detection model, and a model detection result is generated. If the model to be evaluated does not contain a virus, the generated model detection result is safe; if the model to be evaluated contains a virus, the generated model detection result is unsafe.
[0085] Specifically, the existing virus detection model is a pre-trained artificial intelligence model for virus detection.
[0086] Furthermore, as another embodiment, the sub-steps of performing security detection on the model to be evaluated and generating model detection results are as follows:
[0087] S21: calling a simulator and receiving a model to be evaluated through the simulator; wherein the simulator is used to simulate an isolated operating environment.
[0088] S22: Perform virus detection on the model to be evaluated through the simulator and generate a model detection result; if there is no virus signature code in the model to be evaluated, the generated model detection result is safe; if there is at least one virus signature code in the model to be evaluated, the model to be evaluated is deleted, and the generated model detection result is unsafe.
[0089] Furthermore, the simulator is provided with a pre-trained artificial intelligence model for virus detection, through which the model to be evaluated is subjected to virus detection and a model detection result is generated.
[0090] S3: Obtain an evaluation execution virtual machine according to the model to be evaluated, and evaluate the model to be evaluated by executing the evaluation virtual machine to obtain the evaluation result, and send the evaluation result to the requesting end; wherein the evaluation result at least includes: an output accuracy value and an accuracy judgment result.
[0091] Furthermore, the evaluation execution virtual machine is obtained according to the model to be evaluated, and the model to be evaluated is evaluated by executing the evaluation virtual machine. The sub-steps of obtaining the evaluation result are as follows:
[0092] S31: Perform type analysis on the model to be evaluated to determine the model type to which the model to be evaluated belongs.
[0093] Specifically, there are many types of artificial intelligence (AI) models, each of which is suitable for different tasks and problems. Therefore, the specific classification method of the model type of the model to be evaluated depends on the actual situation, where the classification method at least includes: classification according to the purpose of the model to be evaluated and classification according to the construction principle of the model to be evaluated.
[0094] Furthermore, the model types include at least: neural network model class, clustering model class, reinforcement learning model class and natural language processing model class.
[0095] Furthermore, the model to be evaluated is analyzed by a pre-trained classification model to determine the model type to which the model to be evaluated belongs.
[0096] S32: All evaluation virtual machines with the same virtual machine type and model type are selected as preliminary selection devices.
[0097] Specifically, one evaluation virtual machine corresponds to one virtual machine type. The specific classification method of the virtual machine type of the evaluation virtual machine is determined according to the actual situation, wherein the classification method at least includes: classification according to the purpose of the evaluation target and classification according to the construction principle of the evaluation target. Among them, the evaluation target is the model to be evaluated.
[0098] Furthermore, the virtual machine types include at least: a neural network model class, a clustering model class, a reinforcement learning model class, and a natural language processing model class.
[0099] S33: Read the number of tasks to be executed of each preliminary selected device, and select the preliminary selected device with the least number of tasks to be executed as the virtual machine for execution and evaluation.
[0100] Specifically, the number of tasks to be executed is the number of models to be evaluated that are in a queue waiting for evaluation in the task list of the preliminary selected equipment.
[0101] S34: The evaluation model to be evaluated is evaluated by executing the evaluation virtual machine to call multiple evaluation data to obtain evaluation results, wherein each evaluation data at least includes: evaluation input data and evaluation output data.
[0102] Furthermore, by executing the evaluation virtual machine to call multiple evaluation data to evaluate the model to be evaluated, the sub-steps of obtaining the evaluation results are as follows:
[0103] S341: Randomly generate an evaluation number for each evaluation data, wherein one evaluation data corresponds to one evaluation number, and the evaluation numbers increase in sequence from small to large according to the order in which the evaluation numbers are randomly generated.
[0104] Specifically, the sequence number of the evaluation data whose evaluation numbers are randomly generated first is 1; the sequence number of the evaluation data whose evaluation numbers are randomly generated second is 2, ..., and the sequence number of the evaluation data whose evaluation numbers are randomly generated Uth is U.
[0105] S342: Use the evaluation data with the smallest evaluation number as the current evaluation data, input the evaluation input data of the current evaluation data into the model to be evaluated, the model to be evaluated executes the evaluation input data and outputs the current execution result, use the evaluation output data of the current evaluation data to analyze the current execution result, obtain the data similarity value, and execute S343.
[0106] Specifically, the data similarity value indicates the degree of similarity between the current execution result and the evaluation output data. The data similarity value can be obtained through a pre-trained similarity value analysis model.
[0107] S343: Determine the evaluation number of the current evaluation data according to the total number of evaluation numbers. If the total number of evaluation numbers is greater than the evaluation number of the current evaluation data, store the data similarity value, eliminate the evaluation number of the current evaluation data, and execute S342; if the total number of evaluation numbers is equal to the evaluation number of the current evaluation data, store the data similarity value and execute S344.
[0108] S344: Calculate all data similarity values to obtain an output accuracy value.
[0109] Furthermore, the expression of the output precision value is:
[0110] ;
[0111] in, is the output precision value; For the Data similarity values; , is the total number of similar values of the data.
[0112] S345: The output accuracy value is judged by a preset accuracy threshold, and an accuracy judgment result is generated; if the output accuracy value is greater than or equal to the accuracy threshold, the generated accuracy judgment result is excellent; if the output accuracy value is less than the accuracy threshold, the generated accuracy judgment result is inferior.
[0113] Specifically, the specific value of the accuracy threshold is set according to actual conditions.
[0114] S346: Generate an evaluation result based on the accuracy judgment result and the output accuracy value.
[0115] The beneficial effects achieved by this application are as follows:
[0116] (1) The method and system for evaluating artificial intelligence models of the present application need to perform security verification on the requesting end before receiving the artificial intelligence model to be evaluated (i.e., the model to be evaluated). Therefore, the security of the requesting end can be further ensured, thereby ensuring the security of the data sent by the requesting end.
[0117] (2) The method and system for evaluating artificial intelligence models of the present application need to perform security verification on the artificial intelligence model to be evaluated after receiving the artificial intelligence model to be evaluated and before evaluating the artificial intelligence model to be evaluated. Therefore, the security and accuracy of the artificial intelligence model to be evaluated can be further ensured.
[0118] (3) The method and system for evaluating artificial intelligence models of the present application use multiple evaluation data to evaluate the artificial intelligence model to be evaluated, thereby obtaining an evaluation result. Since the amount of evaluation data is sufficient, the accuracy of the evaluation result can be further guaranteed.
[0119] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the scope of protection of the present application is intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application. Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the protection scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.
Claims
1. A method for evaluating an artificial intelligence model, characterized in that: The steps include: S1: Receive the evaluation request, perform security verification on the request side according to the evaluation request, and generate a security result of the request side, where the security result of the request side is safe or unsafe; if the security result of the request side is safe, execute S2; if the security result of the request side is unsafe, send a request risk alert; S2: Receive the model to be evaluated, perform security detection on the model to be evaluated, and generate a model detection result, where the model detection result is safe or unsafe; if the model detection result is safe, execute S3; if the model detection result is unsafe, send a model risk alert; S3: Obtain an evaluation execution virtual machine according to the model to be evaluated, and evaluate the model to be evaluated by executing the evaluation virtual machine to obtain the evaluation result, and send the evaluation result to the requesting end; wherein the evaluation result at least includes: an output accuracy value and an accuracy judgment result; The sub-steps of receiving the evaluation request, performing security verification on the requesting end according to the evaluation request, and generating the security result of the requesting end are as follows: S11: receiving a login request or a registration request, and after completing the login or registration, receiving an evaluation request, wherein the evaluation request at least includes: a request time, a request address, and request end information; wherein the request end information at least includes: an address of the request end, a device model, a current usage time, a plurality of real-time security data, and a value of each real-time security data; S12: determining the current impact weight of each real-time security data according to the device model and current usage duration in the requesting end information; S13: Calculate the requester security value according to the value of each real-time security data in the requester information and the current impact weight; S14: judging the request side security value according to the preset request side security threshold, and generating a request side security result; if the request side security value is greater than or equal to the request side security threshold, the generated request side security result is safe; if the request side security value is less than the request side security threshold, the generated request side security result is unsafe; The sub-steps of determining the current impact weight of each real-time security data according to the device model and current usage duration in the requesting end information are as follows: S121: Traverse the influence weight database according to the device model in the request end information, and use the influence weight table with the same influence device model as the device model in the request end information as the demand weight table; S122: traverse multiple security data in the demand weight table according to the multiple real-time security data in the request end information, and use the impact weight corresponding to the security data that is the same as the real-time security data as the demand impact weight; S123: Analyze the weight difference table corresponding to each demand impact weight according to the current usage duration in the request end information to obtain the current weight difference; S124: Calculate the current impact weight according to the current weight difference and the demand impact weight, where the current impact weight=demand impact weight+current weight difference; Among them, the weight difference table corresponding to each demand impact weight is analyzed according to the current usage time in the request end information, and the sub-steps of obtaining the current weight difference are as follows: S1231: sorting a plurality of standard usage durations and the current usage duration in order from short to long, taking a standard usage duration that is shorter than the current usage duration as a short duration, and generating a short sequence number for each short duration; taking a standard usage duration that is longer than the current usage duration as a long duration, and generating a long sequence number for each long duration; wherein the short sequence number corresponding to the short duration of a short duration is smaller than the short sequence number corresponding to the short duration of a long duration, and the long sequence number corresponding to the long duration of a short duration is smaller than the long sequence number corresponding to the long duration of a long duration; S1232: Analyze all short durations to obtain short differences; S1233: Analyze all long durations to obtain long differences; S1234: Calculate the current weight difference according to the short difference and the long difference; Among them, the expression of the current weight difference is as follows: ; in, For the The current weight difference of real-time security data; The short serial number is The average weight difference corresponding to the short duration; For the A short difference of real-time safety data; The short serial number is The duration value corresponding to the short duration of ; The short serial number is The duration value corresponding to the short duration of ; , is the total number of short serial numbers; The duration value of the current usage time; The long serial number is The average weight difference corresponding to the long duration; The long serial number is The duration value corresponding to the long duration of ; The long serial number is The duration value corresponding to the long duration of ; , is the total number of long serial numbers; For the The long difference of real-time security data.
2. The method for evaluating an artificial intelligence model according to claim 1, characterized in that: The sub-steps of performing security testing on the model to be evaluated and generating model testing results are as follows: S21: calling a simulator and receiving a model to be evaluated through the simulator; wherein the simulator is used to simulate an isolated operating environment; S22: Perform virus detection on the model to be evaluated through the simulator and generate a model detection result; if there is no virus signature code in the model to be evaluated, the generated model detection result is safe; if there is at least one virus signature code in the model to be evaluated, the model to be evaluated is deleted, and the generated model detection result is unsafe.
3. The method for evaluating an artificial intelligence model according to claim 2, characterized in that: The simulator is equipped with a pre-trained artificial intelligence model for virus detection, which is used to perform virus detection on the model to be tested and generate model detection results.
4. The method for evaluating an artificial intelligence model according to claim 1, characterized in that: Obtain the virtual machine for executing the evaluation according to the model to be evaluated, and evaluate the model to be evaluated by executing the evaluation virtual machine. The sub-steps for obtaining the evaluation results are as follows: S31: Perform type analysis on the model to be evaluated to determine the model type to which the model to be evaluated belongs; S32: All evaluation virtual machines with the same virtual machine type and model type are selected as preliminary selection devices; S33: Read the number of tasks to be executed of each preliminary selected device, and select the preliminary selected device with the least number of tasks to be executed as the virtual machine for execution and evaluation; S34: The evaluation model to be evaluated is evaluated by executing the evaluation virtual machine to call multiple evaluation data to obtain evaluation results, wherein each evaluation data at least includes: evaluation input data and evaluation output data.
5. The method for evaluating an artificial intelligence model according to claim 4, characterized in that: The evaluation model is evaluated by executing the evaluation virtual machine and calling multiple evaluation data. The sub-steps for obtaining the evaluation results are as follows: S341: Randomly generate an evaluation serial number for each evaluation data, wherein one evaluation data corresponds to one evaluation serial number, and the evaluation serial numbers are increased in order from small to large according to the order in which the evaluation serial numbers are randomly generated; S342: The evaluation data with the smallest evaluation sequence number is used as the current evaluation data, and the evaluation input data of the current evaluation data is input into the model to be evaluated. The model to be evaluated executes the evaluation input data and outputs the current execution result. The current execution result is analyzed using the evaluation output data of the current evaluation data to obtain a data similarity value, and then S343 is executed; S343: judging the evaluation sequence number of the current evaluation data according to the total number of evaluation sequence numbers; if the total number of evaluation sequence numbers is greater than the evaluation sequence number of the current evaluation data, storing the data similarity value, and removing the evaluation sequence number of the current evaluation data, and executing S342; if the total number of evaluation sequence numbers is equal to the evaluation sequence number of the current evaluation data, storing the data similarity value, and executing S344; S344: Calculate all data similarity values to obtain an output accuracy value; S345: judging the output accuracy value by a preset accuracy threshold, and generating an accuracy judgment result; if the output accuracy value is greater than or equal to the accuracy threshold, the generated accuracy judgment result is excellent; if the output accuracy value is less than the accuracy threshold, the generated accuracy judgment result is poor; S346: Generate an evaluation result based on the accuracy judgment result and the output accuracy value.
6. A system for evaluating an artificial intelligence model, characterized in that: At least: Multiple request terminals and AI model evaluation centers; The request end is used to send evaluation requests, receive evaluation results, receive request risk alerts, and receive model risk alerts. Artificial Intelligence Model Evaluation Center: used to execute the method for evaluating artificial intelligence models as described in any one of claims 1-5.
