CN113419951A - Artificial intelligence model optimization method and device, electronic equipment and storage medium - Google Patents

Artificial intelligence model optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113419951A
CN113419951A CN202110694382.2A CN202110694382A CN113419951A CN 113419951 A CN113419951 A CN 113419951A CN 202110694382 A CN202110694382 A CN 202110694382A CN 113419951 A CN113419951 A CN 113419951A
Authority
CN
China
Prior art keywords
data
test
model
network
processing model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110694382.2A
Other languages
Chinese (zh)
Other versions
CN113419951B (en
Inventor
郭宁
俞加伟
尤薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202110694382.2A priority Critical patent/CN113419951B/en
Publication of CN113419951A publication Critical patent/CN113419951A/en
Application granted granted Critical
Publication of CN113419951B publication Critical patent/CN113419951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to an artificial intelligence technology, and discloses an artificial intelligence model optimization method, which comprises the following steps: constructing an isolation network of the data processing model, and constructing a mirror image service of a network component of the data processing model in the isolation network; extracting data characteristics of pre-acquired processing data, and classifying the processing data according to the data characteristics to obtain a test sample; carrying out data sampling on the test sample to obtain test data; testing the mirror image service by using the test data; and expanding the test data corresponding to the error result in the test result, training the mirror image service by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service. In addition, the invention also relates to a block chain technology, and the product portrait and the user portrait can be stored in the nodes of the block chain. The invention also provides an artificial intelligence model optimization device, equipment and a medium. The invention can improve the accuracy of the artificial intelligence model optimization.

Description

Artificial intelligence model optimization method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an artificial intelligence model optimization method, an artificial intelligence model optimization device, electronic equipment and a computer readable storage medium.
Background
With the increasing popularization of the AI application program and the complexity of the technology used by the AI application program, the importance of quality assurance of the application of the artificial intelligence model is more and more prominent, and therefore, the optimization of the intelligent model becomes a key point of more and more attention of people.
Most of the existing intelligent artificial intelligence model optimization modes are forward optimization, namely test data are manufactured in a test environment to test the model through the test data, the intelligent model is optimized according to a test result, and the optimized model is reused for data processing. In the method, the data types in the manufactured test data are few, so that the test scene is limited, the model cannot be optimized with high precision, and the over-fitting condition of the model is difficult to find out due to the fixed test data, so that the tested model is difficult to generalize to actual production data.
Disclosure of Invention
The invention provides an artificial intelligence model optimization method, an artificial intelligence model optimization device and a computer readable storage medium, and mainly aims to solve the problem of low accuracy in model optimization.
In order to achieve the above object, the present invention provides an artificial intelligence model optimization method, which comprises:
carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing a mirror image service of a network component of the data processing model in the isolation network;
acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
performing data sampling on the test sample by using a preset random sampler to obtain test data;
testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user to the test result, and screening out an error result in the test result according to the feedback information;
and expanding the test data corresponding to the error result, performing preset times of iterative training on the mirror image service by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
Optionally, the performing region isolation on the data processing model to obtain an isolation network of the data processing model includes:
acquiring the resource utilization rate of each network component in the data processing model, and determining the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model as an available isolation area;
and limiting the data transmission rate between the available isolation area and the data processing model to be smaller than a preset rate, so as to obtain an isolation network.
Optionally, the service of mirroring the network components that build the data processing model in the isolated network includes:
mirror image parameter copying is carried out on the network components in the data processing model to obtain mirror image parameters;
and constructing the mirror service of the network component in the isolated network by using the mirror parameters.
Optionally, the acquiring processing data of the network component in the data processing model during runtime includes:
acquiring data interface parameters of each network component in the data processing model;
constructing a data aggregation interface according to the data interface parameters;
and capturing processing data of the multiple network components from the data processing model by using the data aggregation interface.
Optionally, the extracting data features of the processing data includes:
performing feature description on the processed data by using convolution and pooling operations to obtain low-dimensional features;
and mapping the low-dimensional features to a preset feature space through full-connection processing, and selectively expressing the low-dimensional features in the feature space by using a preset activation function to obtain data features.
Optionally, the data sampling of the test sample by using a preset random sampler to obtain test data includes:
acquiring the sampling weight of each type of processing data in the test sample and the total sampling number of the processing data;
and randomly sampling the test sample by using a preset random sampler according to the sampling weight and the total sampling number to obtain test data.
Optionally, the expanding the test data corresponding to the error result includes:
acquiring a data expansion rule table;
extracting the data type of the test data corresponding to the error result, and selecting a data expansion rule from the data expansion rule table according to the data type;
and expanding the test data corresponding to the error result according to the data expansion rule to obtain an expanded test sample.
In order to solve the above problem, the present invention further provides an artificial intelligence model optimization apparatus, including:
the mirror image service generation module is used for carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing mirror image service of a network component of the data processing model in the isolation network;
the sample classification module is used for acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
the data sampling module is used for carrying out data sampling on the test sample by utilizing a preset random sampler to obtain test data;
the service testing module is used for testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user on the test result, and screening out an error result in the test result according to the feedback information;
and the model updating module is used for expanding the test data corresponding to the error result, performing iteration training on the mirror image service for a preset number of times by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the artificial intelligence model optimization method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, which stores at least one instruction, where the at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence model optimization method described above.
The embodiment of the invention constructs the mirror image service of the network component of the data processing model in the isolation network by constructing the isolation network of the data processing model, tests and optimizes the mirror image service by utilizing the processing data of the network component in the data processing model during operation, and then replaces the model in the data processing model by utilizing the optimized mirror image service, so as to realize the optimization of the network component by utilizing the online processing data, avoid the test of artificially manufactured test data, increase the types of the test data and improve the accuracy of the test and the optimization. Therefore, the artificial intelligence model optimization method, the artificial intelligence model optimization device, the electronic equipment and the computer readable storage medium can solve the problem of low accuracy in model optimization.
Drawings
FIG. 1 is a schematic flow chart of a method for optimizing an artificial intelligence model according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of acquiring processing data according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of constructing a data aggregation interface according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of an artificial intelligence model optimization apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the artificial intelligence model optimization method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides an artificial intelligence model optimization method. The execution subject of the artificial intelligence model optimization method includes, but is not limited to, at least one of electronic devices, such as a server, a terminal, and the like, which can be configured to execute the method provided by the embodiments of the present application. In other words, the artificial intelligence model optimization method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of an artificial intelligence model optimization method according to an embodiment of the present invention. In this embodiment, the artificial intelligence model optimization method includes:
s1, carrying out regional isolation on the data processing model to obtain an isolation network of the data processing model, and constructing the mirror image service of the network component of the data processing model in the isolation network.
In the embodiment of the present invention, the data processing model may be any artificial intelligence network model for data processing, for example, a network model for supporting face recognition of a user requesting login in a face recognition authentication system; or, in a stock exchange system, a network model in which a user supports stock exchange business, and the like.
In the embodiment of the invention, the isolation network for constructing the data processing model can be realized by carrying out region isolation in the data processing model.
In detail, the isolation network is used to isolate the execution environment of the data processing model.
For example, an isolation region is determined in the data processing model, and a data transmission rate between the isolation region and the data processing model is limited to be smaller than a preset rate, so that data running in the isolation region does not affect the data processing model, and the isolation network is obtained.
In the embodiment of the present invention, the performing region isolation on the data processing model to obtain the isolation network of the data processing model includes:
acquiring the resource utilization rate of each network component in the data processing model, and determining the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model as an available isolation area;
and limiting the data transmission rate between the available isolation area and the data processing model to be smaller than a preset rate, so as to obtain an isolation network.
In detail, the resource utilization rate of each network component in the data processing model can be detected through a computer sentence with a resource utilization rate detection function so as to obtain the computing resource utilization rate of each part in the data processing model, an area with a lower computing resource utilization rate in the data processing model is selected as the available isolation area, and the available isolation area is determined through the computing resource utilization rate, so that the computing resource burden of the whole data processing model after the isolation network is constructed can be reduced.
Specifically, the data transmission rate between the available isolation region and the data processing model may be limited to be smaller than a preset rate, and when the data transmission rate is smaller than the preset rate, data interaction between the available isolation region and the data processing model may be blocked or limited to a certain extent, so that the available isolation region and the data processing model are isolated to obtain the isolation region.
For example, it is defined as: when the data processing model transmits data with the isolation area, the data transmission rate is limited to be 0, so that the data are isolated.
Through limiting the data transmission rate, network components isolated from the data processing model can be constructed, so that the safety of the data processing model is ensured when the model is optimized on line.
In other embodiments of the present invention, the isolation network may be constructed outside the data processing model, so as to avoid modification of the generated network, thereby improving the stability of the data processing model.
Further, in the embodiment of the present invention, a preset mirror image service of a network component is created in the isolated network by a mirror image copying method, where the network component is a network in the data processing model for implementing a service function, for example, a network for performing real-time face recognition, and the network component is a face recognition network.
In an embodiment of the present invention, the mirror service for constructing the network component of the data processing model in the isolated network includes:
mirror image parameter copying is carried out on the network components in the data processing model to obtain mirror image parameters;
and constructing the mirror service of the network component in the isolated network by using the mirror parameters.
In detail, the underlying code of the network component can be captured through a computer sentence (java sentence, python sentence, etc.) with a data capture function, the network component existing in a pmml file form is obtained, and then the obtained network component is utilized to construct a mirror image service of the network component in the isolated network.
Specifically, after the model is trained offline, the model is exported to a pmml model file, and the network component is obtained. And issuing the network component to a data processing model through an issuing system to obtain production service. And simultaneously constructing a mirror service of the same version of network components in the isolation network as in the data processing model.
S2, processing data of the data processing model during the operation of the network component are obtained, data features of the processing data are extracted, and the processing data are classified according to the data features to obtain a test sample.
In the embodiment of the present invention, the processing data is data used by the data processing model in a business execution process.
For example, when a network performing real-time face recognition recognizes a face image, the face image is the processing data; or, when the text recognition network recognizes the text data, the text data is the processing data.
In detail, the processing data can be respectively acquired from a plurality of network components in the data processing model, so that the acquired processing data can cover all the network components, the diversity of the acquired processing data is improved, and the accuracy of subsequent model optimization is further improved.
In the embodiment of the present invention, referring to fig. 2, the acquiring processing data of the data processing model when the network component runs includes:
s21, acquiring data interface parameters of each network component in the data processing model;
s22, constructing a data aggregation interface according to the data interface parameters;
and S23, capturing the processing data of the multiple network components from the data processing model by using the data aggregation interface.
For example, the data processing model is an image recognition network comprising network components 1: face recognition, and network component 2: identifying the certificate; the data interface parameters of the network component 1 and the network component 2 can be obtained, and according to the data interface parameters, the component can be used to capture a data aggregation interface for processing data from the network component 1 and the network component 2, and further capture the processing data (face image) of the network component from the network component 1 of the data processing model and capture the processing data (certificate image) of the network component from the network component 2 of the data processing model by using the data aggregation interface.
In the embodiment of the invention, the data interface parameters can be processed through computer sentences (java sentences, python sentences and the like) with data grabbing functions.
In one embodiment of the present invention, the constructing a data aggregation interface according to the data interface parameters includes:
compiling the data interface parameters into aggregation parameters by using a preset interface creating method;
creating an initial aggregation interface only comprising initialization parameters by using the interface creation method;
and performing parameter assignment on the initial aggregation interface by using the aggregation parameters to obtain the data aggregation interface.
In the embodiment of the present application, the interface creating method includes, but is not limited to, a GraphQL interface creating manner and an SQL interface creating manner, and the interface parameters include: interface address, interface request method, interface request field name and rule, and interface response field name and rule.
According to the data aggregation interface, the data aggregation interface is constructed, the processing data of the plurality of network components in the data processing model are called by the data aggregation interface, the calling of the processing data in the plurality of network components can be realized by the unified interface, and the efficiency of grabbing the processing data from different network components of the data processing model by the data aggregation interface is improved.
In the embodiment of the invention, the pre-trained feature extraction model can be used for extracting the data features of each data in the processed data, and then the processed data is classified according to the data features to obtain the test samples containing multiple categories.
The feature extraction model includes, but is not limited to: VGG-Net model, XGBoost model, etc.
For example, a large number of images are included in the processing data, and the processing data (images) are input to a feature extraction model to perform feature extraction on the processing data (images) by using the feature extraction model, so as to obtain data features of the images in the processing data (images).
In this embodiment, a plurality of different feature extraction models may be used to perform feature extraction on the processing data (image) to obtain a plurality of types of data features of the processing data (image), where the data features include at least one of: image size, contrast, sharpness, noise type and integrity, etc.
In one embodiment of the present invention, the extracting data features of the processing data includes:
performing feature description on the processed data by using convolution and pooling operations to obtain low-dimensional features;
and mapping the low-dimensional features to a preset feature space through full-connection processing, and selectively expressing the low-dimensional features in the feature space by using a preset activation function to obtain data features.
In detail, through operations such as convolution, pooling and the like, low-dimensional description of various features possibly contained in the processed data can be realized, so that the data volume in the processed data is reduced, and the efficiency of feature extraction on the processed data is improved; and mapping the low-dimensional features to the feature space through full-connection processing, so that the low-dimensional features are visually displayed.
In practical application, because the accuracy of the feature extraction model is limited, false features output due to wrong judgment of the model may exist in the low-dimensional features mapped to the feature space, that is, only part of the low-dimensional features of the feature space are real features of the processed data, so that the embodiment of the invention can calculate the low-dimensional features of the feature space by using a preset activation function to obtain the probability value that the low-dimensional features are the real features of the generated data, and selectively output the low-dimensional features according to the probability value to obtain the data features.
For example, the feature space includes a low-dimensional feature 1, a low-dimensional feature 2, and a low-dimensional feature 3, and the low-dimensional feature 1, the low-dimensional feature 2, and the low-dimensional feature 3 are respectively calculated by the activation function, so that the probability value of the real feature of the processed data, which is the low-dimensional feature 1, is 0.8, the probability value of the real feature of the processed data, which is the low-dimensional feature 2, is 0.2, and the probability value of the real feature of the processed data, which is the low-dimensional feature 3, is 0.65; if the probability threshold is set to be 0.7, determining that the low-dimensional features 2 and 3 are false features of the processed data according to the probability value of each low-dimensional feature, ignoring the low-dimensional features 2 and 3, outputting the low-dimensional features 1 as real features of the processed data, and obtaining the data features of the processed data.
Further, after the data features of each data in the processed data are extracted, the processed data can be classified according to any feature or combination of multiple features in the extracted data features, and a test sample is obtained.
For example, the processing data is classified by a single feature, the processing data is classified into a plurality of images, the processing data is classified by the image sizes in the data feature, the image having the image size between (0, a) among the plurality of images is determined as a first class, the image having the image size between (a, b) among the plurality of images is determined as a second class, and the image having the image size between (b, + ∞) among the plurality of images is determined as a third class.
Or classifying the processed data according to multiple features, wherein the processed data are multiple images, classifying the processed data according to the sizes and integrality of the images in the data features, determining that the sizes of the images in the multiple images are smaller than a preset size, the images in the multiple images are complete in a first class, determining that the sizes of the images in the multiple images are smaller than the preset size, the images in the multiple images are incomplete in a second class, determining that the sizes of the images in the multiple images are larger than or equal to the preset size, the images in the multiple images are complete in a third class, and the images in the multiple images are larger than or equal to the preset size and the images in the multiple images are incomplete in a fourth class.
And S3, performing data sampling on the test sample by using a preset random sampler to obtain test data.
In the embodiment of the invention, the random sampler is a data selection tool with a random sampling function, can be used for randomly screening a preset amount of data from a plurality of data, and comprises a Box-Muller sampler, a Monte Carlo sampler and the like.
In the embodiment of the present invention, the sampling the test sample by using a preset random sampler to obtain test data includes:
acquiring the sampling weight of each type of processing data in the test sample and the total sampling number of the processing data;
and randomly sampling the test sample by using a preset random sampler according to the sampling weight and the total sampling number to obtain test data.
In detail, a sampling weight and a total number of samples preset by a user may be obtained, the total number of samples refers to a total number of processed data collected from the test sample, and the sampling weight refers to a proportion of samples taken from different types of processed data in the test sample.
For example, the test sample contains 100 processed data, wherein 50 processed data of the first type, 30 processed data of the second type and 20 processed data of the third type; when the total number of samples is 30, the sampling weight of the first type of processed data is 0.6, the sampling weight of the second type of processed data is 0.3, and the sampling weight of the third type of processed data is 0.1, 18 pieces of processed data are randomly sampled from the first type of processed data by using a random sampler, 9 pieces of processed data are randomly sampled from the second type of processed data, and 2 pieces of processed data are randomly sampled from the third type of processed data.
According to the embodiment of the invention, the preset random sampler is used for sampling the data of the test sample, so that the diversity of the test data can be improved, and the accuracy of model optimization can be improved.
S4, testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of the user to the test result, and screening out an error result in the test result according to the feedback information.
In the embodiment of the invention, the test data can be input into the mirror image service, and the test data is predicted through the mirror image service to obtain the test result.
For example, the test data includes an apple image a and a watermelon image B, the apple image a and the watermelon image B are respectively input to the mirroring service for prediction, and the prediction result output by the mirroring service is obtained as follows: image a is an apple and image B is a dragon fruit.
In the embodiment of the invention, the feedback information is confirmation or correction of the prediction result by the user.
For example, the test data a is input to the mirror image service to obtain the predicted result of the test data a, and the feedback information is used by the user to confirm that the test result is a correct result or confirm that the test result is an incorrect result.
Further, the prediction result is output to a user, and feedback information of the user to the prediction result is acquired: image a is apple, the predicted result is the correct result, and image B is watermelon, the predicted result is the incorrect result.
According to the embodiment of the invention, an error result can be selected from the test results according to the feedback information.
For example, if the prediction result includes prediction result a, prediction result B, prediction result C, and prediction result D, and the feedback information indicates that prediction result a is a correct result, prediction result B is an incorrect result, prediction result C is an incorrect result, and prediction result D is a correct result, an incorrect result is selected from the prediction results: predicted result B and predicted result C.
And S5, expanding the test data corresponding to the error result, performing iteration training on the mirror image service for a preset number of times by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
In the embodiment of the invention, the test samples with wrong prediction results can be expanded by adding noise to the test samples with wrong prediction results in the test results.
In the embodiment of the present invention, referring to fig. 3, the expanding the test data corresponding to the error result includes:
s31, acquiring a data expansion rule table;
s32, extracting the data type of the test data corresponding to the error result, and selecting a data expansion rule from the data expansion rule table according to the data type;
and S33, expanding the test data corresponding to the error result according to the data expansion rule to obtain an expanded test sample.
In detail, the data expansion rule table may be uploaded by a user in advance, and the data expansion rule table includes data types of a plurality of data and data expansion rules usable by data of each data type.
Specifically, the data type of the test data corresponding to the error result can be extracted by using a java statement with a data type extraction function, and the data type is searched in the data expansion rule table according to the extracted data type to obtain a data expansion rule which can be used by the data of the data type, so that the test data corresponding to the error result is expanded according to the data expansion rule.
For example, the test data includes an image a and an image B, where the image a is predicted correctly, and the image B is predicted incorrectly, and then the data types of the image B are extracted as follows: and searching the data expansion rule table according to the data type (image) to obtain the data expansion rule of the image data, wherein the data expansion rule of the image data comprises operations such as contrast stretching, local masking, color conversion and the like, and further, the operations such as contrast stretching, local masking, color conversion and the like can be carried out on the image B to realize the expansion of the image B and obtain a plurality of expanded test samples.
In the embodiment of the invention, the mirror image service can be trained by using the expanded test sample so as to realize the optimization of parameters in the mirror image service.
For example, when the expanded test sample is an image, a standard label of the test sample is obtained, the test sample is subjected to label prediction by using the mirror image service to obtain a prediction label of the test sample, the test label is compared with the standard label to obtain a difference value between the test label and the standard label, parameter optimization calculation is performed by using a preset optimization algorithm according to the difference value to obtain an optimized parameter, current parameters in the mirror image service are assigned by using the optimized parameter to obtain an updated mirror image service, and the test sample is subjected to label prediction again by using the updated mirror image service until the difference value between the test label and the standard label is smaller than a preset difference threshold value to obtain a trained mirror image service.
The embodiment of the invention can replace the network component in the data processing model by using the trained mirror image service so as to realize the optimization of the network component.
The embodiment of the invention constructs the mirror image service of the network component of the data processing model in the isolation network by constructing the isolation network of the data processing model, tests and optimizes the mirror image service by utilizing the processing data of the network component in the data processing model during operation, and then replaces the model in the data processing model by utilizing the optimized mirror image service, so as to realize the optimization of the network component by utilizing the online processing data, avoid the test of artificially manufactured test data, increase the types of the test data and improve the accuracy of the test and the optimization. Therefore, the artificial intelligence model optimization method, the artificial intelligence model optimization device, the electronic equipment and the computer readable storage medium can solve the problem of low accuracy in model optimization.
Fig. 4 is a functional block diagram of an artificial intelligence model optimization apparatus according to an embodiment of the present invention.
The artificial intelligence model optimization apparatus 100 of the present invention can be installed in an electronic device. According to the implemented functions, the artificial intelligence model optimization apparatus 100 may include a mirror image service generation module 101, a sample classification module 102, a data sampling module 103, a service test module 104, and a model update module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the mirror image service generation module 101 is configured to perform regional isolation on a data processing model to obtain an isolation network of the data processing model, and construct a mirror image service of a network component of the data processing model in the isolation network;
the sample classification module 102 is configured to obtain processing data of the data processing model during operation of the network component, extract data features of the processing data, and classify the processing data according to the data features to obtain a test sample;
the data sampling module 103 is configured to perform data sampling on the test sample by using a preset random sampler to obtain test data;
the service testing module 104 is configured to test the mirror image service by using the test data to obtain a test result, obtain feedback information of the user on the test result, and screen out an error result in the test result according to the feedback information;
the model updating module 105 is configured to expand the test data corresponding to the error result, perform iterative training on the mirror image service for a preset number of times by using the expanded test data, and replace the network component of the data processing model by using the trained mirror image service.
In detail, when the modules in the artificial intelligence model optimization device 100 according to the embodiment of the present invention are used, the same technical means as the artificial intelligence model optimization method described in fig. 1 to 3 are used, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device implementing an artificial intelligence model optimization method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an artificial intelligence model optimization program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., executing an artificial intelligence model optimization program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of an artificial intelligence model optimization program, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The artificial intelligence model optimization program stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, can implement:
carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing a mirror image service of a network component of the data processing model in the isolation network;
acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
performing data sampling on the test sample by using a preset random sampler to obtain test data;
testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user to the test result, and screening out an error result in the test result according to the feedback information;
and expanding the test data corresponding to the error result, performing preset times of iterative training on the mirror image service by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing a mirror image service of a network component of the data processing model in the isolation network;
acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
performing data sampling on the test sample by using a preset random sampler to obtain test data;
testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user to the test result, and screening out an error result in the test result according to the feedback information;
and expanding the test data corresponding to the error result, performing preset times of iterative training on the mirror image service by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for optimizing an artificial intelligence model, the method comprising:
carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing a mirror image service of a network component of the data processing model in the isolation network;
acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
performing data sampling on the test sample by using a preset random sampler to obtain test data;
testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user to the test result, and screening out an error result in the test result according to the feedback information;
and expanding the test data corresponding to the error result, performing preset times of iterative training on the mirror image service by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
2. The method for optimizing an artificial intelligence model of claim 1, wherein said isolating the data processing model to obtain an isolated network of the data processing model comprises:
acquiring the resource utilization rate of each network component in the data processing model, and determining the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model as an available isolation area;
and limiting the data transmission rate between the available isolation area and the data processing model to be smaller than a preset rate, so as to obtain an isolation network.
3. The artificial intelligence model optimization method of claim 1, wherein said building a mirroring service of a network component of the data processing model in the isolated network comprises:
mirror image parameter copying is carried out on the network components in the data processing model to obtain mirror image parameters;
and constructing the mirror service of the network component in the isolated network by using the mirror parameters.
4. The artificial intelligence model optimization method of claim 1, wherein said obtaining process data of said network component runtime in said data processing model comprises:
acquiring data interface parameters of each network component in the data processing model;
constructing a data aggregation interface according to the data interface parameters;
and capturing processing data of the multiple network components from the data processing model by using the data aggregation interface.
5. The artificial intelligence model optimization method of claim 1, wherein said extracting data features of said processed data comprises:
performing feature description on the processed data by using convolution and pooling operations to obtain low-dimensional features;
and mapping the low-dimensional features to a preset feature space through full-connection processing, and selectively expressing the low-dimensional features in the feature space by using a preset activation function to obtain data features.
6. The artificial intelligence model optimization method of any one of claims 1 to 5, wherein the data sampling of the test samples by using a preset random sampler to obtain test data comprises:
acquiring the sampling weight of each type of processing data in the test sample and the total sampling number of the processing data;
and randomly sampling the test sample by using a preset random sampler according to the sampling weight and the total sampling number to obtain test data.
7. The method for optimizing artificial intelligence models according to any one of claims 1 to 5, wherein the expanding the test data corresponding to the error result comprises:
acquiring a data expansion rule table;
extracting the data type of the test data corresponding to the error result, and selecting a data expansion rule from the data expansion rule table according to the data type;
and expanding the test data corresponding to the error result according to the data expansion rule to obtain an expanded test sample.
8. An artificial intelligence model optimization apparatus, the apparatus comprising:
the mirror image service generation module is used for carrying out regional isolation on a data processing model to obtain an isolation network of the data processing model, and constructing mirror image service of a network component of the data processing model in the isolation network;
the sample classification module is used for acquiring processing data of the data processing model during the operation of the network component, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample;
the data sampling module is used for carrying out data sampling on the test sample by utilizing a preset random sampler to obtain test data;
the service testing module is used for testing the mirror image service by using the test data to obtain a test result, acquiring feedback information of a user on the test result, and screening out an error result in the test result according to the feedback information;
and the model updating module is used for expanding the test data corresponding to the error result, performing iteration training on the mirror image service for a preset number of times by using the expanded test data, and replacing the network component of the data processing model by using the trained mirror image service.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the artificial intelligence model optimization method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the artificial intelligence model optimization method of any one of claims 1 to 7.
CN202110694382.2A 2021-06-22 2021-06-22 Artificial intelligent model optimization method and device, electronic equipment and storage medium Active CN113419951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110694382.2A CN113419951B (en) 2021-06-22 2021-06-22 Artificial intelligent model optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110694382.2A CN113419951B (en) 2021-06-22 2021-06-22 Artificial intelligent model optimization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113419951A true CN113419951A (en) 2021-09-21
CN113419951B CN113419951B (en) 2024-03-19

Family

ID=77716105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110694382.2A Active CN113419951B (en) 2021-06-22 2021-06-22 Artificial intelligent model optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113419951B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061939A (en) * 2022-06-30 2022-09-16 北京瑞莱智慧科技有限公司 Data set security test method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506587A (en) * 2016-09-23 2017-03-15 中国人民解放军国防科学技术大学 A kind of Docker image download methods based on distributed storage
US20190163589A1 (en) * 2017-11-30 2019-05-30 International Business Machines Corporation Modifying aspects of a storage system associated with data mirroring
CN109857475A (en) * 2018-12-27 2019-06-07 深圳云天励飞技术有限公司 A kind of method and device of frame management
US20200320390A1 (en) * 2019-04-04 2020-10-08 Schlumberger Technology Corporation Cutter/Rock Interaction Modeling
US20210034500A1 (en) * 2018-02-06 2021-02-04 Siemens Aktiengesellschaft Artificial intelligence enabled output space exploration for guided test case generation
US11036560B1 (en) * 2016-12-20 2021-06-15 Amazon Technologies, Inc. Determining isolation types for executing code portions

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506587A (en) * 2016-09-23 2017-03-15 中国人民解放军国防科学技术大学 A kind of Docker image download methods based on distributed storage
US11036560B1 (en) * 2016-12-20 2021-06-15 Amazon Technologies, Inc. Determining isolation types for executing code portions
US20190163589A1 (en) * 2017-11-30 2019-05-30 International Business Machines Corporation Modifying aspects of a storage system associated with data mirroring
US20210034500A1 (en) * 2018-02-06 2021-02-04 Siemens Aktiengesellschaft Artificial intelligence enabled output space exploration for guided test case generation
CN109857475A (en) * 2018-12-27 2019-06-07 深圳云天励飞技术有限公司 A kind of method and device of frame management
US20200320390A1 (en) * 2019-04-04 2020-10-08 Schlumberger Technology Corporation Cutter/Rock Interaction Modeling

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061939A (en) * 2022-06-30 2022-09-16 北京瑞莱智慧科技有限公司 Data set security test method and device and storage medium
CN115061939B (en) * 2022-06-30 2023-08-01 北京瑞莱智慧科技有限公司 Data set security test method, device and storage medium

Also Published As

Publication number Publication date
CN113419951B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN113283446A (en) Method and device for identifying target object in image, electronic equipment and storage medium
CN113378970B (en) Sentence similarity detection method and device, electronic equipment and storage medium
CN113704429A (en) Semi-supervised learning-based intention identification method, device, equipment and medium
CN113706322A (en) Service distribution method, device, equipment and storage medium based on data analysis
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN113268665A (en) Information recommendation method, device and equipment based on random forest and storage medium
CN112528013A (en) Text abstract extraction method and device, electronic equipment and storage medium
CN112486957A (en) Database migration detection method, device, equipment and storage medium
CN113051171A (en) Interface test method, device, equipment and storage medium
CN115471775A (en) Information verification method, device and equipment based on screen recording video and storage medium
CN112579621A (en) Data display method and device, electronic equipment and computer storage medium
CN112269875A (en) Text classification method and device, electronic equipment and storage medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN113435308B (en) Text multi-label classification method, device, equipment and storage medium
CN117155771B (en) Equipment cluster fault tracing method and device based on industrial Internet of things
CN113628043A (en) Complaint validity judgment method, device, equipment and medium based on data classification
CN113419951B (en) Artificial intelligent model optimization method and device, electronic equipment and storage medium
CN112347739A (en) Application rule analysis method and device, electronic equipment and storage medium
CN115082736A (en) Garbage identification and classification method and device, electronic equipment and storage medium
CN115221274A (en) Text emotion classification method and device, electronic equipment and storage medium
CN115146064A (en) Intention recognition model optimization method, device, equipment and storage medium
CN114780688A (en) Text quality inspection method, device and equipment based on rule matching and storage medium
CN114490666A (en) Chart generation method, device and equipment based on data requirements and storage medium
CN111738005A (en) Named entity alignment method and device, electronic equipment and readable storage medium
CN111859985A (en) AI customer service model testing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant