Verification method based on artificial intelligence platform service interface
By preprocessing and model correction of the historical parameters of the artificial intelligence platform service interface, evaluation indicators are obtained, which solves the problem of low interface reliability in the existing technology and improves the stability and standardization of the system.
Patent Information
- Application Number
- CN202310907741.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-07-21
AI Technical Summary
The lack of effective service interface verification strategies in the existing technology results in low reliability of the artificial intelligence platform service interface and affects the stability and reliability of the system.
By obtaining the historical parameters of the interface for preprocessing, the interface verification model is constructed, and the training sample set is used to modify the model to obtain the interface parameters and evaluation indicators at the current moment, thereby verifying the interface's capabilities.
It improves the reliability of the service interface and ensures the stability and standardization of the platform and system.
Smart Images

Figure CN117170991B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of service interface verification, and in particular to a verification method based on an artificial intelligence platform service interface. Background Art
[0002] The AI platform service interface is an interface provided for developers to interact and integrate with the AI platform. These interfaces allow developers to call the functions and services of the AI platform through programming to realize automated and intelligent applications and systems. The AI platform is widely used in the fields of power generation, transmission, and substation.
[0003] In actual use, the quality of the interface affects the reliable and efficient operation of the entire system. However, in the prior art, there is no verification strategy for the service interface, which results in the inability to obtain the capabilities of the service interface in the platform, affecting the reliability of the platform / system.
[0004] The inventors of the present application discovered during the process of implementing the present invention that the above-mentioned solution in the prior art has the defect of being unable to serve interface verification, resulting in low interface reliability. Summary of the invention
[0005] The purpose of an embodiment of the present invention is to provide a verification method based on an artificial intelligence platform service interface, which can reliably verify the capabilities of the service interface.
[0006] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a verification method based on an artificial intelligence platform service interface, comprising:
[0007] Get the historical parameters of the interface;
[0008] Preprocessing the historical parameters to obtain a training sample set;
[0009] Build interface verification model;
[0010] Inputting the training sample set into the interface verification model, obtaining an optimal solution for parameters in the interface verification model, and correcting the interface verification model according to the optimal solution;
[0011] Get the interface parameters within the preset time period at the current moment;
[0012] Inputting the interface parameters into the interface verification model to obtain evaluation indicators;
[0013] The interface is verified according to the evaluation index.
[0014] Optionally, preprocessing the historical parameters to obtain a training sample set includes:
[0015] Dividing the historical parameters into a security parameter set, a performance-related parameter set, and a functional parameter set;
[0016] Performing interpolation processing on the security parameter set, the performance-related parameter set, and the functional parameter set;
[0017] The security parameter set, the performance-related parameter set, and the functional parameter set are filtered.
[0018] Optionally, preprocessing the historical parameters to obtain a training sample set includes:
[0019] Acquire the filtered security parameter set;
[0020] Preprocess the filtered values in the security parameter set according to formula (1),
[0021] , (1)
[0022] in, is the first one in the filtered security parameter set The preprocessed values, is the first one in the filtered security parameter set values, is the security parameter set The threshold value corresponding to the value is is an integer number;
[0023] According to formula (2), the security parameter training sample value is obtained.
[0024] , (2)
[0025] in, is the security parameter training sample value, is the total number of values in the security parameter set.
[0026] Optionally, preprocessing the historical parameters to obtain a training sample set further includes:
[0027] Obtaining the performance-related parameter set after filtering;
[0028] Obtaining a maximum value in the filtered performance-related parameter set;
[0029] Preprocess the values in the performance-related parameter set after filtering according to formula (3),
[0030] , (3)
[0031] in, is the first The preprocessed values, is the first values, is the maximum value in the performance-related parameter set, is an integer number;
[0032] According to formula (4), the training sample values of performance-related parameters are obtained.
[0033] , (4)
[0034] in, training sample values for the performance-related parameters, is the total number of values in the performance-related parameter set.
[0035] Optionally, preprocessing the historical parameters to obtain a training sample set further includes:
[0036] Acquire the functional parameter set after filtering;
[0037] Preprocess the values in the filtered functional parameter set according to formula (5),
[0038] , (5)
[0039] in, is the first parameter in the functional parameter set after filtering. The value after preprocessing, is an integer number;
[0040] According to formula (6), the functional parameter training sample value is obtained.
[0041] , (6)
[0042] in, training sample values for the functional parameters, is the total number of values in the functional parameter set.
[0043] Optionally, inputting the training sample set into the interface verification model, obtaining an optimal solution of a parameter in the interface verification model, and correcting the interface verification model according to the optimal solution includes:
[0044] Obtaining initial weights of the security parameter training sample values, the performance-related parameter training sample values, and the functional parameter training sample values;
[0045] The loss function is calculated according to formula (7):
[0046] , (7)
[0047] in, is the value of the loss function, is the initial weight of the security parameter training sample value, is the initial weight of the performance-related parameter training sample value, is the initial weight of the functional parameter training sample value, and .
[0048] Optionally, inputting the training sample set into the interface verification model, obtaining an optimal solution of a parameter in the interface verification model, and correcting the interface verification model according to the optimal solution further comprises:
[0049] Update the weight of the security parameter training sample value according to formula (8):
[0050] , (8)
[0051] in, The weight of the updated security parameter training sample value;
[0052] The weights of the training sample values of the performance-related parameters are updated according to formula (9):
[0053] , (9)
[0054] in, The weights of the performance-related parameter training sample values after update;
[0055] Return to the step of calculating the loss function according to formula (7).
[0056] Optionally, inputting the training sample set into the interface verification model, obtaining an optimal solution of a parameter in the interface verification model, and correcting the interface verification model according to the optimal solution further comprises:
[0057] Determine whether the current value of the loss function is less than the previous value of the loss function;
[0058] When it is determined that the current value of the loss function is less than the previous value of the loss function, returning to the step of updating the weight of the security parameter training sample value according to formula (8);
[0059] When it is determined that the current value of the loss function is greater than or equal to the previous value of the loss function, the weight of the security parameter training sample value is updated according to formula (10).
[0060] , (10)
[0061] in, The weight of the updated security parameter training sample value;
[0062] Updating the weight of the performance-related parameter training sample value according to formula (9);
[0063] Return to the step of calculating the loss function according to formula (7).
[0064] Optionally, inputting the interface parameters into the interface verification model to obtain evaluation indicators includes:
[0065] Presetting a threshold value for the number of calculations of the loss function;
[0066] Determine whether the number of calculations of the loss function is greater than or equal to the calculation number threshold;
[0067] When it is determined that the number of calculations of the loss function is greater than or equal to the calculation number threshold, outputting the minimum value of the loss function as an evaluation index;
[0068] When it is determined that the number of calculations of the loss function is less than the calculation number threshold, return to the step of calculating the loss function according to formula (7).
[0069] Optionally, verifying the interface according to the evaluation index includes:
[0070] Determine whether the evaluation index is greater than or equal to a first preset value threshold;
[0071] In the case where it is determined that the evaluation index is greater than or equal to the first preset threshold, determining that the interface capability is excellent;
[0072] In the case where it is determined that the evaluation index is less than the first preset threshold, determining whether the evaluation index is greater than or equal to a second preset threshold;
[0073] In the case where it is determined that the evaluation index is greater than or equal to the second preset threshold, determining that the interface capability is qualified;
[0074] When it is determined that the evaluation index is less than the second preset threshold, it is determined that the interface capability is poor.
[0075] Through the above technical scheme, the verification method based on the artificial intelligence platform service interface provided by the present invention obtains the historical parameters of the interface and preprocesses the historical parameters to obtain a training sample set. The interface verification model can be corrected according to the training sample set to obtain a complete interface verification model. Combined with the interface parameters within the current preset time period, the evaluation index of the interface to be verified can be obtained. The interface capability can be verified based on the evaluation index, thereby improving the reliability of the interface and ensuring the stability and standardization of the platform / system.
[0076] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0078] Figure 1 is a flowchart of a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention;
[0079] Figure 2 is a flowchart of preprocessing historical parameters in a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention;
[0080] Figure 3 It is a flowchart of training an interface verification model in a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention;
[0081] Figure 4 It is a flowchart of obtaining evaluation indicators of an interface in a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention;
[0082] Figure 5 It is a flowchart of verifying evaluation indicators in a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention;
[0083] Figure 6 It is a specific division of historical parameters in a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention. DETAILED DESCRIPTION
[0084] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0085] Figure 1 FIG. 1 is a flow chart of a verification method based on an artificial intelligence platform service interface according to an embodiment of the present invention. Figure 1 In, the verification method may include:
[0086] In step S10, historical parameters of the interface are obtained, wherein the historical parameters may include relevant parameters of the interface in a preset time period under a normal state, or standard parameters of the interface in a preset time period under a standard state.
[0087] In step S11, the historical parameters are preprocessed to obtain a training sample set. After the historical parameters are obtained, they are preprocessed, such as denoising to reduce error interference.
[0088] In step S12, an interface verification model is constructed.
[0089] In step S13, the training sample set is input into the interface verification model to obtain the optimal solution of the parameters in the interface verification model, and the interface verification model is corrected according to the optimal solution. After the training sample set is input into the interface verification model, the interface verification model can be trained to obtain the optimal solution of the parameters in the interface verification model, and a complete interface verification model can be obtained.
[0090] In step S14, the interface parameters within the preset time period at the current moment are obtained, wherein the interface parameters are the relevant parameters corresponding to the interface to be diagnosed.
[0091] In step S15, the interface parameters are input into the interface verification model to obtain evaluation indicators. The interface parameters are input into the interface verification model to output an optimal solution, which corresponds to the evaluation indicator.
[0092] In step S16, the interface is verified according to the evaluation index, wherein the interface can be verified according to the specific value of the evaluation index.
[0093] In step S10 to step S16, the historical parameters of the interface under the standard or normal state are first obtained, and then the historical parameters are preprocessed to obtain a training sample set. An interface verification model is constructed, and the training sample set is input into the interface verification model, and it is trained to obtain the optimal model parameters to correct the interface verification model. Finally, the interface parameters of the interface to be verified within a preset time period are obtained, and they are input into the corrected interface verification model, so as to obtain the evaluation index of the interface, and the energy of the interface can be verified or evaluated according to the evaluation index.
[0094] Traditional service interfaces do not have any measurement that can detect or verify their capabilities, and thus cannot judge their capabilities, which can easily affect the reliability of the platform / system. In this embodiment of the present invention, the interface verification model is trained using the interface's standard parameters / historical parameters under normal conditions, so that a standard interface verification model can be obtained. The interface's capabilities can be effectively verified based on the standard interface verification model, thereby ensuring the stability and standardization of the platform / system.
[0095] In this embodiment of the present invention, after obtaining the standard parameters of the interface or the historical parameters under the normal state, it is necessary to preprocess them to ensure the reliability of the training samples. The specific preprocessing steps can be as follows: Figure 2 Specifically, Figure 2 In the verification method, the verification method may further include:
[0096] In step S20, the historical parameters are divided into a security parameter set, a performance-related parameter set, and a functional parameter set. The specific division of the historical parameters can be as follows: Figure 6 As shown, in Figure 6 In the embodiment of the present invention, the security parameters may include sensitive information transmission, whether it has a sensitive information decryption function, etc. The performance-related parameters may include GPU utilization, CPU occupancy, video memory occupancy, memory occupancy, and concurrent performance. The functional parameters may include input, output, and business logic; specifically, the input may include normal input parameters, parameter anomalies, and data anomalies, and the business logic may include restrictions, state transitions, and operation objects. In addition, in this embodiment of the present invention, the historical parameters may also include other parameters, specifically, the other parameters may include design rationality, version compatibility, and interface timeout, etc.
[0097] In step S21, the security parameter set, the performance-related parameter set and the functional parameter set are interpolated. The above parameters can be interpolated to make the training samples smoother. Specifically, the specific steps of the interpolation process are known to those skilled in the art.
[0098] In step S22, the security parameter set, the performance-related parameter set and the functional parameter set are filtered. After the interpolation process is completed, the above parameters can also be filtered to achieve the purpose of denoising and interference removal. Specifically, the filtering method includes but is not limited to Gaussian filtering.
[0099] In step S23, a filtered security parameter set is obtained.
[0100] In step S24, the values in the filtered security parameter set are preprocessed according to formula (1).
[0101] , (1)
[0102] in, is the first in the filtered security parameter set The preprocessed values, is the first in the filtered security parameter set values, The security parameter set The threshold value corresponding to the value is Specifically, by using formula (1), the values in the security parameter set can be set between 0 and 1, that is, normalization processing can be performed to meet the unification of the dimensions of different parameters in the security parameter set.
[0103] In step S25, the security parameter training sample value is obtained according to formula (2):
[0104] , (2)
[0105] in, is the security parameter training sample value, The total number of values in the security parameter set.
[0106] In step S26, a filtered performance-related parameter set is obtained.
[0107] In step S27, the maximum value in the filtered performance-related parameter set is obtained.
[0108] In step S28, the values in the filtered performance-related parameter set are preprocessed according to formula (3).
[0109] , (3)
[0110] in, is the first parameter in the filtered performance related parameter set The preprocessed values, The first parameter in the performance related parameter set values, is the maximum value in the set of performance-related parameters, Specifically, by using formula (3), the values in the performance-related parameter set can be set between 0 and 1, that is, normalization processing can be performed to meet the unification of the dimensions of different parameters in the performance-related parameter set.
[0111] In step S29, the performance-related parameter training sample values are obtained according to formula (4):
[0112] , (4)
[0113] in, is the training sample value of performance related parameters, is the total number of values in the performance-related parameter set.
[0114] In step S30, a filtered functional parameter set is obtained.
[0115] In step S31, the values in the filtered functional parameter set are preprocessed according to formula (5).
[0116] , (5)
[0117] in, is the first parameter in the filtered functional parameter set The value after preprocessing, Specifically, by using formula (5), the values in the functional parameter set can be set between 0 and 1, that is, normalization processing can be performed to meet the unification of the dimensions of different parameters in the functional parameter set.
[0118] In step S32, the functional parameter training sample value is obtained according to formula (6):
[0119] , (6)
[0120] in, is the functional parameter training sample value, is the total number of values in the functional parameter set.
[0121] In step S20 to step S32, the historical parameters are first divided into a security parameter set, a performance-related parameter set and a functional parameter set, and then the above parameters are interpolated and filtered to obtain good training samples. Considering that the dimensions and values of different parameters are also different, formulas (1), (3) and (5) are used to normalize the security parameter set, the performance-related parameter set and the functional parameter set, respectively, so as to obtain the security parameter training sample values, the performance-related parameter training sample values and the functional parameter training sample values. By adopting this preprocessing method, standard training samples can be effectively obtained to improve the accuracy of subsequent training.
[0122] In this embodiment of the present invention, in order to obtain a complete interface verification model, it is also necessary to input the security parameter training sample values, the performance-related parameter training sample values, and the functional parameter training sample values into the interface verification model for training to obtain the optimal solution of the model parameters. The specific training steps can be shown in 3. Specifically, in Figure 3 In the verification method, the verification method may further include:
[0123] In step S40, the initial weights of the security parameter training sample values, the performance-related parameter training sample values and the functional parameter training sample values are obtained, wherein the initial weights of the security parameter training sample values, the performance-related parameter training sample values and the functional parameter training sample values are equally divided into 1 / 3.
[0124] In step S41, the loss function is calculated according to formula (7):
[0125] , (7)
[0126] in, is the value of the loss function, is the initial weight of the security parameter training sample value, is the initial weight of the performance-related parameter training sample value, is the initial weight of the functional parameter training sample value, and .
[0127] In step S42, the weight of the security parameter training sample value is updated according to formula (8):
[0128] , (8)
[0129] in, is the weight of the updated security parameter training sample value. Specifically, considering that the functional parameter training sample value does not change much, its weight is preset to a fixed value of 1 / 3, and the weights of the security parameter training sample value and the performance-related parameter training sample value are adjusted as variables.
[0130] In step S43, the weights of the performance-related parameter training sample values are updated according to formula (9):
[0131] , (9)
[0132] in, is the weight of the updated performance-related parameter training sample value, Specifically, the total weight of the three training sample values is 1, the weight of the functional parameter training sample value is a fixed value of 1 / 3, and then the weight of the performance-related parameter training sample value can be obtained according to the weight of the variable security parameter training sample value.
[0133] In step S44, the process returns to the step of calculating the loss function according to formula (7). After the weights of the security parameter training sample values and the weights of the performance-related parameter training sample values are updated, the loss function needs to be recalculated.
[0134] In step S45, it is determined whether the value of the current loss function is less than the value of the previous loss function. The determination of the continuous iteration of the loss function may also include whether the value of the current loss function is less than the value of the previous loss function for two consecutive times, that is, the minimum value of the loss function needs to be obtained.
[0135] In step S46, when it is determined that the value of the current loss function is less than the value of the previous loss function, the step of updating the weight of the security parameter training sample value according to formula (8) is returned. If the value of the current loss function is less than the value of the previous loss function (or the value of the current loss function is less than the value of the previous loss function twice in a row), it means that the current iteration trend is good. Considering the importance of security, it is necessary to update (improve) the weight of the security parameter training sample value for the next iteration.
[0136] In step S47, when it is determined that the value of the current loss function is greater than or equal to the value of the previous loss function, the weight of the security parameter training sample value is updated according to formula (10):
[0137] , (10)
[0138] in, is the weight of the updated security parameter training sample value. Specifically, if the current loss function value is greater than or equal to the previous loss function value (or the current loss function value is not less than the previous loss function value for two consecutive times), it means that the current iteration trend is poor and the weight of the security parameter training sample value needs to be reduced.
[0139] In step S48, the weights of the performance-related parameter training sample values are updated according to formula (9).
[0140] In step S49, the process returns to the step of calculating the loss function according to formula (7).
[0141] In step S40 to step S49, the loss function is first calculated based on the initial weights of the security parameter training sample values, the performance-related parameter training sample values, and the functional parameter training sample values, and then the weights of the functional parameter training sample values are set to a fixed value, and the weights of the security parameter training sample values and the performance-related parameter training sample values are adjusted to recalculate the loss function. If the value of the current loss function is less than the value of the previous loss function, it means that the current iteration trend is good, and the weights of the security parameter training sample values and the performance-related parameter training sample values are continued to be updated according to formulas (8) and (9), and the iteration continues. If the value of the current loss function is greater than or equal to the value of the previous loss function, it means that the iteration trend is poor, and the weights of the security parameter training sample values and the performance-related parameter training sample values need to be updated according to formulas (10) and (9), and the iteration continues. In this cycle, the minimum value of the loss function is finally obtained, and the weights of the security parameter training sample values and the performance-related parameter training sample values corresponding to the minimum value are the optimal solutions of the model parameters. According to the optimal solutions of the model parameters, the interface verification model can be corrected to obtain a complete interface verification model.
[0142] In this embodiment of the present invention, when the interface needs to be verified, it is necessary to obtain the parameters of the interface within a preset time period and input the parameters into the complete interface verification model to output the evaluation index. The output step of the interface verification model can be as follows: Figure 4 Specifically, Figure 4 In the verification method, the verification method may further include:
[0143] In step S50, a threshold value of the number of calculations of the loss function is preset.
[0144] In step S51, it is determined whether the number of calculations of the loss function is greater than or equal to a calculation number threshold.
[0145] In step S52, when it is determined that the number of calculations of the loss function is greater than or equal to the calculation number threshold, the minimum value of the loss function is output as an evaluation index. If the number of calculations of the loss function is greater than or equal to the calculation number threshold, it means that the preset number of iterations has been completed, and the minimum value of the loss function in the iteration process is obtained as the evaluation index output.
[0146] In step S53, when it is determined that the number of calculations of the loss function is less than the calculation number threshold, the process returns to the step of calculating the loss function according to formula (7). If the number of calculations of the loss function is less than the calculation number threshold, it means that the iteration is not completed and it is necessary to continue the iteration.
[0147] In step S50 to step S53, by presetting a threshold value for the number of calculations of the loss function, the number of iterations of the interface verification model can be limited to obtain evaluation indicators that meet the requirements.
[0148] In this embodiment of the present invention, after obtaining the evaluation index, it is necessary to judge the evaluation index. The specific judging step can be as follows: Figure 5 Specifically, Figure 5 In the verification method, the verification method may further include:
[0149] In step S60, it is determined whether the evaluation index is greater than or equal to a first preset value threshold.
[0150] In step S61, if the evaluation index is greater than or equal to the first preset threshold, the interface capability is determined to be excellent. If the evaluation index is greater than or equal to the first preset threshold, it means that the value of the evaluation index is high, that is, the interface capability score is high and the capability is excellent.
[0151] In step S62, when it is determined that the evaluation index is less than the first preset threshold, it is determined whether the evaluation index is greater than or equal to the second preset threshold. If the evaluation index is less than the first preset threshold, it means that the interface capability may be qualified or unqualified, so it is also necessary to determine whether the evaluation index is greater than or equal to the second preset threshold.
[0152] In step S63, if the evaluation index is greater than or equal to the second preset threshold, the interface capability is determined to be qualified. If the evaluation index is greater than or equal to the second preset threshold, it means that the value of the evaluation index is high, that is, the interface capability score is high and the capability is qualified.
[0153] In step S64, when it is judged that the evaluation index is less than the second preset threshold, the interface capability is judged to be poor. If the evaluation index is less than the second preset threshold, it means that the value of the evaluation index is low, that is, the interface capability score is low and the capability is unqualified / poor.
[0154] In step S60 to step S64, by comparing the evaluation index with the first preset threshold and the second preset threshold respectively, the capability of the interface can be divided into three levels: excellent, qualified and poor, thereby achieving effective verification of the interface capability.
[0155] Through the above technical scheme, the verification method based on the artificial intelligence platform service interface provided by the present invention obtains the historical parameters of the interface and preprocesses the historical parameters to obtain a training sample set. The interface verification model can be corrected according to the training sample set to obtain a complete interface verification model. Combined with the interface parameters within the current preset time period, the evaluation index of the interface to be verified can be obtained. The interface capability can be verified based on the evaluation index, thereby improving the reliability of the interface and ensuring the stability and standardization of the platform / system.
[0156] 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 combining 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.) containing computer-usable program codes.
[0157] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0158] 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.
[0159] 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 1The steps for the functions specified in one or more boxes.
[0160] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0161] The memory may include non-permanent memory 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.
[0162] 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 tape 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.
[0163] 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.
[0164] The above are only embodiments of the present application and are 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 within the scope of the claims of the present application.
Claims
1. A verification method based on an artificial intelligence platform service interface, characterized in that: include: Get the historical parameters of the interface; Preprocessing the historical parameters to obtain a training sample set; Build interface verification model; Inputting the training sample set into the interface verification model, obtaining an optimal solution for parameters in the interface verification model, and correcting the interface verification model according to the optimal solution; Get the interface parameters within the preset time period at the current moment; Inputting the interface parameters into the interface verification model to obtain evaluation indicators; Verifying the interface according to the evaluation index; Preprocessing the historical parameters to obtain a training sample set includes: Dividing the historical parameters into a security parameter set, a performance-related parameter set, and a functional parameter set; Performing interpolation processing on the security parameter set, the performance-related parameter set, and the functional parameter set; Performing filtering processing on the security parameter set, the performance-related parameter set, and the functional parameter set; Acquire the filtered security parameter set; Preprocess the filtered values in the security parameter set according to formula (1), ,(1) in, is the first one in the filtered security parameter set The preprocessed values, is the first one in the filtered security parameter set values, is the security parameter set The threshold value corresponding to the value is is an integer number; According to formula (2), the security parameter training sample value is obtained. ,(2) in, is the security parameter training sample value, is the total number of values in the security parameter set; Obtaining the performance-related parameter set after filtering; Obtaining a maximum value in the filtered performance-related parameter set; Preprocess the values in the performance-related parameter set after filtering according to formula (3), ,(3) in, is the first The preprocessed values, is the first values, is the maximum value in the performance-related parameter set, is an integer number; According to formula (4), the training sample values of performance-related parameters are obtained. ,(4) in, training sample values for the performance-related parameters, is the total number of values in the performance-related parameter set; Acquire the functional parameter set after filtering; Preprocess the values in the filtered functional parameter set according to formula (5), ,(5) in, is the first parameter in the functional parameter set after filtering. The value after preprocessing, is an integer number; According to formula (6), the functional parameter training sample value is obtained. ,(6) in, training sample values for the functional parameters, is the total number of values in the functional parameter set; Inputting the training sample set into the interface verification model, obtaining an optimal solution for a parameter in the interface verification model, and correcting the interface verification model according to the optimal solution includes: Obtaining initial weights of the security parameter training sample values, the performance-related parameter training sample values, and the functional parameter training sample values; The loss function is calculated according to formula (7): ,(7) in, is the value of the loss function, is the initial weight of the security parameter training sample value, is the initial weight of the performance-related parameter training sample value, is the initial weight of the functional parameter training sample value, and ; Update the weight of the security parameter training sample value according to formula (8): ,(8) in, The weight of the updated security parameter training sample value; The weights of the training sample values of the performance-related parameters are updated according to formula (9): ,(9) in, The weights of the performance-related parameter training sample values after update; Return to the step of calculating the loss function according to formula (7); Determine whether the current value of the loss function is less than the previous value of the loss function; When it is determined that the current value of the loss function is less than the previous value of the loss function, returning to the step of updating the weight of the security parameter training sample value according to formula (8); When it is determined that the current value of the loss function is greater than or equal to the previous value of the loss function, the weight of the security parameter training sample value is updated according to formula (10). ,(10) in, The weight of the updated security parameter training sample value; Updating the weight of the performance-related parameter training sample value according to formula (9); Return to the step of calculating the loss function according to formula (7).
2. The verification method according to claim 1, characterized in that: Inputting the interface parameters into the interface verification model to obtain evaluation indicators includes: Presetting a threshold value for the number of calculations of the loss function; Determine whether the number of calculations of the loss function is greater than or equal to the calculation number threshold; When it is determined that the number of calculations of the loss function is greater than or equal to the calculation number threshold, outputting the minimum value of the loss function as an evaluation index; When it is determined that the number of calculations of the loss function is less than the calculation number threshold, return to the step of calculating the loss function according to formula (7).
3. The verification method according to claim 2, characterized in that: Verifying the interface according to the evaluation index includes: Determining whether the evaluation index is greater than or equal to a first preset threshold; In the case where it is determined that the evaluation index is greater than or equal to the first preset threshold, determining that the interface capability is excellent; In the case where it is determined that the evaluation index is less than the first preset threshold, determining whether the evaluation index is greater than or equal to a second preset threshold; In the case where it is determined that the evaluation index is greater than or equal to the second preset threshold, determining that the interface capability is qualified; When it is determined that the evaluation index is less than the second preset threshold, it is determined that the interface capability is poor.
