Industrial negative sample generation model construction method and device, equipment and storage medium

By building a GAN network and using self-gaming mechanism and timing differential learning algorithm to train the generator and discriminator, the instability and local optimization problems of traditional GANs when generating industrial negative sample data are solved. The quality and diversity of the generated negative sample data have been improved, and the generalization ability and robustness of the model have also been enhanced.

CN119691566AInactive Publication Date: 2025-03-25JIHUA LAB
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510191691.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional generative adversarial networks (GANs) have instability, local optimal problems, risk of pattern collapse and sensitivity to hyperparameter selection when generating industrial negative sample data, resulting in low quality of generated data, affecting the generalization ability and reasoning performance of fault diagnosis models.

Method used

By building a GAN network including generators and discriminators, and using a self-game mechanism to train the generator, combining the timing differential learning algorithm to train the discriminator, integrating the optimization generator and discriminator, an industrial negative sample generation model is formed.

Benefits of technology

It effectively avoids the generator from falling into local optimization, generates more diverse and authentic industrial negative samples, improves the performance and generalization capabilities of the generator, enhances the stability and robustness of the model, and the generated negative samples are highly similar to the real data, solving the problem of insufficient negative samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691566A_ABST
    Figure CN119691566A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, and discloses an industrial negative sample generation model construction method and device, equipment and a storage medium, and the method is used for improving the data generation quality of an industrial negative sample generation model. The method comprises the following steps: constructing a GAN network, wherein the GAN network comprises a generator and a discriminator; initializing parameters of the generator and parameters of the discriminator to obtain a current generator and a current discriminator; training the current generator by adopting a self-game mechanism to obtain an optimized generator; training the current discriminator by adopting a time sequence difference learning algorithm to obtain an optimized discriminator; and integrating the optimization generator and the optimization discriminator to obtain an industrial negative sample generation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for building an industrial negative sample generation model. Background Art

[0002] The uniform distribution of positive and negative samples in industrial data sets often plays a key role in the modeling effect of fault diagnosis and prediction algorithms based on data-driven high-end equipment. However, since high-end equipment usually has the characteristics of high cost, low output and long life, its inventory is small and the frequency of failure is low, which makes it difficult to collect negative sample (i.e. fault sample) data. The scarcity of negative sample data seriously affects the training effect of the fault diagnosis model, resulting in insufficient generalization ability and prediction accuracy of the model in real scenarios. At present, the industry often uses methods such as generative adversarial networks (GAN) to forge data based on the characteristics of real negative sample data to achieve the purpose of data enhancement. By generating synthetic data similar to the distribution of real negative samples, the problem of insufficient negative samples can be alleviated to a certain extent and the training effect of the model can be improved.

[0003] However, the traditional GAN ​​network has some inherent structural defects, which leads to many challenges in generating negative sample data. First, the training process of GAN is usually unstable, and the game between the generator and the discriminator is prone to fall into local optimality, resulting in low quality of generated data. Secondly, GAN is at risk of mode collapse, that is, the generator tends to generate similar samples and cannot cover the diversity of real data, which affects the matching degree between the distribution of generated data and real data. In addition, the training process of GAN is very sensitive to the selection of hyperparameters, and the slightest carelessness may lead to training failure or poor generation effect. These problems not only affect the quality of generated data, but also further affect the generalization ability and reasoning performance of subsequent fault diagnosis models. Summary of the invention

[0004] The present invention provides a method, device, equipment and storage medium for constructing an industrial negative sample generation model, which are used to improve the data generation quality of the industrial negative sample generation model.

[0005] The first aspect of the present invention provides a method for constructing an industrial negative sample generation model, which comprises: constructing a GAN network, the GAN network comprising a generator and a discriminator; initializing the parameters of the generator and the parameters of the discriminator to obtain a current generator and a current discriminator; training the current generator using a self-game mechanism to obtain an optimized generator; training the current discriminator using a temporal difference learning algorithm to obtain an optimized discriminator; integrating the optimized generator and the optimized discriminator to obtain an industrial negative sample generation model.

[0006] Preferably, the self-game mechanism is used to train the generator to obtain an optimized generator, including: constructing a generator version pool corresponding to the generator and a discriminator version pool corresponding to the discriminator; randomly selecting a historical version generator from the generator version pool, and using the current generator and the selected historical version generator to generate forged first industrial negative sample data and forged second industrial negative sample data; selecting any version of the discriminator from the discriminator version pool, and obtaining real negative sample data, and generating a first evaluation result corresponding to the current generator and a second evaluation result corresponding to the selected historical version generator based on the real negative sample data, the forged first industrial negative sample data and the forged second industrial negative sample data; based on According to the first evaluation result and the second evaluation result, the reward value of the current generator and the reward value of the historical version generator are calculated; the hyperparameters of the current generator are adjusted according to the reward value of the current generator and the reward value of the historical version generator, and when the reward value of the current generator is greater than the reward value of the historical version generator, the acceptance probability of the current generator is calculated, and when the acceptance probability of the current generator is greater than the preset generator acceptance probability value, the current generator is placed in the generator version pool; according to the adjusted hyperparameters, the current generator is repeatedly trained using a self-game mechanism until the current generator reaches the preset convergence condition and the training of the current generator is completed; the latest version generator is selected from the generator version pool as the optimized generator.

[0007] Preferably, the method randomly selects a historical version generator from a generator version pool, and uses the current generator and the selected historical version generator to generate forged first industrial negative sample data and forged second industrial negative sample data, including: obtaining a random noise distribution, extracting samples from the random noise distribution, and inputting the extracted samples into the current generator to generate forged first industrial negative sample data; randomly selecting a historical version generator from the generator version pool, and inputting the extracted samples into the selected historical version generator to generate forged second industrial negative sample data.

[0008] Preferably, the method selects any version of the discriminator from the discriminator version pool and obtains real negative sample data, and generates a first evaluation result corresponding to the current generator and a second evaluation result corresponding to the selected historical version generator based on the real negative sample data, the forged first industrial negative sample data and the forged second industrial negative sample data, including: selecting any version of the discriminator from the discriminator version pool and obtaining real negative sample data, inputting the forged first industrial negative sample data and the real negative sample data into the selected discriminator to obtain the first evaluation result; inputting the forged second industrial negative sample data and the real negative sample data into the selected discriminator to obtain the second evaluation result.

[0009] Preferably, the preset convergence condition includes a first condition and a second condition, the first condition being that the reward function of the current generator reaches the global optimal solution; the second condition being that during the updating process, the transition probability between the two versions satisfies symmetry.

[0010] Preferably, the construction of a generator version pool corresponding to the generator and a discriminator version pool corresponding to the discriminator also includes the construction of an experience replay cache area, which is used to store the industrial negative sample data generated by the current generator during the training process and the first evaluation result and the second evaluation result generated by the discriminator.

[0011] Preferably, in the process of training the current discriminator using the temporal difference learning algorithm to obtain the optimized discriminator, the loss function is used to evaluate and calculate the acceptance probability of the current discriminator, and when the acceptance probability of the current discriminator is greater than the preset discriminator acceptance probability value, the current discriminator is placed in the discriminator version pool.

[0012] The second aspect of the present invention provides an industrial negative sample generation model construction device, comprising: a construction module, used to construct a GAN network, the GAN network includes a generator and a discriminator; an initialization module, used to initialize the parameters of the generator and the parameters of the discriminator to obtain a current generator and a current discriminator; The first training module is used to train the current generator using a self-game mechanism to obtain an optimized generator; the second training module is used to train the current discriminator using a temporal difference learning algorithm to obtain an optimized discriminator; the integration module is used to integrate the optimized generator and the optimized discriminator to obtain an industrial negative sample generation model.

[0013] The third aspect of the present invention provides an industrial negative sample generation model construction device, comprising: a memory and at least one processor, wherein the memory stores computer-readable instructions, and the memory and the at least one processor are interconnected through lines; the at least one processor calls the computer-readable instructions in the memory so that the industrial negative sample generation model construction device performs the various steps of the industrial negative sample generation model construction method as described above.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable storage medium is run on a computer, the computer executes the various steps of the industrial negative sample generation model construction method as described above.

[0015] In the technical solution provided by the present invention, a GAN network including a generator and a discriminator is constructed, and a self-game mechanism is adopted to train the generator, so that the generator can continuously explore a better generation strategy in the confrontation with different versions of itself, which can effectively avoid falling into the local optimum, generate more diverse and authentic industrial negative samples, and improve the performance and generalization ability of the generator. The current discriminator is trained using a temporal difference learning algorithm. This online learning method enables the discriminator to quickly adapt to the changes in new sample features, combines short-term and long-term rewards, learns sample features from a macro perspective, improves the recognition ability of complex industrial negative sample patterns, and enhances the stability and robustness of the model. Finally, the optimized generator and the optimized discriminator are fused, and the obtained industrial negative sample generation model can generate negative samples that are highly similar to real industrial negative samples, effectively solve the problem of few or difficult to obtain negative samples in industrial data, supplement and enhance the data, and then improve the performance of data-driven industrial applications, making them more robust and accurate when processing industrial data. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for constructing an industrial negative sample generation model provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of an industrial negative sample generation model construction device provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of an industrial negative sample generation model building device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0018] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 A first embodiment of a method for constructing an industrial negative sample generation model in an embodiment of the present invention includes: S101. Build a GAN network, which includes a generator and a discriminator. S102, initializing the parameters of the generator and the parameters of the discriminator to obtain the current generator and the current discriminator; S103, using a self-game mechanism to train the current generator to obtain an optimized generator; S104, using a temporal difference learning algorithm to train the current discriminator to obtain an optimized discriminator; S105. Integrate the optimized generator and the optimized discriminator to obtain an industrial negative sample generation model.

[0019] It is understandable that the execution subject of the present invention may be an industrial negative sample generation model construction device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

[0020] In this embodiment, the above-mentioned industrial negative sample generation model is used to generate industrial negative sample data, which can improve the diversity of negative samples.

[0021] It is understandable that the execution subject of the present invention may be an industrial negative sample data generation model construction device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

[0022] In this embodiment, the industrial negative sample data is generated by using the above-mentioned industrial negative sample data generation model, which can improve the diversity of negative samples.

[0023] In this embodiment, in step S101, the task of the generator is to generate data samples that are as realistic as possible from random noise, and the task of the discriminator is to distinguish whether the input data is a real sample or a forged sample generated by the generator.

[0024] In this embodiment, the generator uses a neural network structure, such as a multi-layer perceptron (MLP), a convolutional neural network (CNN), or a recurrent neural network (RNN), and the specific choice depends on the type of industrial negative sample data. For example, if the industrial negative sample data is image-based, CNN can be used because it can effectively capture the spatial features of the image; if the industrial data is time series-based, RNN or its variants (such as LSTM, GRU) can be used because they can process the temporal information of sequence data.

[0025] The input of the generator is usually a random noise vector, whose dimension can be adjusted according to the specific task. The output is data with the same dimension and format as the real industrial negative sample data. For example, when generating images, the output is an image matrix; when generating numerical sequences, the output is a numerical vector.

[0026] In this embodiment, the generator includes multiple hidden layers, and each hidden layer introduces nonlinear transformation through an activation function to increase the expressive power of the model. The activation function can be selected from functions such as ReLU and LeakyReLU.

[0027] In this embodiment, the discriminator also uses a neural network structure similar to that of the generator. Generally speaking, the input of the discriminator is a real sample or a sample generated by the generator, and the output is a probability value, which indicates the probability that the input sample is a real sample. For image data, the discriminator can use CNN because it can extract the features of the image and perform classification judgment; for sequence data, the discriminator can use RNN.

[0028] In this embodiment, the discriminator includes multiple hidden layers for extracting the features of the input samples. In the last layer, the Sigmoid activation function is used to map the output value to The interval is used to represent the probability that the sample is a real sample. The training goal of the discriminator is to maximize the ability to distinguish between real samples and forged samples.

[0029] In this embodiment, in step S102, He initialization or Xavier is used to initialize the parameters of the generator to avoid gradient disappearance / explosion. The parameters of the discriminator are initialized similarly to the generator, but the last layer can be initialized to a lower weight to prevent the initial discriminant ability from being too strong.

[0030] In this embodiment, in step S103, the generator is trained by a self-game mechanism to obtain an optimized generator, including: the generator is trained by a self-game mechanism to obtain an optimized generator, including: constructing a generator version pool corresponding to the generator and a discriminator version pool corresponding to the discriminator; randomly selecting a historical version generator from the generator version pool, and using the current generator and the selected historical version generator to generate forged first industrial negative sample data and forged second industrial negative sample data; selecting a discriminator of any version from the discriminator version pool, and obtaining real negative sample data, and generating a first evaluation result corresponding to the current generator and a first evaluation result corresponding to the selected industrial negative sample data based on the real negative sample data, the forged first industrial negative sample data, and the forged second industrial negative sample data. The second evaluation result corresponding to the historical version generator; calculate the reward value of the current generator and the reward value of the historical version generator according to the first evaluation result and the second evaluation result; adjust the hyperparameters of the current generator according to the reward value of the current generator and the reward value of the historical version generator, and when the reward value of the current generator is greater than the reward value of the historical version generator, calculate the acceptance probability of the current generator, and when the acceptance probability of the current generator is greater than the preset generator acceptance probability value, put the current generator into the generator version pool; according to the adjusted hyperparameters, use the self-game mechanism to repeatedly train the current generator until the current generator reaches the preset convergence condition and completes the training of the current generator; select the latest version generator from the generator version pool as the optimized generator.

[0031] Specifically, a historical version generator is randomly selected from a generator version pool, and the current generator and the selected historical version generator are used to generate forged first industrial negative sample data and forged second industrial negative sample data, including: obtaining a random noise distribution, extracting samples from the random noise distribution, and inputting the extracted samples into the current generator to generate forged first industrial negative sample data; randomly selecting a historical version generator from the generator version pool, and inputting the extracted samples into the selected historical version generator to generate forged second industrial negative sample data.

[0032] Specifically, any version of the discriminator is selected from the discriminator version pool, and real negative sample data is obtained, and a first evaluation result corresponding to the current generator and a second evaluation result corresponding to the selected historical version generator are generated based on the real negative sample data, the forged first industrial negative sample data, and the forged second industrial negative sample data, including: selecting any version of the discriminator from the discriminator version pool, and obtaining real negative sample data, inputting the forged first industrial negative sample data and the real negative sample data into the selected discriminator to obtain the first evaluation result; inputting the forged second industrial negative sample data and the real negative sample data into the selected discriminator to obtain the second evaluation result.

[0033] In this embodiment, the generator is regarded as a generating agent, defined as , considering the discriminator as an evaluation agent, defined as , constructing the generator version pool corresponding to the generator and the discriminator version pool corresponding to the discriminator are respectively expressed as: ; .

[0034] In the formula, Represents the generator version pool, represents the discriminator version pool, Represents versions of the agent.

[0035] Understandably, the objective function of the GAN network is expressed as: .

[0036] In the formula, Indicates value, Represents the distribution of real negative sample data from industry Extracting real industrial negative samples , Represents the distribution of industrial noise Extract random noise from , represents the mathematical expectation, represents the probability that the discriminator judges that the real industrial negative sample is true, Represents that the generator uses random noise Generate fake industrial negative samples, represents the probability that the discriminator judges the forged industrial negative sample to be true, To optimize the model.

[0037] For industrial data, this embodiment abstracts the adversarial strategy in the GAN network into a Markov decision process (MDP) based on the reinforcement learning framework to promote the realization of version diversity. On this basis, the objective function of the GAN network is reconstructed, specifically expressed as: ; .

[0038] It means that the generator G has parameters When using random noise Generate fake industrial negative samples, that is, the generator G has parameters When the random noise Reward value converted to industrial negative samples , and the expectation of reward , Indicates that the parameter is The discriminator, Indicates that the parameter is The discriminator judges that the generator G has parameters The probability that the generated fake industrial negative samples are real.

[0039] In this embodiment, during the training process, the policy gradient theory is used to optimize the generator, aiming to improve the authenticity level of the generated industrial negative sample data: .

[0040] in, represents the expected gradient of the generator reward, Representation Generator In the parameter Random Noise The probability of generating fake industrial negative samples, Indicates the calculation of the parameters The gradient of , represents the historical version pool of the discriminator, Indicates extracting a discriminator from the version pool. represents the output of the extracted discriminator obtained using the Q-value function.

[0041] In this embodiment, when a historical version generator is randomly selected from the generator version pool, the selection probability of the current generator facing different opponents is: .

[0042] in, Represents a selection generator The probability of being an opponent, express The score of , T represents the temperature parameter, Indicates that the scores of all generators in the version pool are exponentially transformed. It means that the scores of all generators in the version pool are transformed exponentially, and then these exponential scores are summed up and normalized using the sum as the denominator.

[0043] Furthermore, this embodiment can also introduce a reward adjustment mechanism, which can calculate the deviation of a single generator from the average reward of the generator set in the version pool, that is, the relative reward value, and adaptively adjust the reward function according to the relative reward value. It is expressed as: .

[0044] In the formula, represents the original reward score, Represents the average reward value of all generators in the version pool.

[0045] Assuming the reward function is a simple linear reward function, .

[0046] Based on the calculated relative reward value , the reward function can be adaptively adjusted. If it is positive, it means that the current generator performs well. In subsequent training, we can appropriately increase the sensitivity of its reward to encourage the current generator to continue to optimize in the current direction to further improve the quality of generated samples. For example, we can increase the coefficient For example, let ,in is a positive constant used to control the magnitude of the adjustment. The adjusted reward function becomes , so that in subsequent training, the reward sensitivity of the generator will be appropriately increased.

[0047] like If it is negative, it means that the current generator performs poorly. In this case, the reward function needs to be adjusted to focus more on the improvement direction of the current generator. For example, the coefficient For example, ,in is a negative constant used to control the magnitude of the adjustment. The adjusted reward function becomes , making the generator more robust in adjusting parameters during training.

[0048] In this embodiment, when the reward value of the current generator is greater than the reward value of the historical version generator, the acceptance probability of the current generator is calculated, thereby realizing efficient iterative update of the generator version pool. It is expressed as: .

[0049] in, Represents the performance score of the current generator, represents the average performance score of the generator version pool, Represents the exponential function, that is, the performance score of the current generator Greater than average When , the exponential part is positive, the acceptance probability P>1; otherwise, the exponential part is negative, and the acceptance probability value is constrained to a closed real number interval from 0 to 1 (including the endpoints). represents the temperature parameter, represents a minimization operation, ensuring that the upper bound of the calculated acceptance probability is strictly limited to 1.

[0050] In this embodiment, the preset generator acceptance probability value is 0.7-0.9, for example 0.8. When the acceptance probability of the current generator is greater than the preset generator acceptance probability value, the current generator is placed in the generator version pool.

[0051] In this embodiment, the preset convergence conditions include a first condition and a second condition. The first condition is that the reward function of the current generator reaches the global optimal solution; the second condition is that during the update process, the transition probability between the two versions satisfies symmetry, that is, the product of the forward transition probability and the probability of occurrence of version i is equal to the product of the reverse transition probability and the probability of occurrence of version j.

[0052] Regarding the first condition, when the reward function of the generator reaches the global optimal solution, it means that under the current parameter configuration, the distribution difference between the industrial negative samples constructed by the generator and the real negative samples has been minimized, and further adjusting the parameters of the generator can hardly bring significant reward improvement, that is, the expected modulus of the gradient vector of the reward function with respect to the generator parameters is infinitely close to zero: .

[0053] in, represents the square of the norm, It means that when time t approaches infinity, the limit value approaches 0. represents the gradient of the generator reward parameter at time t, and E represents the mathematical expectation.

[0054] Regarding the second condition, in this embodiment, a careful balance condition is adopted. The industrial negative samples constructed by the generator and the real negative samples are statistically distinguished through the conversion probability between the two versions i and j during the version update process of the generator. When this condition is met, the similarity reaches a high level: .

[0055] In the formula, represents the probability of generator version i being converted to generator version j, represents the probability of occurrence of generator version i, represents the probability of generator version j being converted to generator version i, and represents the probability of occurrence of generator version j.

[0056] When the algorithm fails to reach the above preset convergence criteria, it indicates that the current state of the model has not yet reached the ideal optimal configuration, and it is necessary to continue the iterative process to optimize and improve the model performance. When the algorithm meets the above conditions, it is considered to have converged.

[0057] In this embodiment, step S103 also includes constructing an experience replay buffer area for storing the industrial negative sample data generated by the current generator during the training process and the first evaluation result and the second evaluation result generated by the discriminator.

[0058] In this embodiment, in step S104, in this embodiment, a temporal difference learning algorithm is used to train the current discriminator to obtain an optimized discriminator, in order to improve its discrimination ability and learning efficiency, so as to achieve the purpose of more accurately distinguishing true and false industrial negative samples.

[0059] The discriminator is trained using a temporal difference learning algorithm, that is, the processing of the sample by the discriminator is regarded as a reinforcement learning process. The state can be the characteristics of the input sample, the action can be the discriminator's judgment on the sample (judged as a real sample or a generated sample), and the reward is based on the accuracy of the discriminator's judgment. The discriminator uses the temporal difference learning algorithm to update the state value function and judgment strategy based on the reward obtained from the current sample judgment and the value estimate of the next sample judgment state, so as to continuously adjust to improve the judgment accuracy and better distinguish between real industrial negative samples and samples generated by the generator.

[0060] When initializing the parameters of the discriminator, it includes initializing the weights and biases of the discriminator.

[0061] The current discriminator is trained using a temporal difference learning algorithm to obtain an optimized discriminator, specifically including: collecting real industrial negative sample data and forged industrial negative sample data generated by the generator, and constructing a discriminator training sample set; at each time step, a sample is selected from the discriminator training sample set as the current input sample, the current input sample is input into the current discriminator, the current sample evaluation result output by the current discriminator is obtained, and the instant reward is calculated based on the current sample evaluation result and the true label of the current sample, and a sample is selected as the next state sample, and the current input sample is input into the current discriminator. , obtain the next state sample evaluation result output by the current discriminator; calculate the temporal difference error according to the current sample evaluation result, the next state sample evaluation result and the immediate reward; update the loss function of the discriminator according to the temporal difference error, and calculate the gradient of the updated loss function to the discriminator parameters, and adjust the weights and bias of the initialized discriminator based on the calculated gradient; repeatedly train the discriminator, and when the performance indicators of the discriminator (such as accuracy, recall rate, etc.) reach the preset threshold, or the change of the state value function is less than the threshold state threshold, complete the training of the discriminator and obtain the optimized discriminator.

[0062] In this embodiment, the timing differential error It is expressed as: .

[0063] In the formula, Indicates immediate reward, represents the current input sample, represents the next state sample, Represents the next state sample evaluation result output by the current discriminator, Represents the current sample evaluation result output by the current discriminator, represents the discount factor, It is usually set close to 1, such as 0.99, to balance current and future rewards.

[0064] In this embodiment, for real industrial negative samples, , for forged industrial negative samples, ,in, represents the evaluation results of real industrial negative samples, Represents the evaluation results of forged industrial negative samples.

[0065] When the temporal difference error is greater than 0, it means that the actual reward of the current state of the discriminator (immediate reward plus the discounted value of the subsequent state) is higher than previously estimated. At this time, the weight of the item related to the current state in the loss function can be appropriately increased to make the model pay more attention to the performance of the discriminator in the current state. For example, if a real sample generates a positive temporal difference error in the current state, the weight of this item in the loss function can be increased to encourage the discriminator to further optimize its ability to judge this type of real sample, so that it can more accurately identify such samples in the future.

[0066] When the time series difference error is less than 0, it means that the actual return of the current state is lower than the previous estimate. At this time, the weight of the items related to the current state in the loss function can be reduced to reduce the model's dependence on the current poor judgment state. For example, if a forged sample produces a negative time series difference error in the current state, the weight of the corresponding item in the loss function can be reduced to prevent the discriminator from being overly affected by the current wrong judgment and guide it to re-learn the characteristics of this type of sample.

[0067] In this embodiment, if the current discriminator correctly judges the authenticity of the sample, a positive reward is given; if the judgment is wrong, a negative reward is given. The size of the reward can be set according to the specific situation to encourage the discriminator to make more accurate judgments.

[0068] In this embodiment, the loss function of the discriminator is It is expressed as: .

[0069] In the formula, Indicates that the real industrial negative samples are input into the discriminator to calculate the log likelihood. Represents the historical version pool of the generator, Represents the distribution of real negative sample data from industry Extracting real industrial negative samples , That is, extract any version of the generator from the version pool, Represents the distribution of industrial noise Extract random noise from , represents the mathematical expectation, It represents the probability that the discriminator judges that the forged industrial negative sample generated by the generator G is true, Indicates that the false industrial negative samples constructed by the extracted generator are input into the discriminator and calculated (1-likelihood).

[0070] In this embodiment, the minimized expectation of the current discriminator refers to the expectation formed based on the loss function of the discriminator with the goal of minimizing this loss function. Therefore, the parameter is The minimum expectation of the current discriminator And the discriminator parameter update formula can be expressed as: ; .

[0071] in, , Respectively represent the parameters of the current discriminator at time t and time t+1, Represents the learning rate, which is used to control the update step size. represents the gradient of the loss function with respect to the discriminator parameters, Indicates that the parameter is The current discriminator judgment parameter is the probability that the forged industrial negative sample generated by the generator G is true, Indicates that the real industrial negative sample input parameter is The current discriminator of calculates the log-likelihood, The false industrial negative sample input parameter constructed by the extracted generator is The current discriminator of (1-likelihood).

[0072] In this embodiment, the loss function is used to evaluate and calculate the acceptance probability of the current discriminator. , based on this, the iterative update of the discriminator version library is realized: .

[0073] in, That is, the loss function of the current discriminator version, represents the average loss function of the discriminator version pool, and T represents the temperature parameter.

[0074] In this embodiment, the preset discriminator acceptance probability value is 0.7-0.9, for example, 0.8. When the acceptance probability of the current discriminator is greater than the preset discriminator acceptance probability value, the current discriminator is placed in the generator version pool.

[0075] The present embodiment provides a method for constructing an industrial negative sample generation model. The method constructs a GAN network including a generator and a discriminator, and adopts a self-game mechanism to train the generator, so that the generator can continuously explore better generation strategies in the confrontation with different versions of itself, which can effectively avoid falling into local optimality, generate more diverse and authentic industrial negative samples, and improve the performance and generalization ability of the generator. The current discriminator is trained using a temporal difference learning algorithm. This online learning method enables the discriminator to quickly adapt to changes in new sample features, combines short-term and long-term rewards, learns sample features from a macro perspective, improves the recognition ability of complex industrial negative sample patterns, and enhances the stability and robustness of the model. Finally, the optimized generator and the optimized discriminator are integrated. The obtained industrial negative sample generation model can generate negative samples that are highly similar to real industrial negative samples, effectively solve the problem of few or difficult to obtain negative samples in industrial data, supplement and enhance the data, and thus improve the performance of data-driven industrial applications, making them more robust and accurate when processing industrial data.

[0076] The above describes the method for constructing an industrial negative sample generation model in an embodiment of the present invention. The following describes the device in an embodiment of the present invention. Figure 2 , the implementation of the industrial negative sample generation model construction device in the embodiment of the present invention includes: A construction module 201 is used to construct a GAN network, where the GAN network includes a generator and a discriminator; Initialization module 202, used to initialize the parameters of the generator and the parameters of the discriminator to obtain the current generator and the current discriminator; A first training module 203 is used to train the current generator using a self-game mechanism to obtain an optimized generator; A second training module 204 is used to train the current discriminator using a temporal difference learning algorithm to obtain an optimized discriminator; The integration module 205 is used to integrate the optimization generator and the optimization discriminator to obtain an industrial negative sample generation model.

[0077] In this embodiment, by constructing a GAN network including a generator and a discriminator, and adopting a self-game mechanism to train the generator, the generator can continuously explore better generation strategies in the confrontation with different versions of itself, which can effectively avoid falling into local optimality, generate more diverse and authentic industrial negative samples, and improve the performance and generalization ability of the generator. The current discriminator is trained using a temporal difference learning algorithm. This online learning method enables the discriminator to quickly adapt to changes in new sample features, combines short-term and long-term rewards, learns sample features from a macro perspective, improves the recognition ability of complex industrial negative sample patterns, and enhances the stability and robustness of the model. Finally, the optimized generator and the optimized discriminator are fused, and the obtained industrial negative sample generation model can generate negative samples that are highly similar to real industrial negative samples, effectively solving the problem of few or difficult to obtain negative samples in industrial data, supplementing and enhancing the data, and then improving the performance of data-driven industrial applications, making them more robust and accurate when processing industrial data.

[0078] Figure 2 The structure of the industrial negative sample generation model construction device shown does not constitute a limitation on the industrial negative sample generation model construction device, and can implement the steps of the industrial negative sample generation model construction method provided by the above-mentioned method embodiments.

[0079] above Figure 2 The industrial negative sample generation model construction device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The industrial negative sample generation model construction device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0080] Figure 3 3 is a schematic diagram of the structure of an industrial negative sample generation model building device provided by an embodiment of the present invention. The device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium on the device 300.

[0081] The device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc.

[0082] An embodiment of the present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for constructing an industrial negative sample generation model.

[0083] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0085] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing an industrial negative sample generation model, characterized in that: The industrial negative sample generation model construction method comprises: Build a GAN network, which includes a generator and a discriminator; Initialize the parameters of the generator and the discriminator to obtain the current generator and the current discriminator; The current generator is trained using a self-game mechanism to obtain an optimized generator; Using a temporal difference learning algorithm to train the current discriminator to obtain an optimized discriminator; The optimized generator and the optimized discriminator are integrated to obtain an industrial negative sample generation model.

2. The method for constructing an industrial negative sample generation model according to claim 1, characterized in that: The self-game mechanism is used to train the generator to obtain an optimized generator, including: Build a generator version pool corresponding to the generator and a discriminator version pool corresponding to the discriminator; Randomly select a historical version generator from the generator version pool, and use the current generator and the selected historical version generator to generate forged first industrial negative sample data and forged second industrial negative sample data; Select any version of the discriminator from the discriminator version pool, obtain real negative sample data, and generate a first evaluation result corresponding to the current generator and a second evaluation result corresponding to the selected historical version generator based on the real negative sample data, the forged first industrial negative sample data, and the forged second industrial negative sample data; Calculate the reward value of the current generator and the reward value of the historical version generator according to the first evaluation result and the second evaluation result; Adjust the hyperparameters of the current generator according to the reward value of the current generator and the reward value of the historical version generator, and when the reward value of the current generator is greater than the reward value of the historical version generator, calculate the acceptance probability of the current generator, and when the acceptance probability of the current generator is greater than the preset generator acceptance probability value, put the current generator into the generator version pool; According to the adjusted hyperparameters, the current generator is repeatedly trained using a self-game mechanism until the current generator reaches the preset convergence condition, thus completing the training of the current generator; Select the latest version of the generator from the generator version pool as the optimized generator.

3. The method for constructing an industrial negative sample generation model according to claim 2, characterized in that: The method randomly selects a historical version generator from a generator version pool, and uses the current generator and the selected historical version generator to generate forged first industrial negative sample data and forged second industrial negative sample data, including: Obtaining a random noise distribution, extracting samples from the random noise distribution, and inputting the extracted samples into the current generator to generate forged first industrial negative sample data; A historical version generator is randomly selected from the generator version pool, and the extracted samples are input into the selected historical version generator to generate forged second industry negative sample data.

4. The method for constructing an industrial negative sample generation model according to claim 3, characterized in that: The method comprises: selecting any version of a discriminator from the discriminator version pool, obtaining real negative sample data, and generating a first evaluation result corresponding to the current generator and a second evaluation result corresponding to the selected historical version generator based on the real negative sample data, the forged first industrial negative sample data, and the forged second industrial negative sample data, including: Selecting any version of a discriminator from the discriminator version pool, and obtaining real negative sample data, inputting the forged first industrial negative sample data and the real negative sample data into the selected discriminator to obtain a first evaluation result; The forged second industrial negative sample data and the real negative sample data are input into the selected discriminator to obtain a second evaluation result.

5. The method for constructing an industrial negative sample generation model according to claim 2, characterized in that: The preset convergence conditions include a first condition and a second condition. The first condition is that the reward function of the current generator reaches the global optimal solution; the second condition is that during the update process, the transition probability between the two versions satisfies symmetry.

6. The method for constructing an industrial negative sample generation model according to claim 2, characterized in that: The method of constructing a generator version pool corresponding to the generator and a discriminator version pool corresponding to the discriminator also includes constructing an experience replay buffer area, which is used to store the industrial negative sample data generated by the current generator during the training process and the first evaluation result and the second evaluation result generated by the discriminator.

7. The method for constructing an industrial negative sample generation model according to claim 2, characterized in that: In the process of training the current discriminator using the temporal difference learning algorithm to obtain the optimized discriminator, the loss function is used to evaluate and calculate the acceptance probability of the current discriminator, and when the acceptance probability of the current discriminator is greater than the preset discriminator acceptance probability value, the current discriminator is placed in the discriminator version pool.

8. An industrial negative sample generation model construction device, characterized in that: include: The building module is used to build a GAN network, which includes a generator and a discriminator; The initialization module is used to initialize the parameters of the generator and the discriminator to obtain the current generator and the current discriminator; A first training module is used to train the current generator using a self-game mechanism to obtain an optimized generator; A second training module is used to train the current discriminator using a temporal difference learning algorithm to obtain an optimized discriminator; The integration module is used to integrate the optimization generator and the optimization discriminator to obtain an industrial negative sample generation model.

9. An industrial negative sample generation model construction device, characterized in that: comprising a memory and at least one processor, wherein the memory has computer-readable instructions stored therein; The at least one processor calls the computer-readable instructions in the memory to execute each step of the industrial negative sample generation model construction method as described in any one of claims 1-7.

10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the method for building an industrial negative sample generation model are implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Network printing negative sample generation method based on machine learning and related equipment

    CN121456483A

  • A network printing negative sample generation method based on machine learning and related equipment

    CN121456483B