CN113553270A - Target object determination method and device - Google Patents
Target object determination method and device Download PDFInfo
- Publication number
- CN113553270A CN113553270A CN202110860013.6A CN202110860013A CN113553270A CN 113553270 A CN113553270 A CN 113553270A CN 202110860013 A CN202110860013 A CN 202110860013A CN 113553270 A CN113553270 A CN 113553270A
- Authority
- CN
- China
- Prior art keywords
- target
- initial object
- initial
- target position
- adaptive value
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the specification provides a target object determination method and a target object determination device, wherein the method comprises the steps of generating an initial object set, and determining the current position and the current speed of each initial object in the initial object set; processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object; determining a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determining a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position; and under the condition of meeting a preset calculation rule, determining a target object based on the group target position of the initial object set, and subsequently training the target object to obtain a target neural network model so as to solve the problem of system verification based on the model.
Description
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a target object determining method. One or more embodiments of the present specification also relate to a target object determination apparatus, a computing device, and a computer-readable storage medium.
Background
The guarantee of capital safety and the test efficiency improvement in the research and development process are always the key points of an internet test technology team. The method not only ensures the fund security in the network system, but also improves the test efficiency in the research and development process in the process of increasing the service scale and complexity. The problems related to the verification (such as the verification of offline full link cases, the verification of online gray scale flow and the verification of online data) are always pain points of quality assurance.
Based on this, it is urgently needed to provide a method which can solve the verification problems such as offline full link use case verification, online gray scale flow verification, online data verification and the like.
Disclosure of Invention
In view of this, the present specification provides a target object determination method. One or more embodiments of the present specification also relate to a target object determining apparatus, a computing device, and a computer-readable storage medium to address technical deficiencies in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a target object determination method including:
generating an initial object set, and determining the current position and the current speed of each initial object in the initial object set;
processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object;
determining a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determining a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position;
and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set.
According to a second aspect of embodiments herein, there is provided a target object determination apparatus including:
an initial object generation module configured to generate an initial object set and determine a current position and a current velocity of each initial object in the initial object set;
an adaptive value determination module configured to process each initial object based on historical data to obtain a current adaptive value of a current position of each initial object;
a target position determining module configured to determine a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determine a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position;
a target object determination module configured to determine a target object based on the group target positions of the initial object set if a preset calculation rule is satisfied.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions, which when executed by the processor, implement the steps of the above-described target object determination method.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described target object determination method.
One embodiment of the present specification implements a target object determination method and apparatus, where the target object determination method includes generating an initial object set, and determining a current position and a current speed of each initial object in the initial object set; processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object; determining a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determining a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position; and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set. Specifically, the target object determination method comprises the steps of carrying out iterative computation on initial objects in an initial object set based on historical data to determine a better target object, and then training and applying the target object to realize an intelligent verification technology for carrying out offline full-link case verification, online gray scale flow verification and online data verification on a system, so that the verification problems of offline full-link case verification, online gray scale flow verification, online data verification and the like are solved, errors of the system on users are reduced, and user experience is improved.
Drawings
Fig. 1 is a schematic architecture diagram of a target object determination method according to an embodiment of the present specification;
FIG. 2 is a flow chart of a target object determination method provided in one embodiment of the present description;
fig. 3 is a schematic structural diagram of an initial object in a target object determination method according to an embodiment of the present specification;
FIG. 4 is a schematic diagram illustrating a calculation of a current adaptive value of a current position of an initial object in a target object determination method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating an update of a current velocity and a current position of an initial object in a target object determination method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a target neural network model in a target object determination method according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating a training of a target neural network model in a target object determination method according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating a convergence trend of a loss function of a target neural network model in a target object determination method according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a specific processing procedure of a target neural network model in a target object determination method according to an embodiment of the present disclosure;
FIG. 10 is a diagram illustrating recall and accuracy for a particular use of a target object determination method according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a target object determination apparatus according to an embodiment of the present specification;
fig. 12 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
Test Oracle problem: this is a problem describing the verification of pain points. That is, for a test process (e.g. full link case), it is necessary to know what the output of the program is in advance, and then compare the actual output of the program with the predicted output to be used as the verification of the test process.
Full link use case: a plurality of systems need to be passed through by one complete service, a plurality of systems are connected in series into a link through calling, a test student takes the link as a dimension, and the test of the systems on the link is called full link test.
On-line data collation: in an online database system, there are often many dependencies of data between different tables. For example, the field f _1 in the a table is equal to the field f _2 in the B table, or the field f _1 in the a table plus the field f _2 in the B table is equal to the field f _3 in the C table. In order to ensure the correctness between data, the data of the fields needs to be continuously checked.
Particle swarm optimization algorithm: the particle swarm optimization algorithm is a random search algorithm based on swarm cooperation and developed by simulating foraging behavior of bird swarms. It is generally considered to be one of the cluster intelligence (SI).
A neural network: a mathematical model in an artificial intelligence algorithm well simulates the interaction of a biological nervous system with real-world objects.
Neural network topology: the topological structure of the neural network comprises the number of network layers, the number of neurons in each layer and the mode of interconnection among the neurons.
RPC: remote Procedure Call.
SLS: simple Log Service, Simple Log Service.
DRC: data Replication Center, Data Replication Center.
The guarantee of capital safety and the test and efficiency improvement in the research and development process are always the key points of the internet quality and technology team. The method not only ensures the capital safety of the online system and realizes the goal of zero capital loss, but also improves the test efficiency of the research and development process in the process of increasing service scale and complexity. Among other things, problems associated with verification, such as: the verification of offline full link use cases, the verification of online gray scale flow and the verification rule of online data are always the important factors to be invested in quality classmates.
Based on the service background, the embodiment of the specification provides an intelligent verification technical scheme for optimizing a neural network topological structure based on a particle swarm optimization. By the technical scheme, an intelligent verification function without human participation can be realized, and verification problems of offline full link use cases, online gray scale flow, online data verification and the like are solved. However, in the embodiments of the present description, the neural network topology is not limited to be optimized by a particle swarm algorithm, and in practical applications, a genetic algorithm, an ant colony algorithm, and the like may also be used to optimize the neural network topology. For convenience of understanding, in the embodiments of the present specification, the target object determination method is described in detail by taking only an example of implementing optimization of a neural network topology by a particle swarm algorithm.
Specifically, in the present specification, a target object determining method is provided, and the present specification relates to a target object determining apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a target object determination method according to an embodiment of the present disclosure.
In fig. 1, an architecture diagram of a target object determination method provided in an embodiment of the present disclosure includes three parts, a first part is a defined field range, a second part is neural network learning service logic, and a third part is use-case verification and service check.
Specifically, the range of the delineating field of the first part can be understood as follows: and (3) performing static code analysis on the test system, obtaining control flow and data flow, determining the blood relationship between codes and fields, and defining the field range. For example, if the test system is a fund transfer system and the field to be verified is amount, then static code analysis can be performed on the test system, and after a control flow and a data flow are obtained, the fields "transfer date", "account amount", etc. in the code, which have an influence on the "payment amount" field, can be determined. Wherein, the control flow and the data flow are obtained after analyzing the static code, and the control flow represents the execution path of the code and the control grammar (for example, for, while, if and other statements) of the code; the data stream represents a transformation process of variable values of variables during execution of the code. In practical application, after a control flow and a data flow are obtained through static code analysis, the relationship between fields in the code can be known, for example, which fields affect the values of which fields.
The neural network learning service logic of the second part can be understood as: firstly, determining historical data corresponding to a delineation field from a log and/or a database corresponding to a test system based on the delineation field; the optimization of the model is realized by combining the historical data with the particle swarm optimization, the preprocessing such as feature engineering (such as normalization operation) and data dimension reduction is carried out on the historical data, and the model training and model evaluation are carried out on the optimized model through the preprocessed historical data.
The third part of checking the use case and the service can be understood as follows: and predicting the new test system through the model trained and evaluated by the second part, and carrying out decision making through a confidence interval based on a prediction result and a real result so as to complete verification of the new test system.
In specific implementation, the target object determination method provided in the embodiments of the present description is integrally divided into three major steps:
the method comprises the following steps: and searching a neural network model topological structure which is more suitable for a service scene through a particle swarm search algorithm and historical data.
Step two: and (4) calculating parameters (such as weight values, offset values and the like of all nodes in the neural network) of the neural network model under the neural network topological structure in the step one according to the historical data and the error back propagation algorithm, and finishing model training.
Step three: using the trained model for verification in the new system; and comparing the predicted value of the trained model with the actual output value of the system, judging whether the predicted value is in a confidence interval, if so, checking correctly, otherwise, checking fails.
The target object determination method provided by the embodiment of the specification is used for scenes such as full-link case intelligent verification, online database data intelligent verification, gray level environment 'no-person participation' intelligent test and the like. The method is based on a particle swarm search algorithm, an optimal neural network topological structure is found in a self-adaptive mode, the logical relation between system input and system output in historical data is learned through the neural network algorithm, then the system output is simulated through the neural network and compared with a real output value, whether the system output is correct or not is determined through setting a confidence interval, and the intelligent test technology of on-line data checking, intelligent test without human participation in a gray level environment and full link case checking is achieved. The method has the advantages of realizing flow automation, and having higher algorithm recall rate and accuracy, overcomes the NP-hard problem generated by directly searching the neural network topological structure, and has good adaptability in the current practice.
Referring to fig. 2, fig. 2 is a flowchart illustrating a target object determination method according to an embodiment of the present disclosure, which specifically includes the following steps.
Step 202: an initial set of objects is generated and a current position and a current velocity of each initial object in the initial set of objects is determined.
Wherein the initial object may be understood as an initial neural network model and the set of initial objects may be understood as a set comprising several initial neural network models.
Taking the initial neural network model as a feedforward neural network model as an example, in the feedforward neural network model, the network topology may be defined by the number of layers of the network (set as n), the number of nodes in each layer (for example, the number of nodes in the first layer is set as s _1, the number of nodes in the second layer is set as s _2, and the number of nodes in the nth layer is set as s _ n). In practical application, an initial object set including a plurality of initial neural network models can be generated according to actual requirements, and the number of layers of each initial neural network model and the number of nodes of each layer in the initial object set can also be randomly generated.
During specific implementation, an initial object set is generated according to preset requirements, and then the current position and the current speed of each initial object in the initial object set are determined. In practical application, when the initial object set is initially generated, the current position and the current speed of each initial object in the initial object set need to be randomly assigned.
Taking an example of searching a neural network topology by a particle swarm algorithm, generating an initial object set, which may be understood as initializing a particle swarm (e.g., the particle swarm has m particles, each particle represents an initial object), and then assigning a random initial position and speed to each particle, i.e., determining a current position and a current speed of each initial object in the initial object set.
If the particle position (current position) of the first particle is (8, 4, 16, 3), the neural network model (i.e. initial object) representing that the number of nodes of the first layer is 8, the number of nodes of the second layer is 4, the number of nodes of the third layer is 16, and the number of nodes of the fourth layer is 3;
the particle position of the second particle is (5,3,32,5), which means that the number of nodes in the first layer is 5, the number of nodes in the second layer is 3, the number of nodes in the third layer is 32, and the number of nodes in the fourth layer is 5.
Referring to fig. 3, fig. 3 is a schematic structural diagram illustrating an initial object in a target object determination method according to an embodiment of the present disclosure.
Fig. 3 includes two initial objects, a first initial object (8, 4, 16, 3), and a second initial object (5,3,32,5), i.e., the first initial object is a neural network model with four layers, the number of nodes in the first layer is 8, the number of nodes in the second layer is 4, the number of nodes in the third layer is 16, and the number of nodes in the fourth layer is 3; the second initial object is a neural network model of four layers, the number of nodes of the first layer is 5, the number of nodes of the second layer is 3, the number of nodes of the third layer is 32, and the number of nodes of the fourth layer is 5.
Step 204: and processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object.
The historical data can be understood as data generated in the operation process of a historical development system, the historical development system is taken as a transfer system, and the data generated in the operation process of the transfer system can be understood as payment data (such as payers, payment amount and the like) and transfer data (such as transfer persons, transfer amount and the like).
Specifically, before the processing each initial object based on the historical data and obtaining the adaptive value of each initial object, the method further includes:
acquiring a check field from a check object based on a preset requirement, and determining a verification field corresponding to the check field in the check object by analyzing the check object;
and acquiring historical data corresponding to the check field and the verification field from a log and a database corresponding to the check object.
The preset requirement can be set according to practical application, the transfer system is still taken as an example, and if the payment amount needs to be verified, the payment amount can be determined to be a verification field.
The verification object may be understood as a system developed historically, such as the above-mentioned money transfer system, etc. The check field may be understood as a field in the check object that needs to be checked, such as the payment amount field in the above-mentioned transfer system.
Taking a check object as a transfer system and a check field as a payment amount as an example, analyzing the check object to determine a verification field corresponding to the check field in the check object, which can be understood as determining a verification field affecting the payment amount in a code of the transfer system, such as a payment date field, an account amount field, an account arrival date field, and the like, by analyzing a static code of the transfer system.
After the check field and the verification field are determined, obtaining historical data corresponding to the check field and the verification field from a log and a database corresponding to a check object.
In practical application, the historical data can be obtained from a log and a database, for example, the parameter data of the RPC request can be logged in the RPC request, and then the parameter data of the RPC request can be obtained by SLS. DB data is acquired online by DRC (database binlog log based acquisition delta data) and offline DB data is acquired by direct linking to the database.
Following the above example, after the check field and the validation field are determined, historical data corresponding to the check field (e.g., a particular payment amount) and historical data corresponding to the validation field (e.g., a particular collection amount) may be obtained from a log and database corresponding to the transfer system.
In the embodiment of the present specification, before the target object is determined based on the historical data, a check field and a verification field are determined from the historical check object, the historical data of the subsequent optimized target object is determined based on the check field and the verification field, and then the iteration on the initial object can be realized based on the historical data to obtain a better target object.
In addition, since the obtained historical data correspond to different fields, when the types of the fields are different, the formats of the obtained historical data may be inconsistent, and a better target object is obtained in order to realize iteration on the initial object through the same historical data. Different types of historical data obtained from the log and the database can be preprocessed to ensure subsequent availability of the historical data. The specific implementation mode is as follows:
the obtaining of the historical data corresponding to the check field and the verification field from the log and the database corresponding to the check object includes:
acquiring first historical data corresponding to the check field from a log and a database corresponding to the check object, and acquiring second historical data corresponding to the verification field;
preprocessing and normalizing the first historical data and the second historical data based on data types of the first historical data and the second historical data;
and determining historical data according to the preprocessed and normalized first historical data and the second historical data.
Specifically, first historical data corresponding to a check field is obtained from a log and a database corresponding to a check object, and second historical data corresponding to a verification field is obtained; then preprocessing and normalizing the first historical data and the second historical data based on the data types of the first historical data and the second historical data; and finally, determining historical data according to the preprocessed and normalized first historical data and second historical data.
In a specific implementation, the preprocessing is performed on the first historical data and the second historical data, which can be understood as converting the types of the first historical data and the second historical data. For example, if the first historical data and/or the second historical data are/is of a money type, the money type field is numerical value continuous, special processing is not needed, and only normalization operation is needed before use; if the first history data and/or the second history data are/is of a character string type, discrete values of the character string type, such as data of ip _ id, certificate number and the like, are discrete and can not be enumerated. A hash function is required to be designed to convert the character string into a specific numerical value. The size of the range of the hash function is determined by evaluating the possible number of strings. For example, a certificate number field, assuming that the user level is approximately 1 hundred million, the hash function can be set to range from 0 to 1 hundred million. If the first history data and/or the second history data are/is of a state type, the values are discrete for the state type, and can be enumerated by directly carrying out One-Hot encoding (One-Hot). For example, the four states of initialization, in progress, success, failure may be coded as 0001, 0010, 0100, 1000, etc.
After the first historical data and the second historical data are preprocessed, the preprocessed first historical data and the preprocessed second historical data are subjected to data normalization, the number of data normalization methods is more than two, the first method is a feature scaling method, x is a feature value, min (x) and max (x) are respectively the minimum value and the maximum value of the feature in a data set, the data normalization is realized by the method through the feature, and the specific realization formula is as follows:
the second method is variance scaling. After the variance is scaled, the data set distribution is changed into a distribution with a mean value of 0 and a variance of 1, namely (mean of x-x)/variance; the specific implementation formula is as follows:
in the embodiment of the present specification, a variance scaling method may be selected for normalization of data, and since a value predicted by a neural network model is determined by a confidence interval and a true value. The variance scaling method is beneficial to better distinguish confidence interval ranges between different values.
In specific implementation, after the history data is determined in the above manner, each initial object is processed based on the history data, and a current adaptive value of the current position of each initial object is obtained.
Still taking the initial object as the initial neural network model as an example, each initial object is processed based on the historical data to obtain the current adaptive value of the current position of each initial object, which can be understood as that each initial neural network model is trained based on the historical data to obtain the loss function of each initial neural network model.
Specifically, the adaptive value of each particle is calculated according to a preset fitness function and historical data, and the adaptive value of each particle is represented by a loss function of a training neural network model.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a calculation of a current adaptive value of a current position of an initial object in a target object determination method according to an embodiment of the present disclosure.
Fig. 4 includes particles (8, 4, 16, 3) and particles (5,3,32,5), and by presetting the fitness function and the historical data, the neural network model loss value (loss function) corresponding to the particles (5,3,32,5) is calculated to be 0.006, that is, the fitness value is 0.006, and the neural network model loss value corresponding to the particles (8, 4, 16, 3) is calculated to be 0.02, that is, the fitness value is 0.02; the position of the particles (5,3,32,5) is better than the position of the particles (8, 4, 16, 3) as can be seen from the adaptation between the two particles.
Step 206: and determining the single target position of each initial object and the adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determining the group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position.
Specifically, after the current adaptive value of each initial object is calculated, the individual target position of each initial object and the group target position of the initial object set may be determined according to the current adaptive value of each initial object. The specific implementation mode is as follows:
the determining the single target position of each initial object and the adaptive value of the single target position according to the current position and the current adaptive value of each initial object includes:
determining whether each of the initial objects has a historical individual target location,
if yes, comparing the current adaptive value of each initial object with the adaptive value of the historical single target position, determining the single target position of each initial object and the adaptive value of the single target position based on the comparison result,
if not, determining the current position and the current adaptive value of each initial object as the single target position of each initial object and the adaptive value of the single target position.
The historical single target position can be understood as the historical individual preferred position of the initial object, and the adaptive value of the historical single target position can be understood as the adaptive value of the historical individual preferred position of the initial object.
Following the above example, if the initial object (8, 4, 16, 3) has three historical monomer locations: the first historical cell position, the second historical cell position and the third historical cell position, and the cell adaptive value of the first historical cell position is 0.02, the cell adaptive value of the second historical cell position is 0.01 and the cell adaptive value of the third historical cell position is 0.03, so that the second historical cell position with the cell adaptive value of 0.01 is the historical cell target position of the initial object (8, 4, 16, 3), and the adaptive value of the historical cell target position is 0.01.
In practical application, if the initial object is the first iteration, the historical monomer target position and the adaptive value of the historical monomer target position do not exist; in this case, the current position of the initial object may be used as the single target position, and the current adaptive value of the current position of the initial object may be used as the adaptive value of the single target position.
During specific implementation, whether a historical monomer target position exists in each initial object is determined, if yes, the current adaptive value of the current position of each initial object is compared with the adaptive value of the historical monomer target position, and the monomer target position of each initial object and the adaptive value of the monomer target position are determined based on the comparison result; if not, determining the current position of each initial object as the single target position of the initial object, and taking the current adaptive value of the current position of each initial object as the adaptive value of the single target position of the initial object.
In this embodiment of the present specification, the current adaptive value of the current position of each iteration of each initial object is compared with the adaptive value of the historical individual preferred position to dynamically adjust the individual preferred position of each initial object, so that the determination of the group target position and the adaptive value of the group target position can be subsequently achieved based on the individual target position and the adaptive value of the individual target position of each initial object.
Specifically, the determining the individual target position of each initial object and the adaptive value of the individual target position based on the comparison result includes:
judging whether the current adaptive value of each initial object is smaller than the adaptive value of the historical monomer target position,
if yes, determining the current position and the current adaptive value of each initial object as the single target position and the adaptive value of the single target position of each initial object,
if not, taking the historical single target position as the single target position of each initial object, and taking the adaptive value of the historical single target position as the adaptive value of the single target position of each initial object.
Still taking the initial object (8, 4, 16, 3) as an example, the current adaptive value of the initial object (8, 4, 16, 3) is 0.02, and the adaptive value of the corresponding historical monomer target position is 0.01.
Specifically, based on the current adaptive value 0.02 of the initial object (8, 4, 16, 3) and the adaptive value of the historical cell target position being 0.01, the current adaptive value of the initial object (8, 4, 16, 3) is greater than the adaptive value of the historical cell target position being 0.01, and at this time, the second historical cell position corresponding to the adaptive value of the historical cell target position being 0.01 is continuously used as the cell target position of the initial object (8, 4, 16, 3) and the adaptive value of the historical cell target position being 0.01 is used as the adaptive value of the cell target position.
If the current adaptive value of the initial object (8, 4, 16, 3) is 0.002 and the adaptive value of the historical monomer target position is 0.01, the current adaptive value of the initial object (8, 4, 16, 3) is known to be less than the adaptive value of the historical monomer target position of 0.01; in this case, it is necessary to set the current adaptive value 0.002 of the initial object (8, 4, 16, 3) as the preferred adaptive value, set the initial object (8, 4, 16, 3) corresponding to the current adaptive value 0.002 as the monomer target position of the initial object, and set the adaptive value 0.002 as the adaptive value of the monomer target position. I.e. replacing the historical cell target locations with the initial objects (8, 4, 16, 3).
In the embodiment of the present specification, for each particle (initial object), the adaptive value of its current position is compared with the adaptive value corresponding to its historical preferred position (pbest), if the adaptive value of the current position is higher, its historical preferred position is updated with the current position, and if the adaptive value of the current position is worse, the historical preferred position is continuously used as the individual preferred position. In this way, the individual preferred position of each particle can be retained for each iteration, so that the particles of the global preferred position can be selected from all the particles based on the individual preferred position of each particle.
Specifically, after determining the individual target position and the adaptive value of the individual target position of each initial object, the group target positions and the adaptive values of the group target positions in all the initial objects may be determined according to the individual target position and the adaptive value of the individual target position of each initial object, and the specific implementation manner is as follows:
the determining the group target positions of the initial object set according to the current adaptive value comprises:
determining whether a historical set target location exists for the initial set of objects,
if yes, the adaptive value of the single target position of each initial object is compared with the adaptive value of the target position of the historical set, the group target position of the initial object set is determined based on the comparison result,
if not, the single target positions of each initial object are arranged in a descending order, and the single target position of the first arranged initial object is determined as the group target position of the initial object set.
In practical applications, when the initial object set is iterated for the first time, the target position of the history set does not exist, and when the initial object set is iterated for two or more times, the target position of the history set does not exist. The history set target position may be understood as a preferred initial object in all initial objects, and the adaptive value of the history set target position is the preferred adaptive value in all initial objects.
Following the above example, if there is a history set location: particle (5,3,32,5), and particle (8, 4, 16, 3), where the adaptive value of particle (5,3,32,5) is 0.005 and the adaptive value of particle (8, 4, 16, 3) is 0.04, then the history set target location may be determined to be particle (5,3,32,5) and the adaptive value of the history set target location is 0.005.
In specific implementation, whether the initial object set has a historical set target position is judged, if yes, the adaptive value of the single target position of each initial object is compared with the adaptive value of the historical set target position, and the group target position of the initial object set and the adaptive value of the group target position are determined based on the comparison result; and if not, performing descending order arrangement on the single target positions of each initial object, and taking the single target position of the first sequenced initial object and the adaptive value of the single target position as the group target position and the adaptive value of the group target position of the initial object set.
In this embodiment of the present description, the group target position and the adaptive value of the group target position of the initial object set of this iteration may be quickly determined based on the adaptive value of the individual target position of each initial object and the adaptive value of the target position of the historical set.
In a specific implementation, the determining the group target positions of the initial object set based on the comparison result includes:
judging whether the adaptive value of the single target position of each initial object is smaller than that of the historical set target position,
if so, determining the single target position of the initial object smaller than the adaptive value of the target position of the history set as the group target position of the initial object set under the condition that one initial object smaller than the adaptive value of the target position of the history set is used,
if not, determining the target position of the history set as the group target position of the initial object set.
Following the above example, if the history set target location is particle (5,3,32, 4), the fitness value of the history set target location is 0.005.
If the adaptive value of the particle (5,3,32,5) in the initial object set corresponding to the target position of the history set at present is 0.002 and the adaptive value of the particle (8, 4, 16, 3) is 0.04, then comparing the current adaptive value of each particle with the adaptive value of the target position of the history set of 0.005 can determine that the adaptive value of 0.002 of the particle (5,3,32,5) is less than the adaptive value of 0.005 of the target position of the history set. At this time, it may be determined that the particle (5,3,32,5) is the group target position of the initial object set, and the adaptive value 0.005 of the particle (5,3,32,5) is the adaptive value of the group target position of the initial object set.
If the adaptive value of the particle (5,3,32,5) in the initial object set corresponding to the target position of the history set is 0.006 and the adaptive value of the particle (8, 4, 16, 3) is 0.04, then comparing the current adaptive value of each particle with the adaptive value of the target position of the history set of 0.005 can determine that the target position of the history set is the minimum adaptive value of the particle (5,3,32, 4). At this time, it may be determined that the particle (5,3,32, 4) is the group target position of the initial object set, and the adaptive value 0.006 of the particle (5,3,32, 4) is the adaptive value of the group target position of the initial object set.
In another case, if there are a plurality of initial objects having smaller adaptive values than the historical set target positions, the single target position of the initial object having the smallest adaptive value of the single target positions among the plurality of initial objects is determined as the group target position, and the adaptive value of the single target position is determined as the adaptive value of the group target position.
In this embodiment of the present specification, for each particle, the preferred adaptation value of its current position is compared with the adaptation value corresponding to the global preferred position (gbest), and if the adaptation value of the current position is higher (i.e., better, and the smaller the adaptation value, the better the adaptation value is), the global preferred position is updated with the current position, and then the preferred target object may be finally selected through the above iteration.
Step 208: and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set.
The preset calculation rule includes, but is not limited to, that the number of times of calculation of the group target position of the initial object set and the adaptive value of the group target position is greater than or equal to a preset number threshold, or that the adaptive value of the group target position is smaller than a preset adaptive threshold.
Taking the preset calculation rule as an example that the adaptive value of the group target position is smaller than the preset adaptive threshold, if the preset adaptive threshold is 0.002. Then, in the case that the adaptation value of the group target position determined in the above manner is 0.001, the initial object corresponding to the group target position of the initial object set may be used as the target object, i.e., the globally preferred particle.
Specifically, the determining a target object based on the group target position of the initial object set under the condition that a preset calculation rule is satisfied includes:
and under the condition of meeting a preset calculation rule, determining an object corresponding to the group target position of the initial object set, and determining the object corresponding to the group target position of the initial object set as a target object.
Along the above example, if the population target location is particle (5,3,32,5), then particle (5,3,32,5) can be determined to be the target object.
In the embodiment of the description, the object at the global optimal position can be used as the target object through the group target position, so that the global optimal solution is realized, and the subsequent model training and model application effects are improved.
In another embodiment of the present specification, after determining the group target positions of the initial object set based on the individual target position of each initial object and the adaptive value of the individual target position, the method further includes:
under the condition that the preset calculation rule is not met, updating the current position and the current speed of each initial object in the initial object set based on a preset updating algorithm;
and continuously processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object until the preset calculation rule is met.
For a detailed description of the preset calculation rule, reference may be made to the above embodiments, which are not described herein again. The preset updating algorithm can be set according to practical application, and both the current position and the current speed of each initial object in the initial object set can be updated.
In specific implementation, when the preset calculation rule is not satisfied, the initial object in the initial object set needs to be updated continuously. Firstly, updating the current position and the current speed of each initial object in an initial object set based on a preset updating algorithm; after the updating is finished, training the initial objects continuously based on the historical data to obtain the current adaptive value of the updated current position of each initial object in the initial object set; then, based on the updated current position of each initial object and the current adaptive value of the updated current position, determining the single target position and the adaptive value of the single target position of each initial object based on the calculation mode in the above embodiment; and determining the group target position of the initial object set based on the individual target position of each initial object and the adaptive value of the individual target position, and iterating until the iteration times or the adaptive value of the group target position meet a preset calculation rule. In this way, a global preferred particle is determined.
In addition, the updating the current position and the current speed of each initial object in the initial object set based on a preset updating algorithm includes:
determining the current iteration speed of each initial object based on the last iteration speed, the current position, the single target position and the group target position of each initial object;
determining the current iteration position of each initial object based on the last iteration speed and the current speed of each initial object;
and updating the current position and the current speed of each initial object according to the current iteration speed and the current iteration position.
In practice, the current position and current velocity of each particle (initial object) may be updated according to the following formulas.
The current iteration speed is the last iteration speed + weight speed (single target position-current position) + weight speed (population target position-current position).
The position after the iteration is the position of the last iteration plus the iteration speed of the current time.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an update of a current speed and a current position of an initial object in a target object determination method according to an embodiment of the present disclosure.
In fig. 5, taking an initial object as a first particle (8, 14, 26, 13) as an example, a current position of the first particle (8, 14, 26, 13) after a first iteration is (16, 23, 17, 5), and a preferred direction (16, 23, 17, 5) - (8, 14, 26, 13) of the first particle itself is (8,9, -9, -8); other particles are preferably oriented (5,3,32,5) - (16, 23, 17, 5) ═ 11, -20, -15, 0; and the adjusted next direction of movement may be determined based on the current position (16, 23, 17, 5) and the current velocity of the first particle.
Similarly, the update of the current velocity and the current position of the second particle (5,3,32,5) is as described above and the global preferred position is determined once each time based on the iterated positions of all particles in order to enable the determination of the target object.
In another embodiment of the present specification, in a case that the target object is a neural network model, after determining a preferred neural network model, the neural network model may be trained and tested based on the historical data, so that the neural network model may be applied to a specific service scenario in a following manner, which is implemented as follows:
the target object is a target neural network model;
accordingly, after determining the target object based on the group target positions of the initial object set, the method further includes:
taking the historical data corresponding to the verification field as a training sample, and taking the historical data corresponding to the verification field as a training label;
the training samples and the training labels corresponding to the training samples are divided into a data training set and a data testing set;
training the target neural network model through an error back propagation algorithm based on the data training set, and testing the target neural network model based on the data testing set to obtain the trained and tested target neural network model.
For obtaining the historical data and preprocessing the historical data, reference may be made to the above embodiments, which are not described herein again.
Specifically, historical data corresponding to the verification field is used as a training sample, and historical data corresponding to the verification field is used as a training label; and forming training data for training the target neural network model based on the training samples and the training labels corresponding to the training samples.
And then dividing training data into a data training set and a data testing set, training a target neural network model through an error back propagation algorithm based on the data training set, testing the target neural network model obtained through training based on the data testing set, and obtaining the trained and tested target neural network model under the condition that a loss function of the target neural network model meets a preset threshold value.
In practical applications, the target neural network model of the embodiments of the present disclosure may be a feedforward neural network model, and may also be a recurrent neural network or a long-short term memory network. Or a plurality of neural networks are trained in parallel in a multiplexing mode to solve the Test Oracle problem.
Referring to fig. 6, fig. 6 is a schematic structural diagram illustrating a target neural network model in a target object determination method according to an embodiment of the present disclosure.
The target neural network model in fig. 6 is a feedforward neural network model that includes an input layer, a hidden layer, and an output layer.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a training of a target neural network model in a target object determination method according to an embodiment of the present disclosure.
In fig. 7, when training the target neural network model, first obtain historical data (i.e. service traffic in the graph) from log data and/or a database of historically developed software, for example, the ingress and egress parameter data of the RPC request may be logged in the RPC request, and then obtain the ingress and egress parameter of the RPC request through SLS. DB data is acquired online by DRC (database binlog log based acquisition delta data) and offline DB data is acquired by direct linking to the database.
After the historical data are obtained, feature correlation coefficient screening is carried out on the historical data through feature engineering, training data are determined, iterative training of a target neural network model (such as a feedforward neural network FNN model) is finally achieved through an error back propagation algorithm based on the training data, and finally the trained target neural network model is produced.
Specifically, when training is performed based on the feedforward neural network model, firstly, after normalization operation is performed on input data (namely a data training set), an initial learning rate is set to be 0.1, then, according to the iteration times, every iteration is set to be n times, the learning rate is reduced by 10 times (the learning rate is 0.1), and dynamic adjustment of the learning rate of the feedforward neural network model is achieved. And finally, training the feedforward neural network model through an error back propagation algorithm to obtain the feedforward neural network model, wherein specifically, the convergence trend of the loss function of the feedforward neural network model is shown in fig. 8. Fig. 8 is a schematic diagram illustrating a convergence trend of a loss function of a target neural network model in a target object determination method according to an embodiment of the present disclosure.
After the target neural network model is trained, the new service scene can be quickly and accurately verified based on the target neural network. The specific implementation mode is as follows:
after the obtaining of the trained and tested target neural network model, the method further includes:
inputting verification data corresponding to a verification field of a verification object into the target neural network model to obtain a prediction result corresponding to the verification data;
and determining the error degree of the prediction result and the real result corresponding to the verification data, and determining that the verification object is verified correctly under the condition that the error degree is less than or equal to a preset error threshold.
Wherein the verification object can be understood as a new service traffic, such as a newly developed system. The preset error threshold may be set according to practical applications, for example, the preset error threshold is 3%.
Specifically, after the trained and tested target neural network model is obtained, the newly developed system may be used to predict an output value according to an input, for example, the input is a payment amount, and the output value is to be predicted: and whether the collection amount is consistent with the payment amount or not is judged, so that the newly developed system is verified.
In practical applications, the output of the target neural network model will be different from the actual output value of the service (newly developed system), for example, 35 is output by the actual service, and 34.995 or 35.2 is possible to predict the output of the target neural network model. At this time, the decision on the predicted value of the target neural network model and the actual same value of the service needs to be made by setting a confidence interval. The confidence interval can be set when the error between the two is less than 3%, the two are considered to be consistent, namely the service is checked correctly; otherwise, the service is considered to be in error, etc.
Referring to fig. 9, fig. 9 is a schematic diagram illustrating a specific processing procedure of a target neural network model in a target object determination method according to an embodiment of the present disclosure.
In fig. 9, after training to obtain the target neural network, the target neural network may be applied in verification of the newly developed system.
Specifically, during the verification, on-line verification and off-line verification can be performed on the newly developed system, wherein the on-line verification is the verification of the gray scale flow and the verification of the on-line data; the offline verification is offline full link use case verification. Specifically, static code analysis is performed on the newly developed system to determine the flow input (data used for model prediction). Then, the data for model prediction is input into a trained algorithm model (namely, a target neural network model), a predicted value corresponding to the data for model prediction is output through the algorithm model, and an actual value (RPC return value/DB data) corresponding to the data for model prediction is obtained at the same time. And performing result judgment based on the predicted value and the actual value, namely determining a verification result based on the comparison of a threshold value of the difference between the predicted value and the actual value and the confidence interval.
The target object determination method provided in the embodiment of the present specification fits the service code logic through the neural network model, and since the neural network itself has a very strong logic fitting capability, the above method is only applicable to the problem of simply processing the service scenario. Meanwhile, the particle swarm search algorithm is introduced to replace the NP-hard problem generated in the general search process, so that the problem of model topological structure design in a service scene fitting through a neural network is solved.
Specifically, the target object determination method provided by the specification realizes verification of the output of the service system, so that the recall rate and the accuracy rate are better. Referring to fig. 10 in particular, fig. 10 is a schematic diagram illustrating a recall rate and an accuracy rate of a target object determination method provided by an embodiment of the present specification in a specific use.
In practical application, faults are injected into a normal system, the problem recall rate and accuracy of the algorithm are verified through the injected faults, and the recall rate and accuracy of manual parameter adjustment are improved. The simulation experiment based on fig. 10 shows that the problems that the scheme is less in applicable scenes in the service system verification process, the verification rule is limited, manual participation is needed in the process and the like can be solved through the scheme. And intelligent verification of 'unmanned parameters' on the output of the service system can be realized.
Corresponding to the above method embodiment, the present specification further provides an embodiment of a target object determining apparatus, and fig. 11 shows a schematic structural diagram of a target object determining apparatus provided in an embodiment of the present specification. As shown in fig. 11, the apparatus includes:
an initial object generation module 1102 configured to generate an initial object set and determine a current position and a current velocity of each initial object in the initial object set;
an adaptive value determining module 1104 configured to process each of the initial objects based on historical data to obtain a current adaptive value of a current location of each of the initial objects;
a target position determining module 1106, configured to determine an individual target position of each initial object and an adaptive value of the individual target position according to the current position and the current adaptive value of each initial object, and determine a group target position of the initial object set based on the individual target position of each initial object and the adaptive value of the individual target position;
a target object determination module 1108 configured to determine a target object based on the group target locations of the initial set of objects if a preset calculation rule is satisfied.
Optionally, the target location determination module 1106 is further configured to:
determining whether each of the initial objects has a historical individual target location,
if yes, comparing the current adaptive value of each initial object with the adaptive value of the historical single target position, determining the single target position of each initial object and the adaptive value of the single target position based on the comparison result,
if not, determining the current position and the current adaptive value of each initial object as the single target position of each initial object and the adaptive value of the single target position.
Optionally, the target location determination module 1106 is further configured to:
judging whether the current adaptive value of each initial object is smaller than the adaptive value of the historical monomer target position,
if yes, determining the current position and the current adaptive value of each initial object as the single target position and the adaptive value of the single target position of each initial object,
if not, taking the historical single target position as the single target position of each initial object, and taking the adaptive value of the historical single target position as the adaptive value of the single target position of each initial object.
Optionally, the target location determination module 1106 is further configured to:
determining whether a historical set target location exists for the initial set of objects,
if yes, the adaptive value of the single target position of each initial object is compared with the adaptive value of the target position of the historical set, the group target position of the initial object set is determined based on the comparison result,
if not, the single target positions of each initial object are arranged in a descending order, and the single target position of the first arranged initial object is determined as the group target position of the initial object set.
Optionally, the target location determination module 1106 is further configured to:
judging whether the adaptive value of the single target position of each initial object is smaller than that of the historical set target position,
if so, determining the single target position of the initial object smaller than the adaptive value of the target position of the history set as the group target position of the initial object set under the condition that one initial object smaller than the adaptive value of the target position of the history set is used,
if not, determining the target position of the history set as the group target position of the initial object set.
Optionally, the target object determining module 1108 is further configured to:
and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set.
Optionally, the apparatus further comprises:
an iteration module configured to:
and under the condition that the preset calculation rule is not met, updating the current position and the current speed of each initial object in the initial object set based on a preset updating algorithm, and continuously processing each initial object based on historical data to obtain the current adaptive value of the current position of each initial object until the preset calculation rule is met.
Optionally, the iteration module is further configured to:
determining the current iteration speed of each initial object based on the last iteration speed, the current position, the single target position and the group target position of each initial object;
determining the current iteration position of each initial object based on the last iteration speed and the current speed of each initial object;
and updating the current position and the current speed of each initial object according to the current iteration speed and the current iteration position.
Optionally, the apparatus further comprises:
a data processing module configured to:
acquiring a check field from a check object based on a preset requirement, and determining a verification field corresponding to the check field in the check object by analyzing the check object;
and acquiring historical data corresponding to the check field and the verification field from a log and a database corresponding to the check object.
Optionally, the data processing module is further configured to:
acquiring first historical data corresponding to the check field from a log and a database corresponding to the check object, and acquiring second historical data corresponding to the verification field;
preprocessing and normalizing the first historical data and the second historical data based on data types of the first historical data and the second historical data;
and determining historical data according to the preprocessed and normalized first historical data and the second historical data.
Optionally, the target object is a target neural network model;
accordingly, the apparatus further comprises:
a model training module configured to:
taking the historical data corresponding to the verification field as a training sample, and taking the historical data corresponding to the verification field as a training label;
the training samples and the training labels corresponding to the training samples are divided into a data training set and a data testing set;
training the target neural network model through an error back propagation algorithm based on the data training set, and testing the target neural network model based on the data testing set to obtain the trained and tested target neural network model.
Optionally, the apparatus further comprises:
a verification module configured to:
inputting verification data corresponding to a verification field of a verification object into the target neural network model to obtain a prediction result corresponding to the verification data;
and determining the error degree of the prediction result and the real result corresponding to the verification data, and determining that the verification object is verified correctly under the condition that the error degree is less than or equal to a preset error threshold.
The target object determination device provided in the embodiment of the present specification performs iterative computation on an initial object in an initial object set based on historical data to determine a better target object, and then may implement an intelligent verification technique for offline full-link use case verification, online gray-scale flow verification, and online data verification by using the target object, thereby solving verification problems such as offline full-link use case verification, online gray-scale flow verification, and online data verification, and improving user experience.
The above is an illustrative scheme of a target object determination apparatus of the present embodiment. It should be noted that the technical solution of the target object determining apparatus and the technical solution of the target object determining method belong to the same concept, and details that are not described in detail in the technical solution of the target object determining apparatus can be referred to the description of the technical solution of the target object determining method.
FIG. 12 illustrates a block diagram of a computing device 1200 provided according to one embodiment of the present description. The components of the computing device 1200 include, but are not limited to, memory 1210 and processor 1220. Processor 1220 is coupled to memory 1210 via bus 1230, and database 1250 is used to store data.
The computing device 1200 also includes an access device 1240, the access device 1240 enabling the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 1240 may include one or more of any type of network interface, e.g., a Network Interface Card (NIC), wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 1200 and other components not shown in FIG. 12 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 12 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 1200 may also be a mobile or stationary server.
Wherein the processor 1220 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the above-described target object determination method.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the target object determining method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the target object determining method.
An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described target object determination method.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the target object determining method, and for details that are not described in detail in the technical solution of the storage medium, reference may be made to the description of the technical solution of the target object determining method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.
Claims (15)
1. A target object determination method, comprising:
generating an initial object set, and determining the current position and the current speed of each initial object in the initial object set;
processing each initial object based on historical data to obtain a current adaptive value of the current position of each initial object;
determining a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determining a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position;
and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set.
2. The target object determination method of claim 1, wherein determining the individual target position of each initial object and the adaptive value of the individual target position according to the current position and the current adaptive value of each initial object comprises:
determining whether each of the initial objects has a historical individual target location,
if yes, comparing the current adaptive value of each initial object with the adaptive value of the historical single target position, determining the single target position of each initial object and the adaptive value of the single target position based on the comparison result,
if not, determining the current position and the current adaptive value of each initial object as the single target position of each initial object and the adaptive value of the single target position.
3. The target object determination method of claim 2, the determining an individual target position of the each initial object and an adaptive value of the individual target position based on the comparison result, comprising:
judging whether the current adaptive value of each initial object is smaller than the adaptive value of the historical monomer target position,
if yes, determining the current position and the current adaptive value of each initial object as the single target position and the adaptive value of the single target position of each initial object,
if not, taking the historical single target position as the single target position of each initial object, and taking the adaptive value of the historical single target position as the adaptive value of the single target position of each initial object.
4. The target object determination method of claim 3, the determining the population target locations of the set of initial objects and the adaptation values of the population target locations based on the individual target locations of each initial object and the adaptation values of the individual target locations, comprising:
determining whether a historical set target location exists for the initial set of objects,
if yes, the adaptive value of the single target position of each initial object is compared with the adaptive value of the target position of the historical set, the group target position of the initial object set is determined based on the comparison result,
if not, the single target positions of each initial object are arranged in a descending order, and the single target position of the first arranged initial object is determined as the group target position of the initial object set.
5. The target object determination method of claim 4, the determining a group target location of the initial set of objects based on the comparison, comprising:
judging whether the adaptive value of the single target position of each initial object is smaller than that of the historical set target position,
if so, determining the single target position of the initial object smaller than the adaptive value of the target position of the history set as the group target position of the initial object set under the condition that one initial object smaller than the adaptive value of the target position of the history set is used,
if not, determining the target position of the history set as the group target position of the initial object set.
6. The target object determination method according to claim 1, wherein determining the target object based on the group target positions of the initial object set if a preset calculation rule is satisfied comprises:
and under the condition of meeting a preset calculation rule, determining a target object based on the group target positions of the initial object set.
7. The target object determination method of claim 1, further comprising, after determining the population target locations of the set of initial objects based on the individual target location of each initial object and the fitness value of the individual target location:
and under the condition that the preset calculation rule is not met, updating the current position and the current speed of each initial object in the initial object set based on a preset updating algorithm, and continuously processing each initial object based on historical data to obtain the current adaptive value of the current position of each initial object until the preset calculation rule is met.
8. The target object determination method of claim 7, wherein the updating the current position and the current velocity of each initial object in the set of initial objects based on a preset updating algorithm comprises:
determining the current iteration speed of each initial object based on the last iteration speed, the current position, the single target position and the group target position of each initial object;
determining the current iteration position of each initial object based on the last iteration speed and the current speed of each initial object;
and updating the current position and the current speed of each initial object according to the current iteration speed and the current iteration position.
9. The method for determining a target object according to claim 1, wherein before the processing each initial object based on the historical data to obtain the adaptive value of each initial object, the method further comprises:
acquiring a check field from a check object based on a preset requirement, and determining a verification field corresponding to the check field in the check object by analyzing the check object;
and acquiring historical data corresponding to the check field and the verification field from a log and a database corresponding to the check object.
10. The method for determining a target object according to claim 9, wherein the obtaining the historical data corresponding to the verification field and the verification field from the log and the database corresponding to the verification object includes:
acquiring first historical data corresponding to the check field from a log and a database corresponding to the check object, and acquiring second historical data corresponding to the verification field;
preprocessing and normalizing the first historical data and the second historical data based on data types of the first historical data and the second historical data;
and determining historical data according to the preprocessed and normalized first historical data and the second historical data.
11. The target object determination method according to claim 9, the target object being a target neural network model;
accordingly, after determining the target object based on the group target positions of the initial object set, the method further includes:
taking the historical data corresponding to the verification field as a training sample, and taking the historical data corresponding to the verification field as a training label;
the training samples and the training labels corresponding to the training samples are divided into a data training set and a data testing set;
training the target neural network model through an error back propagation algorithm based on the data training set, and testing the target neural network model based on the data testing set to obtain the trained and tested target neural network model.
12. The target object determination method of claim 11, after obtaining the trained and tested target neural network model, further comprising:
inputting verification data corresponding to a verification field of a verification object into the target neural network model to obtain a prediction result corresponding to the verification data;
and determining the error degree of the prediction result and the real result corresponding to the verification data, and determining that the verification object is verified correctly under the condition that the error degree is less than or equal to a preset error threshold.
13. A target object determination apparatus comprising:
an initial object generation module configured to generate an initial object set and determine a current position and a current velocity of each initial object in the initial object set;
an adaptive value determination module configured to process each initial object based on historical data to obtain a current adaptive value of a current position of each initial object;
a target position determining module configured to determine a single target position of each initial object and an adaptive value of the single target position according to the current position and the current adaptive value of each initial object, and determine a group target position of the initial object set based on the single target position of each initial object and the adaptive value of the single target position;
a target object determination module configured to determine a target object based on the group target positions of the initial object set if a preset calculation rule is satisfied.
14. A computing device, comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions, which when executed by the processor, perform the steps of the target object determination method of any one of claims 1 to 12.
15. A computer readable storage medium storing computer executable instructions which, when executed by a processor, carry out the steps of the target object determination method of any one of claims 1 to 12.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110860013.6A CN113553270B (en) | 2021-07-28 | 2021-07-28 | Target object determining method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110860013.6A CN113553270B (en) | 2021-07-28 | 2021-07-28 | Target object determining method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113553270A true CN113553270A (en) | 2021-10-26 |
| CN113553270B CN113553270B (en) | 2024-07-26 |
Family
ID=78133140
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110860013.6A Active CN113553270B (en) | 2021-07-28 | 2021-07-28 | Target object determining method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113553270B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115309985A (en) * | 2022-07-27 | 2022-11-08 | 阿里巴巴(中国)有限公司 | Fairness evaluation method of recommendation algorithm and AI model selection method |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101221213A (en) * | 2008-01-25 | 2008-07-16 | 湖南大学 | Neural Network Method for Fault Diagnosis of Analog Circuits Based on Particle Swarm Optimization |
| CN103729695A (en) * | 2014-01-06 | 2014-04-16 | 国家电网公司 | Short-term power load forecasting method based on particle swarm and BP neural network |
| CN104238546A (en) * | 2014-08-28 | 2014-12-24 | 中国南方电网有限责任公司超高压输电公司检修试验中心 | Direct current master device fault diagnosis method based on hybrid neural network |
| CN106548230A (en) * | 2016-10-14 | 2017-03-29 | 云南电网有限责任公司昆明供电局 | Diagnosis Method of Transformer Faults based on Modified particle swarm optimization neutral net |
| CN106920008A (en) * | 2017-02-28 | 2017-07-04 | 山东大学 | A kind of wind power forecasting method based on Modified particle swarm optimization BP neural network |
| CN108365784A (en) * | 2017-11-24 | 2018-08-03 | 天津大学 | Based on the control method for brushless direct current motor for improving PSO-BP neural networks |
| CN111723909A (en) * | 2020-06-15 | 2020-09-29 | 武汉轻工大学 | Optimization method and system of fuzzy neural network model |
| CN112348155A (en) * | 2020-11-05 | 2021-02-09 | 扬州工业职业技术学院 | A kind of optimization method and system of fuzzy neural network model |
| WO2021026944A1 (en) * | 2019-08-09 | 2021-02-18 | 东北大学 | Adaptive transmission method for industrial wireless streaming media employing particle swarm and neural network |
-
2021
- 2021-07-28 CN CN202110860013.6A patent/CN113553270B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101221213A (en) * | 2008-01-25 | 2008-07-16 | 湖南大学 | Neural Network Method for Fault Diagnosis of Analog Circuits Based on Particle Swarm Optimization |
| CN103729695A (en) * | 2014-01-06 | 2014-04-16 | 国家电网公司 | Short-term power load forecasting method based on particle swarm and BP neural network |
| CN104238546A (en) * | 2014-08-28 | 2014-12-24 | 中国南方电网有限责任公司超高压输电公司检修试验中心 | Direct current master device fault diagnosis method based on hybrid neural network |
| CN106548230A (en) * | 2016-10-14 | 2017-03-29 | 云南电网有限责任公司昆明供电局 | Diagnosis Method of Transformer Faults based on Modified particle swarm optimization neutral net |
| CN106920008A (en) * | 2017-02-28 | 2017-07-04 | 山东大学 | A kind of wind power forecasting method based on Modified particle swarm optimization BP neural network |
| CN108365784A (en) * | 2017-11-24 | 2018-08-03 | 天津大学 | Based on the control method for brushless direct current motor for improving PSO-BP neural networks |
| WO2021026944A1 (en) * | 2019-08-09 | 2021-02-18 | 东北大学 | Adaptive transmission method for industrial wireless streaming media employing particle swarm and neural network |
| CN111723909A (en) * | 2020-06-15 | 2020-09-29 | 武汉轻工大学 | Optimization method and system of fuzzy neural network model |
| CN112348155A (en) * | 2020-11-05 | 2021-02-09 | 扬州工业职业技术学院 | A kind of optimization method and system of fuzzy neural network model |
Non-Patent Citations (3)
| Title |
|---|
| XI ZHEN-YUAN ETC: ""Network anomaly recognition based on cauchy particle swarm optimization algorithm-RBF neural network"", 《2015 INTERNATIONAL CONFERENCE ON COMPUTERS, COMMUNICATIONS, AND SYSTEMS (ICCCS)》, 3 November 2015 (2015-11-03) * |
| 吴建生;刘丽萍;金龙;: "粒子群-神经网络集成学习算法气象预报建模研究", 热带气象学报, no. 06, 15 December 2008 (2008-12-15) * |
| 田雨波;潘朋朋;: "粒子群算法优化神经网络结构的研究", 现代电子技术, no. 04, 15 February 2011 (2011-02-15) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115309985A (en) * | 2022-07-27 | 2022-11-08 | 阿里巴巴(中国)有限公司 | Fairness evaluation method of recommendation algorithm and AI model selection method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113553270B (en) | 2024-07-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110210032B (en) | Text processing method and device | |
| CN112581263A (en) | Credit evaluation method for optimizing generalized regression neural network based on wolf algorithm | |
| CN113688244B (en) | Text classification method, system, equipment and storage medium based on neural network | |
| EP3924893A1 (en) | Incremental training of machine learning tools | |
| CN111310814A (en) | Method and device for training business prediction model by utilizing unbalanced positive and negative samples | |
| CN111148118A (en) | Flow prediction and carrier turn-off method and system based on time sequence | |
| Azzouz et al. | Steady state IBEA assisted by MLP neural networks for expensive multi-objective optimization problems | |
| CN116976461A (en) | Federated learning methods, devices, equipment and media | |
| CN112634992A (en) | Molecular property prediction method, training method of model thereof, and related device and equipment | |
| CN116933948A (en) | Prediction method and system based on improved seagull algorithm and back propagation neural network | |
| Miquel et al. | Retinanet object detector based on analog-to-spiking neural network conversion | |
| Jing | Neural network-based pattern recognition in the framework of edge computing | |
| Singhal et al. | Greedy shapley client selection for communication-efficient federated learning | |
| Urgun et al. | Composite power system reliability evaluation using importance sampling and convolutional neural networks | |
| Hussein et al. | Multi-step-ahead chaotic time series prediction using coevolutionary recurrent neural networks | |
| CN114372558A (en) | Residential electricity load forecasting method, medium and equipment based on multi-model fusion | |
| CN113688989A (en) | Deep learning network acceleration method, device, equipment and storage medium | |
| CN113553270B (en) | Target object determining method and device | |
| Qi et al. | Meta-learning with neural bandit scheduler | |
| CN114548382B (en) | Migration training method, device, equipment, storage medium and program product | |
| Flores et al. | Enhanced Vector Quantization for Embedded Machine Learning: A Post-Training Approach With Incremental Clustering | |
| CN113191527A (en) | Prediction method and device for population prediction based on prediction model | |
| CN117709404A (en) | Privacy protection neural network architecture optimization method based on federal learning framework | |
| CN113392100A (en) | System intelligent verification method, device and system based on particle swarm optimization neural network | |
| Balabanova et al. | Synthesizing of models for identification of teletraffic Markov chains by artificial neural networks and decision tree method |
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 |