CN113419951B - Artificial intelligent model optimization method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113419951B
CN113419951B CN202110694382.2A CN202110694382A CN113419951B CN 113419951 B CN113419951 B CN 113419951B CN 202110694382 A CN202110694382 A CN 202110694382A CN 113419951 B CN113419951 B CN 113419951B
Authority
CN
China
Prior art keywords
data
test
model
processing model
network component
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.)
Active
Application number
CN202110694382.2A
Other languages
Chinese (zh)
Other versions
CN113419951A (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

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 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 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; sampling data of the test sample to obtain test data; testing the mirror image service by using the test data; expanding 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 present invention relates to blockchain technology, and product portraits and user portraits can be stored at nodes of a blockchain. The invention also provides an artificial intelligent model optimizing device, equipment and medium. The invention can improve the accuracy of artificial intelligent model optimization.

Description

Artificial intelligent model optimization method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to an artificial intelligence model optimization method, an apparatus, an electronic device, and a computer readable storage medium.
Background
With the increasing popularity of AI applications and the complexity of the technology used by the AI applications themselves, the importance of quality assurance of artificial intelligence model applications is more and more prominent, and therefore, optimization of intelligent models is becoming an important focus of increasing attention.
The existing intelligent artificial intelligent model optimizing mode is mostly forward optimizing, namely test data are manufactured in a test environment, the model is tested by the test data, the intelligent model is optimized according to a test result, and then the optimized model is utilized for data processing. In the method, the number of data types in the manufactured test data is small, so that the test scene is limited, the high-precision optimization of the model is insufficient, the fixed test data is difficult to find the condition of the model overfitting, and the tested model is difficult to generalize to actual production data.
Disclosure of Invention
The invention provides an artificial intelligent model optimization method, an artificial intelligent model optimization device and a computer readable storage medium, and mainly aims to solve the problem of low accuracy in optimizing models.
In order to achieve the above object, the present invention provides an artificial intelligence model optimization method, comprising:
performing region 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;
acquiring processing data of the network component in the data processing model during operation, extracting data characteristics of the 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 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 on the test result, and screening out an error result in the test result according to the feedback information;
expanding the test data corresponding to the error result, performing iterative training for the mirror image service for preset times 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 that the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model is 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 to obtain an isolation network.
Optionally, the mirroring service of the network component constructing the data processing model in the isolated network includes:
mirror image parameter copying is carried out on the network component 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 the processing data of the network component in the data processing model during the operation 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 grabbing processing data of the multi-network component from the data processing model by utilizing the data aggregation interface.
Optionally, the extracting the data feature of the processing data includes:
Performing feature description on the processed data by using convolution and pooling operations to obtain low-dimensional features;
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 utilizing a preset activation function to obtain data features.
Optionally, the data sampling is performed on the test sample by using a preset random sampler to obtain test data, including:
acquiring the sampling weight of each type of processing data in the test sample and the total number of samples 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 problems, the present invention also provides an artificial intelligence model optimizing apparatus, the apparatus comprising:
the mirror image service generation module is used for carrying out regional isolation on the 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 network component in the data processing model during operation, 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 utilizing the testing data to obtain a testing result, acquiring feedback information of a user on the testing result, and screening out an error result in the testing result according to the feedback information;
and the model updating module is used for expanding the test data corresponding to the error result, carrying out iterative training on the mirror image service for preset times by utilizing the expanded test data, and replacing the network component of the data processing model by utilizing the trained mirror image service.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one instruction; and
And the processor executes the instructions stored in the memory to realize the artificial intelligent model optimization method.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one instruction that is executed by a processor in an electronic device to implement the artificial intelligence model optimization method described above.
According to the embodiment of the invention, the image service of the network component of the data processing model is built in the isolated network by building the isolated network of the data processing model, the image service is tested and optimized by utilizing the processing data of the network component in the data processing model when in operation, and the model in the data processing model is replaced by utilizing the optimized image service, so that the network component is optimized by utilizing the online processing data, the artificial manufacturing of test data is avoided, the types of the test data are increased, and the accuracy of the test and the optimization is improved. Therefore, the artificial intelligent model optimization method, the device, the electronic equipment and the computer readable storage medium can solve the problem of lower accuracy in optimizing the model.
Drawings
FIG. 1 is a flow chart of an artificial intelligence model optimization method according to an embodiment of the present invention;
FIG. 2 is a flow chart of acquiring processing data according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart 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 optimizing 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 achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of 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 a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the 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 service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a schematic flow chart of an artificial intelligence model optimization method according to an embodiment of the invention is shown. In this embodiment, the artificial intelligence model optimization method includes:
s1, 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.
In the embodiment of the invention, the data processing model may be any artificial intelligent network model for data processing, for example, a network model for supporting face recognition of a user who requests login in a face recognition identity verification system; alternatively, in a securities trading system, a user supports a network model of securities trading business, etc.
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 operating environment of the data processing model.
For example, an isolation area is determined in the data processing model, and the data transmission rate between the isolation area and the data processing model is limited to be smaller than a preset rate, so that the data running in the isolation area does not influence 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 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 that the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model is 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 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 that the computing resource utilization rate of each part in the data processing model is obtained, a region with lower computing resource utilization rate in the data processing model is selected as the available isolation region, and the available isolation region 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 is reduced.
Specifically, the data transmission rate between the available isolation area and the data processing model can be limited to be smaller than a preset rate, and when the data transmission rate is smaller than the preset rate, the data interaction between the available isolation area and the data processing model can be blocked or limited to a certain extent, so that the available isolation area and the data processing model can be isolated, and the isolation area is obtained.
For example, it is defined that: when the data processing model and the isolation area transmit data, the data transmission rate is limited to 0 so as to isolate the data processing model and the isolation area.
By limiting the data transmission rate, a network component isolated from the data processing model can be constructed so as to ensure the safety of the data processing model when the model is optimized on line.
In other embodiments of the present invention, modification of the generation network may be avoided by constructing the isolation network outside the data processing model, so as to improve stability of the data processing model.
Further, in the embodiment of the present invention, a mirror image service of a preset network component may be created in the isolated network by using a mirror image replication method, where the network component is a network for implementing a service function in the data processing model, 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 mirroring service for constructing a network component of the data processing model in the isolation network includes:
mirror image parameter copying is carried out on the network component 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 may be grabbed by a computer sentence (java sentence, python sentence, etc.) having a data grabbing function, to obtain a network component in the form of pmml file, and then the obtained network component is used to construct a mirror service of the network component in the isolated network.
Specifically, after offline training, the model is exported as pmml model file, and the network component is obtained. And publishing the network component to a data processing model through a publishing system to obtain production service. And simultaneously constructing mirror image services of network components with the same version as those in the data processing model in the isolation network.
S2, acquiring processing data of the network component in the data processing model during operation, extracting data characteristics of the processing data, and classifying the processing data according to the data characteristics to obtain a test sample.
In the embodiment of the invention, the processing data is the data used by the data processing model in the process of executing the service.
For example, when the network for carrying out real-time face recognition carries out face image recognition, 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 may be acquired from a plurality of network components in the data processing model, respectively, so that the acquired processing data may cover all network components, thereby improving diversity of the acquired processing data and further improving accuracy of subsequent optimization of the model.
In an embodiment of the present invention, referring to fig. 2, the obtaining the processing data of the network component in the data processing model during operation 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;
s23, capturing processing data of the multi-network component from the data processing model by utilizing the data aggregation interface.
For example, the data processing model is an image recognition network comprising the network component 1: face recognition, and network component 2: identification of credentials; the data interface parameters of the network component 1 and the network component 2 can be obtained and according to the data interface parameter components a data aggregation interface can be used for capturing the processing data from the network component 1 and the network component 2, so that the processing data (face image) of the network component can be captured from the network component 1 of the data processing model and the processing data (certificate image) of the network component can be captured from the network component 2 of the data processing model by means of 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 a data grabbing function.
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 creation method;
creating an initial aggregation interface only comprising initialization parameters by using the interface creation method;
and carrying out parameter assignment on the initial aggregation interface by utilizing the aggregation parameters to obtain the data aggregation interface.
In this embodiment of the present application, the method for creating an interface includes, but is not limited to, a GraphQL interface creation manner and an SQL interface creation manner, where the interface parameters include: interface address, interface request method, interface request field name and rule, interface response field name and rule, etc.
According to the embodiment of the application, the data aggregation interface is constructed, the data aggregation interface is utilized to call the processing data of the plurality of network components in the data processing model, the unified interface can be utilized to call the processing data of the plurality of network components, and the efficiency of capturing the processing data from different network components of the data processing model by utilizing the data aggregation interface is improved.
In the embodiment of the invention, the data characteristics of each data in the processed data can be extracted by utilizing a pre-trained characteristic extraction model, and the processed data is classified according to the data characteristics, so that a test sample containing various categories is obtained.
The feature extraction model includes, but is not limited to: VGG-Net model, XGboost model, etc.
For example, the processing data includes a large number of images, 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, feature extraction may be performed on the processed data (image) by using a plurality of different feature extraction models to obtain a plurality of types of data features of the processed data (image), where the data features include at least one of the following: image size, contrast, sharpness, noise type, and integrity, etc.
In one embodiment of the present invention, the extracting the 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;
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 utilizing a preset activation function to obtain data features.
In detail, through operations such as convolution and pooling, the description of various features possibly contained in the processed data in a low dimension 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 visual display of the low-dimensional features is realized.
In practical application, because the accuracy of the feature extraction model is limited, false features which are output due to model error judgment may exist in the low-dimensional features mapped to the feature space, namely, only part of the low-dimensional features in the feature space are real features of the processed data.
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 calculated by the activation function respectively to obtain a probability value of 0.8 for the low-dimensional feature 1 as the real feature of the processing data, a probability value of 0.2 for the low-dimensional feature 2 as the real feature of the processing data and a probability value of 0.65 for the low-dimensional feature 3 as the real feature of the processing data; if the probability threshold is set to be 0.7, determining that the low-dimensional feature 2 and the low-dimensional feature 3 are false features of the processed data according to the probability value of each low-dimensional feature, ignoring the low-dimensional feature 2 and the low-dimensional feature 3, outputting the low-dimensional feature 1 by taking the low-dimensional feature 1 as the real feature of the processed data, and obtaining the data feature of the processed data.
Further, after extracting the data feature of each data in the processed data, the processed data may be classified according to any one or a combination of a plurality of the extracted data features, to obtain a test sample.
For example, the processing data is classified according to a single feature, the processing data is a plurality of images, the processing data is classified according to the image size in the data feature, the images with the image sizes between (0, a) in the plurality of images are determined to be a first type, the images with the image sizes between (a, b) in the plurality of images are determined to be a second type, and the images with the image sizes between (b, + & lt ] in the plurality of images are determined to be a third type.
Or classifying the processing data according to multiple features, wherein the processing data is a plurality of images, classifying the processing data according to the image size and the completeness in the data features, determining that the image size in the plurality of images is smaller than a preset size, the image is complete as a first class, determining that the image size in the plurality of images is smaller than the preset size, the image is incomplete as a second class, determining that the image size in the plurality of images is larger than or equal to the preset size, the image is complete as a third class, and determining that the image size in the plurality of images is larger than or equal to the preset size, and the image is incomplete as 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 and can be used for randomly screening out preset data from a plurality of data, and the random sampler comprises a Box-Muller sampler, a Monte Carlo sampler and the like.
In the embodiment of the present invention, 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 number of samples 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 sampling total number preset by a user may be acquired, wherein the sampling total number refers to the total number of collected processed data from the test sample, and the sampling weight refers to the proportion of samples from different types of processed data in the test sample.
For example, the test sample contains 100 pieces of processing data, wherein 50 pieces of processing data of a first type, 30 pieces of processing data of a second type and 20 pieces of processing data of a third type; when the total sampling number is 30, the sampling weight of the first type of processing data is 0.6, the sampling weight of the second type of processing data is 0.3, and the sampling weight of the third type of processing data is 0.1, then 18 pieces of processing data are randomly sampled from the first type of processing data by using a random sampler, 9 pieces of processing data are randomly sampled from the second type of processing data, and 2 pieces of processing data are randomly sampled from the third type of processing data.
According to the embodiment of the invention, the preset random sampler is utilized to sample 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 a user on 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 by the mirror image service to obtain a 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 into the mirror image service for prediction, and the prediction result output by the mirror image service is obtained as follows: image a is apple and image B is dragon fruit.
In the embodiment of the invention, the feedback information is the confirmation or correction of the prediction result by the user.
For example, the test data a is input to the mirror service, and a predicted result of the test data a is obtained, and then the feedback information confirms that the test result is a correct result or confirms that the test result is an incorrect result for the user.
Further, the prediction result is output to a user, and feedback information of the user on the prediction result is obtained: the image A is apple, the predicted result is correct, and the image B is watermelon, the predicted result is incorrect.
According to the embodiment of the invention, the error result can be selected from the test results according to the feedback information.
For example, if the predicted result includes a predicted result a, a predicted result B, a predicted result C, and a predicted result D, and the feedback information is that the predicted result a is a correct result, the predicted result B is an incorrect result, the predicted result C is an incorrect result, and the predicted result D is a correct result, the incorrect result is selected from the predicted results: predicted outcome B and predicted outcome C.
And S5, expanding the test data corresponding to the error result, performing iterative training for the mirror image service for preset 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 sample with the wrong predicted result can be expanded by adding the noise to the test sample with the wrong predicted result in the test result.
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 in advance by a user, and the data expansion rule table includes data types of a plurality of data and data expansion rules usable by the data of each data type.
Specifically, a java sentence with a data type extraction function can be used for extracting the data type of the test data corresponding to the error result, and searching is carried out 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, and further 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 prediction result of the image a is correct and the prediction result of the image B is incorrect, and the data type of the image B is extracted as follows: the image is searched in the data expansion rule table according to the data type (image), and the data expansion rule of the image data comprises operations such as contrast stretching, local covering, color conversion and the like, so that the operations such as contrast stretching, local covering, color conversion and the like can be further carried out on the image B, expansion of the image B is realized, and a plurality of expanded test samples are obtained.
In the embodiment of the invention, the image service can be trained by using the expanded test sample so as to realize the optimization of parameters in the image service.
For example, when the expanded test sample is an image, a standard label of the test sample is obtained, label prediction is performed on the test sample by using the mirror image service to obtain a predicted 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, a parameter optimization calculation is performed by using a preset optimization algorithm according to the difference value to obtain an optimization parameter, the optimization parameter is used for assigning a value to a current parameter in the mirror image service to obtain an updated mirror image service, and label prediction is performed on the test sample 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 the trained mirror image service.
The embodiment of the invention can replace the network component in the data processing model by using the trained mirror service so as to realize the optimization of the network component.
According to the embodiment of the invention, the image service of the network component of the data processing model is built in the isolated network by building the isolated network of the data processing model, the image service is tested and optimized by utilizing the processing data of the network component in the data processing model when in operation, and the model in the data processing model is replaced by utilizing the optimized image service, so that the network component is optimized by utilizing the online processing data, the artificial manufacturing of test data is avoided, the types of the test data are increased, and the accuracy of the test and the optimization is improved. Therefore, the artificial intelligent model optimization method, the device, the electronic equipment and the computer readable storage medium can solve the problem of lower accuracy in optimizing the model.
FIG. 4 is a functional block diagram of an artificial intelligence model optimizing apparatus according to an embodiment of the present invention.
The artificial intelligence model optimizing apparatus 100 of the present invention may be installed in an electronic device. Depending on the functions implemented, 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 invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the mirror image service generating module 101 is configured to perform region 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 network component in the data processing model during operation, 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 sample data of the test sample by using a preset random sampler to obtain test data;
the service test module 104 is configured to test the mirror image service by using the test data to obtain a test result, obtain feedback information of a 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 for the mirror 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 service.
In detail, each module in the artificial intelligence model optimizing apparatus 100 in the embodiment of the present invention adopts the same technical means as the artificial intelligence model optimizing method described in fig. 1 to 3, and can produce the same technical effects, which are not described herein.
Fig. 5 is a schematic structural diagram of an electronic device for implementing an optimization method of an artificial intelligence model 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.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules (e.g., performs artificial intelligence model optimization programs, etc.) stored in the memory 11, and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or 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 for storing application software installed in an electronic device and various types of data, such as codes of an artificial intelligence model optimization program, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including 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.), 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), or alternatively 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 5 shows only an electronic device with components, it being 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 may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source 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 implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
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, may implement:
Performing region 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;
acquiring processing data of the network component in the data processing model during operation, extracting data characteristics of the 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 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 on the test result, and screening out an error result in the test result according to the feedback information;
expanding the test data corresponding to the error result, performing iterative training for the mirror image service for preset times 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 above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a 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, can implement:
performing region 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;
acquiring processing data of the network component in the data processing model during operation, extracting data characteristics of the 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 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 on the test result, and screening out an error result in the test result according to the feedback information;
expanding the test data corresponding to the error result, performing iterative training for the mirror image service for preset 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 several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
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 characteristics 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 blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. A method for optimizing an artificial intelligence model, the method comprising:
performing region 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;
acquiring processing data of the network component in the data processing model during operation, extracting data characteristics of the 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 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 on the test result, and screening out an error result in the test result according to the feedback information;
expanding the test data corresponding to the error result, performing iterative training for the mirror image service for preset times by using the expanded test data, and replacing a network component of the data processing model by using the trained mirror image service;
the method for carrying out regional isolation on the data processing model to obtain an isolation network of the data processing model comprises the following steps: acquiring the resource utilization rate of each network component in the data processing model, and determining that the running space of the network component with the resource utilization rate smaller than the preset utilization rate in the data processing model is an available isolation area; limiting the data transmission rate between the available isolation area and the data processing model to be smaller than a preset rate to obtain an isolation network;
the mirroring service of the network component that builds the data processing model in the quarantine network includes: mirror image parameter copying is carried out on the network component in the data processing model to obtain mirror image parameters; constructing a mirror service of the network component in the isolated network by utilizing the mirror parameters;
The expanding the test data corresponding to the error result comprises the following steps: 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.
2. The artificial intelligence model optimization method of claim 1, wherein the obtaining process data of the network component runtime in the 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 grabbing processing data of the multi-network component from the data processing model by utilizing the data aggregation interface.
3. The artificial intelligence model optimization method of claim 1, wherein the extracting the data features of the process data comprises:
performing feature description on the processed data by using convolution and pooling operations to obtain low-dimensional features;
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 utilizing a preset activation function to obtain data features.
4. The artificial intelligence model optimizing method according to any one of claims 1 to 3, wherein the data sampling the test sample 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 number of samples 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.
5. An artificial intelligence model optimizing apparatus for implementing the artificial intelligence model optimizing method according to any one of claims 1 to 4, characterized in that the apparatus comprises:
the mirror image service generation module is used for carrying out regional isolation on the 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 network component in the data processing model during operation, 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 utilizing the testing data to obtain a testing result, acquiring feedback information of a user on the testing result, and screening out an error result in the testing result according to the feedback information;
and the model updating module is used for expanding the test data corresponding to the error result, carrying out iterative training on the mirror image service for preset times by utilizing the expanded test data, and replacing the network component of the data processing model by utilizing the trained mirror image service.
6. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to implement the artificial intelligence model optimization method of any one of claims 1 to 4.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the artificial intelligence model optimization method according to any one of claims 1 to 4.
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 CN113419951A (en) 2021-09-21
CN113419951B true 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)

Families Citing this family (1)

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

Citations (3)

* 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
CN109857475A (en) * 2018-12-27 2019-06-07 深圳云天励飞技术有限公司 A kind of method and device of frame management
US11036560B1 (en) * 2016-12-20 2021-06-15 Amazon Technologies, Inc. Determining isolation types for executing code portions

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10664368B2 (en) * 2017-11-30 2020-05-26 International Business Machines Corporation Modifying aspects of a storage system associated with data mirroring
US11630758B2 (en) * 2018-02-06 2023-04-18 Siemens Aktiengesellschaft Artificial intelligence enabled output space exploration for guided test case generation
US11675325B2 (en) * 2019-04-04 2023-06-13 Schlumberger Technology Corporation Cutter/rock interaction modeling

Patent Citations (3)

* 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
CN109857475A (en) * 2018-12-27 2019-06-07 深圳云天励飞技术有限公司 A kind of method and device of frame management

Also Published As

Publication number Publication date
CN113419951A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
WO2022247005A1 (en) Method and apparatus for identifying target object in image, electronic device and storage medium
WO2022105179A1 (en) Biological feature image recognition method and apparatus, and electronic device and readable storage medium
CN113378970B (en) Sentence similarity detection method and device, electronic equipment and storage medium
CN112988963B (en) User intention prediction method, device, equipment and medium based on multi-flow nodes
CN113627530B (en) Similar problem text generation method, device, equipment and medium
CN113806434B (en) Big data processing method, device, equipment and medium
CN113360654B (en) Text classification method, apparatus, electronic device and readable storage medium
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN116821373A (en) Map-based prompt recommendation method, device, equipment and medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN113419951B (en) Artificial intelligent model optimization method and device, electronic equipment and storage medium
CN114840684A (en) Map construction method, device and equipment based on medical entity and storage medium
CN117155771B (en) Equipment cluster fault tracing method and device based on industrial Internet of things
CN113806492A (en) Record generation method, device and equipment based on semantic recognition and storage medium
CN113628043A (en) Complaint validity judgment method, device, equipment and medium based on data classification
CN113591881A (en) Intention recognition method and device based on model fusion, electronic equipment and medium
CN116741358A (en) Inquiry registration recommendation method, inquiry registration recommendation device, inquiry registration recommendation equipment and storage medium
CN116521867A (en) Text clustering method and device, electronic equipment and storage medium
CN116468025A (en) Electronic medical record structuring method and device, electronic equipment and storage medium
CN115082736A (en) Garbage identification and classification method and device, electronic equipment and storage medium
CN111859985B (en) AI customer service model test method and device, electronic equipment and storage medium
CN113515591B (en) Text defect information identification method and device, electronic equipment and storage medium
CN114780688A (en) Text quality inspection method, device and equipment based on rule matching and storage medium
CN114513355A (en) Malicious domain name detection method, device, equipment and storage medium
CN113486238A (en) Information pushing method, device and equipment based on user portrait 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