Fast migration method of strategy in uncertain scene based on neural network optimization
By analyzing the characteristics of decision-making tasks in multiple known scenarios, constructing general-purpose feature data for the environment and optimizing neural network parameters, the problem of low migration training efficiency of the source task model in uncertain scenarios is solved, and rapid adaptation to new environments is achieved. Effect.
Patent Information
- Application Number
- CN202411155591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, when facing uncertain scenarios in the task environment, the source task model lacks a holistic analysis of the task environment, resulting in a lack of adaptability between the source task model and the task environment, resulting in long transfer training and learning time, and poor migration performance. Low efficiency.
By acquiring and analyzing the characteristics of decision-making tasks in multiple known scenarios, we construct environmental general feature data, adjust neural network parameters, use the environmental general policy model for transfer learning, and evaluate the model's general ability through dual test sets to optimize neural network network parameters to improve model adaptability.
It significantly shortens the model's adaptation time to new environments, improves migration efficiency, and improves the model's adaptability and robustness in uncertain scenarios.
Smart Images

Figure CN118674012A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of model migration, and in particular to a method for rapid migration of strategies in uncertain scenarios based on neural network optimization. Background Art
[0002] In traditional machine learning methods, whenever a new task is encountered, it is usually necessary to re-collect data, design features, and train the model from scratch. This process is both time-consuming and resource-intensive. Model transfer allows us to use models that have been trained on similar tasks and quickly adapt to new tasks through fine-tuning or feature extraction, thereby greatly shortening the training time. The source task model in transfer learning has learned a lot of prior knowledge, which is valuable for the target task. Through transfer learning, we can apply this prior knowledge to the target task, thereby improving the performance of the model on the new task.
[0003] The source task model is the basis of transfer learning. By reasonably constructing the source task model, the model can be quickly and effectively fine-tuned and adapted in uncertain scenarios. In the existing technology, the training of the source task model lacks an overall analysis of the task environment, and the source task model is not adaptable to the task environment. As a result, the source task model takes a lot of time to train and learn the transfer of uncertain scenarios in the task environment, and the efficiency of model migration is low. Summary of the invention
[0004] In order to solve the above technical problems, a method for rapid migration of strategies in uncertain scenarios based on neural network optimization is provided. This technical solution solves the problems in the above-mentioned prior art that, in the training of the source task model, there is a lack of overall analysis of the task environment, the source task model is not adaptable to the task environment, and as a result, a lot of time is required for the source task model to be trained and learned in the face of uncertainty scenarios in the task environment, and the efficiency of model migration is low.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is: The rapid migration method of strategies in uncertain scenarios based on neural network optimization includes: Obtain decision-making tasks for all known scenarios; Based on the task features of decision-making tasks in all known scenarios, a set of task features of decision-making tasks in each known scenario is constructed; Based on the decision task log, determine the number of times the decision task is executed in each known scenario; Determine the general feature data of the environment based on the task feature set of the decision task in each known scenario and the number of executions of the decision task in the known scenario; Adjust the neural network parameters of the environment general strategy model based on the environment general feature data; The environment general-purpose strategy model is obtained by training the neural network parameters of the adjusted environment general-purpose strategy model; The environment general policy model migration is called to apply to the decision-making task in the new scenario, and transfer reinforcement learning is performed based on the execution of the decision-making task in the new scenario using the environment general policy model migration to obtain the scenario decision task model of the decision-making task in the new scenario.
[0006] Preferably, the determining of the general environmental feature data based on the task feature set of the decision-making task in each known scenario and the number of executions of the decision-making task in the known scenario specifically includes: The task feature sets of all decision-making tasks in known scenarios are combined to obtain the total task feature set, which is denoted as A. ,in, is the i-th task feature, is the total number of elements in the total set of task features; Based on the execution times of decision-making tasks in known scenarios, the benchmark execution times of each task feature in the total set of task features is determined, and the benchmark execution times set B is constructed. ,in, is the number of benchmark executions of the i-th task feature, Equal to all including The total number of executions of decision-making tasks in known scenarios; Based on the benchmark execution count set B, the training focus of each task feature is obtained and the training focus set C is constructed. ; in, ; The training focus of the i-th task feature; The total set of task features and the training focus set are encapsulated as general-purpose feature data of the environment.
[0007] Preferably, adjusting the neural network parameters of the environment general-purpose strategy model based on the environment general-purpose feature data specifically includes: Set the total number of training sets for the general-purpose strategy model of the environment, denoted as N; Determine the total number of decision tasks in all known scenarios, denoted as h; Randomly select from the historical execution events of the decision task in each known scenario The execution results are used as the training set of the neural network; Randomly select from the historical execution events of the decision task in each known scenario The execution results that are different from the training set are used as the first test set of the neural network; Based on the general feature data of the environment, a second test set is determined.
[0008] Preferably, the determining the second test set based on the general environmental feature data specifically includes: Based on the general feature data of the environment, construct generation constraints for the second test set; Based on the generation constraints of the second test set, select from the historical execution events of the decision-making task in all known scenarios The execution results are used as the second test set; The generation restriction conditions of the second test set are specifically: ; The decision tasks corresponding to the execution results in the second test set include The number of historical execution events.
[0009] Preferably, the training of the neural network parameters of the adjusted environment general-purpose strategy model to obtain the environment general-purpose strategy model specifically includes: Based on the properties of the environment general policy model, the loss value function in the training process of the environment general policy model is determined, which is recorded as ; The regularized loss value function in the training process of the general strategy model based on the construction environment is recorded as ; Among them, the regularized loss value function is specifically: ; in, is the coefficient of the L1 regularization term, is the coefficient of the L2 regularization term, is the jth parameter of the neural network; By adjusting the regularization loss function and Get several different regularized loss value functions; Based on each regularized loss value function, several preliminary environment general policy models are trained; Calculate the comprehensive loss value of each preliminary environment general strategy model on the first test set and the second test set; The preliminary environment general-purpose strategy model with the smallest comprehensive loss value is selected as the final environment general-purpose strategy model.
[0010] Preferably, the training of a plurality of preliminary environment general-purpose strategy models based on each regularized loss value function specifically includes: S1. Input the input features of the training set into the neural network, and the neural network generates corresponding prediction values based on the input features of the training set; S2. Based on the predicted value and the true value of the training set, the loss value of the neural network for the training set is calculated through the regularized loss value function; S3. Determine whether the number of iterations of the neural network is greater than a threshold. If so, output the trained neural network parameters to obtain a preliminary environment general strategy model. If not, based on the loss value of the neural network for the training set, calculate the gradient of the loss function for each parameter in the neural network through the back propagation algorithm, and update the parameters in the neural network according to the gradient information of each parameter, and return to step S1.
[0011] Preferably, the regularization loss function is adjusted and , we get several different regularized loss value functions, including: set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; Will The search value set and The elements in the search value set are combined in any pair to obtain several groups Search value combinations; based on Search value combinations and generate corresponding regularized loss value functions.
[0012] Preferably, the calculating of the comprehensive loss value of each preliminary environment universal strategy model on the first test set and the second test set specifically includes: Inputting the input features of the first test set and the second test set into the preliminary environment general-purpose strategy model respectively, obtaining the preliminary environment general-purpose strategy model prediction value corresponding to the first test set and the preliminary environment general-purpose strategy model prediction value corresponding to the second test set; Based on the true value of the first test set and the true value of the second test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the first test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the second test set, the loss value of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set are calculated by a loss value function; Based on the loss of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set, the comprehensive loss value of the preliminary environment general-purpose strategy model on the first test set and the second test set is calculated by using a comprehensive loss formula; The expression of the comprehensive loss formula is: ; In the formula, is the comprehensive loss value of the general strategy model in the preliminary environment on the first test set and the second test set, is the loss value of the general strategy model in the preliminary environment for the first test set, is the loss value of the preliminary environment general strategy model for the second test set, is the environmental emphasis coefficient, and the value range of the environmental emphasis coefficient is .
[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. By comprehensively analyzing the task characteristics of multiple different application scenarios, this method can accurately capture the comprehensive task characteristics of the execution environment. This capability enables the constructed model to perform well not only in the training environment, but also to show high adaptability in a wider range of practical environments; 2. Combining the first test set and the second test set, this strategy can more comprehensively and meticulously evaluate the generalization ability of the environment-generalized strategy model and its ability to cope with specific environments. This dual verification mechanism helps to improve the reliability and robustness of the model; 3. When faced with uncertain scenarios, traditional transfer learning methods often require a lot of time and data to adapt to the new environment. However, this method can complete the model's adaptation to the new environment in a relatively short time through the optimization of the neural network and the evaluation of the double test set, significantly shortening the time of transfer learning and improving the efficiency of transfer. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of a method for rapid migration of strategies in uncertain scenarios based on neural network optimization proposed by the present invention; Figure 2 A flow chart of the method for determining general environmental characteristic data proposed by the present invention; Figure 3 A flow chart of the method for adjusting the neural network parameters of the environment general strategy model proposed by the present invention; Figure 4 A flow chart of a method for determining a second test set based on general-purpose feature data of an environment proposed by the present invention; Figure 5 A flow chart of a method for obtaining an environment general-purpose strategy model by training neural network parameters based on the adjusted environment general-purpose strategy model proposed by the present invention; Figure 6 A flow chart of a method proposed by the present invention for obtaining a plurality of preliminary environment general-purpose strategy models based on training of each regularized loss value function; Figure 7 The present invention proposes to adjust the regularization loss value function and , a flowchart of the method for obtaining several different regularized loss value functions; Figure 8 A flow chart of a method for calculating the comprehensive loss value of each preliminary environment general-purpose strategy model on the first test set and the second test set proposed by the present invention; Fig. 9 It is a schematic diagram of the structure of the electronic device of the present invention; Fig.10 It is a schematic diagram of the computer-readable storage medium structure of the present invention. DETAILED DESCRIPTION
[0015] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0016] Reference Figure 1 As shown in the figure, the rapid migration method of strategies in uncertain scenarios based on neural network optimization includes: Obtain decision-making tasks for all known scenarios; Based on the task features of decision-making tasks in all known scenarios, a set of task features of decision-making tasks in each known scenario is constructed; Based on the decision task log, determine the number of times the decision task is executed in each known scenario; Determine the general feature data of the environment based on the task feature set of the decision task in each known scenario and the number of executions of the decision task in the known scenario; Adjust the neural network parameters of the environment general strategy model based on the environment general feature data; The environment general-purpose strategy model is obtained by training the neural network parameters of the adjusted environment general-purpose strategy model; The environment general policy model migration is called to apply to the decision-making task in the new scenario, and transfer reinforcement learning is performed based on the execution of the decision-making task in the new scenario using the environment general policy model migration to obtain the scenario decision task model of the decision-making task in the new scenario.
[0017] This solution comprehensively analyzes the comprehensive task characteristics of the execution environment through task characteristics in multiple different application scenarios in the actual execution environment of the task, and constructs a second test set based on the comprehensive task characteristics of the execution environment. When training the environment general policy model, the first test set and the second test set are used to comprehensively evaluate the general capabilities and specific capabilities of the environment general policy model in the execution environment, which greatly improves the adaptability of the environment general policy model to the actual execution environment of the task, and improves the ability of the environment general policy model to cope with uncertain scenarios in the task environment, thereby shortening the time for transfer learning of the high-environment general policy model when facing uncertain scenarios in the task environment, and improving the migration efficiency.
[0018] Reference Figure 2 As shown, the task feature set of the decision-making task in each known scenario and the number of executions of the decision-making task in the known scenario are used to determine the general feature data of the environment, which specifically includes: The task feature sets of all decision-making tasks in known scenarios are combined to obtain the total task feature set, which is denoted as A. ,in, is the i-th task feature, is the total number of elements in the total set of task features; Based on the execution times of decision-making tasks in known scenarios, the benchmark execution times of each task feature in the total set of task features is determined, and the benchmark execution times set B is constructed. ,in, is the number of benchmark executions of the i-th task feature, Equal to all including The total number of executions of decision-making tasks in known scenarios; Based on the benchmark execution count set B, the training focus of each task feature is obtained and the training focus set C is constructed. ; in, ; The training focus of the i-th task feature; The total set of task features and the training focus set are encapsulated as general-purpose feature data of the environment.
[0019] It is understandable that different application scenarios in the same task execution environment usually have similar task characteristics. Therefore, this solution summarizes the execution times of decision-making tasks in all known scenarios under the task execution environment and analyzes them. By analyzing the proportion of task characteristics of decision-making tasks in known scenarios, we can obtain the versatility index of different task characteristics in the task execution environment in different scenarios. The greater the training emphasis of task characteristics, the greater the execution proportion of decision-making tasks in known scenarios. The training emphasis set constructed can effectively reflect the emphasis on different task characteristics in the current application environment.
[0020] Reference Figure 3 As shown, the neural network parameters of the environment general-purpose strategy model are adjusted based on the environment general-purpose feature data, specifically including: Set the total number of training sets for the general-purpose strategy model of the environment, denoted as N; Determine the total number of decision tasks in all known scenarios, denoted as h; Randomly select from the historical execution events of the decision task in each known scenario The execution results are used as the training set of the neural network; Randomly select from the historical execution events of the decision task in each known scenario The execution results that are different from the training set are used as the first test set of the neural network; Based on the general feature data of the environment, a second test set is determined.
[0021] Reference Figure 4 As shown, the determining of the second test set based on the general-purpose feature data of the environment specifically includes: Based on the general feature data of the environment, construct generation constraints for the second test set; Based on the generation constraints of the second test set, select from the historical execution events of the decision-making task in all known scenarios The execution results are used as the second test set; The generation restriction conditions of the second test set are specifically: ; The decision tasks corresponding to the execution results in the second test set include The number of historical execution events.
[0022] In this solution, the training set and the first test set are obtained based on the average collection of historical execution events of decision-making tasks in all known scenarios, ensuring that the training process of the environmental general-purpose strategy model contains more diversity and complexity, which helps the environmental general-purpose strategy model to learn more general feature representations and improve the general ability of the trained environmental general-purpose strategy model for different scenarios. Based on the emphasis on different task features in the environment, the second test set is collected in a targeted manner to ensure that the environmental general-purpose strategy model can more accurately respond to the uncertain scenarios of the current application environment.
[0023] Reference Figure 5 As shown, the training of the neural network parameters of the environment general-purpose strategy model based on the adjustment specifically includes: Based on the properties of the environment general policy model, the loss value function in the training process of the environment general policy model is determined, which is recorded as ; The regularized loss value function in the training process of the general strategy model based on the construction environment is recorded as ; Among them, the regularized loss value function is specifically: ; in, is the coefficient of the L1 regularization term, is the coefficient of the L2 regularization term, is the jth parameter of the neural network; By adjusting the regularization loss function and Get several different regularized loss value functions; Based on each regularized loss value function, several preliminary environment general policy models are trained; Calculate the comprehensive loss value of each preliminary environment general strategy model on the first test set and the second test set; The preliminary environment general-purpose strategy model with the smallest comprehensive loss value is selected as the final environment general-purpose strategy model.
[0024] In this solution, by introducing regularization terms, the complexity of the model is limited, the model is helped to overcome the overfitting problem, and the accuracy of the model on unknown data is improved. It helps to eliminate noise and errors in the data, reduce unnecessary parameters, make the model more stable, improve the model's ability to cope with unknown scenarios, and improve the versatility of the model.
[0025] Reference Figure 6 As shown, the several preliminary environment general strategy models obtained by training based on each regularized loss value function specifically include: S1. Input the input features of the training set into the neural network, and the neural network generates corresponding prediction values based on the input features of the training set; S2. Based on the predicted value and the true value of the training set, the loss value of the neural network for the training set is calculated through the regularized loss value function; S3. Determine whether the number of iterations of the neural network is greater than a threshold. If so, output the trained neural network parameters to obtain a preliminary environment general strategy model. If not, based on the loss value of the neural network for the training set, calculate the gradient of the loss function for each parameter in the neural network through the back propagation algorithm, and update the parameters in the neural network according to the gradient information of each parameter, and return to step S1.
[0026] Reference Figure 7 As shown, by adjusting the regularization loss function and Several different regularized loss value functions are obtained, including: set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; Will The search value set and The elements in the search value set are combined in any pair to obtain several groups Search value combinations; based on Search value combinations and generate corresponding regularized loss value functions.
[0027] In the regularized loss function, the regularization coefficient is added to the loss function as a regularization term. This regularization term is a constraint or penalty on the model parameters, which aims to reduce the complexity of the model. Therefore, the size of the regularization coefficient will directly affect the value of the loss function. When the regularization coefficient is small, the model complexity is relatively high, and overfitting may be more likely to occur. At this time, the loss value may be very low on the training set, but may be high on the validation set or test set. As the regularization coefficient increases, the model complexity gradually decreases and the overfitting phenomenon is alleviated, but it may also cause the model to be underfitted, and the loss value may be high on both the training set and the validation set / test set. Therefore, this solution uses a grid search method to determine different The search value combination faces the combined loss value on the first test set and the second test set to determine the optimal Search for value combinations and then train the optimal environment-wide strategy model.
[0028] Reference Figure 8 As shown, the calculation of the comprehensive loss value of each preliminary environment general strategy model on the first test set and the second test set specifically includes: Inputting the input features of the first test set and the second test set into the preliminary environment general-purpose strategy model respectively, obtaining the preliminary environment general-purpose strategy model prediction value corresponding to the first test set and the preliminary environment general-purpose strategy model prediction value corresponding to the second test set; Based on the true value of the first test set and the true value of the second test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the first test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the second test set, the loss value of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set are calculated by a loss value function; Based on the loss of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set, the comprehensive loss value of the preliminary environment general-purpose strategy model on the first test set and the second test set is calculated by using a comprehensive loss formula; The expression of the comprehensive loss formula is: ; In the formula, is the comprehensive loss value of the general strategy model in the preliminary environment on the first test set and the second test set, is the loss value of the general strategy model in the preliminary environment for the first test set, is the loss value of the preliminary environment general strategy model for the second test set, is the environmental emphasis coefficient, and the value range of the environmental emphasis coefficient is .
[0029] in, The value of is determined by the execution of all decision tasks in the current task environment. The more the number of all decision tasks executed in the current task environment, the more the execution of the decision tasks can represent the task characteristics in the current task environment. The value of increases. In the initial stage, due to the large uncertainty of the decision-making task in the current task environment, The value of is reduced.
[0030] By combining the first test set and the second test set, this strategy can more comprehensively and meticulously evaluate the generalization ability of the environment-generalized strategy model and its ability to cope with specific environments. This dual verification mechanism helps to improve the reliability and robustness of the model.
[0031] Furthermore, the method according to the embodiment of the present application can also be performed by Fig. 9 The electronic device architecture shown in FIG. Fig. 9 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as the ROM 503 or the hard disk 507, may store a method for rapidly migrating strategies in uncertain scenarios based on neural network optimization provided by the present application. The electronic device 500 may also include a user interface 508. Of course, Fig. 9 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Fig. 9 One or more components of an electronic device are shown.
[0032] Fig.10 Schematic diagram of a computer-readable storage medium structure provided by an embodiment of the present application. Fig.10 As shown, a computer-readable storage medium 600 according to an embodiment of the present application is shown. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by the processor, a method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0033] In summary, the advantages of the present invention are that through the optimization of the neural network and the evaluation of the double test set, the model can adapt to the new environment in a relatively short time, which significantly shortens the time for transfer learning of the model facing different application scenarios in the same environment and improves the migration efficiency.
[0034] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A rapid migration method of strategies in uncertain scenarios based on neural network optimization, characterized in that: include: Obtain decision-making tasks for all known scenarios; Based on the task features of decision-making tasks in all known scenarios, a set of task features of decision-making tasks in each known scenario is constructed; Based on the decision task log, determine the number of times the decision task is executed in each known scenario; Determine the general feature data of the environment based on the task feature set of the decision task in each known scenario and the number of executions of the decision task in the known scenario; Adjust the neural network parameters of the environment general strategy model based on the environment general feature data; The environment general-purpose strategy model is obtained by training the neural network parameters of the adjusted environment general-purpose strategy model; The environment general policy model migration is called to apply to the decision-making task in the new scenario, and transfer reinforcement learning is performed based on the execution of the decision-making task in the new scenario using the environment general policy model migration to obtain the scenario decision task model of the decision-making task in the new scenario.
2. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 1 is characterized in that: The determining of the environment general feature data based on the task feature set of the decision task in each known scenario and the number of executions of the decision task in the known scenario specifically includes: The task feature sets of all decision-making tasks in known scenarios are combined to obtain the total task feature set, which is denoted as A. ,in, is the i-th task feature, is the total number of elements in the total set of task features; Based on the execution times of decision-making tasks in known scenarios, the benchmark execution times of each task feature in the total set of task features is determined, and the benchmark execution times set B is constructed. ,in, is the number of benchmark executions of the i-th task feature, Equal to all including The total number of executions of decision-making tasks in known scenarios; Based on the benchmark execution count set B, the training focus of each task feature is obtained and the training focus set C is constructed. ; in, ; The training focus of the i-th task feature; The total set of task features and the training focus set are encapsulated as general-purpose feature data of the environment.
3. The rapid migration method of strategies in uncertain scenarios based on neural network optimization according to claim 2 is characterized in that: The step of adjusting the neural network parameters of the environment general-purpose strategy model based on the environment general-purpose feature data specifically includes: Set the total number of training sets for the general-purpose strategy model of the environment, denoted as N; Determine the total number of decision tasks in all known scenarios, denoted as h; Randomly select from the historical execution events of the decision task in each known scenario The execution results are used as the training set of the neural network; Randomly select from the historical execution events of the decision task in each known scenario The execution results that are different from the training set are used as the first test set of the neural network; Based on the general feature data of the environment, a second test set is determined.
4. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 3 is characterized in that: The determining of the second test set based on the general-purpose feature data of the environment specifically includes: Based on the general feature data of the environment, construct generation constraints for the second test set; Based on the generation constraints of the second test set, select from the historical execution events of the decision-making task in all known scenarios The execution results are used as the second test set; The generation restriction conditions of the second test set are specifically: ; The decision tasks corresponding to the execution results in the second test set include The number of historical execution events.
5. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 4 is characterized in that: The neural network parameter training based on the adjusted environment general purpose strategy model to obtain the environment general purpose strategy model specifically includes: Based on the properties of the environment general policy model, the loss value function in the training process of the environment general policy model is determined, which is recorded as ; The regularized loss value function in the training process of the general strategy model based on the construction environment is recorded as ; Among them, the regularized loss value function is specifically: ; in, is the coefficient of the L1 regularization term, is the coefficient of the L2 regularization term, is the jth parameter of the neural network; By adjusting the regularization loss function and Get several different regularized loss value functions; Based on each regularized loss value function, several preliminary environment general policy models are trained; Calculate the comprehensive loss value of each preliminary environment general strategy model on the first test set and the second test set; The preliminary environment general-purpose strategy model with the smallest comprehensive loss value is selected as the final environment general-purpose strategy model.
6. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 5 is characterized in that: The training of several preliminary environment general strategy models based on each regularized loss value function specifically includes: S1. Input the input features of the training set into the neural network, and the neural network generates corresponding prediction values based on the input features of the training set; S2. Based on the predicted value and the true value of the training set, the loss value of the neural network for the training set is calculated through the regularized loss value function; S3. Determine whether the number of iterations of the neural network is greater than a threshold. If so, output the trained neural network parameters to obtain a preliminary environment general strategy model. If not, based on the loss value of the neural network for the training set, calculate the gradient of the loss function for each parameter in the neural network through the back propagation algorithm, and update the parameters in the neural network according to the gradient information of each parameter, and return to step S1.
7. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 6 is characterized in that: By adjusting the regularization loss function and , we get several different regularized loss value functions, including: set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; set up Search scope and The search step size is based on The search step length is from The search range of takes several values, forming The set of search values; Will The search value set and The elements in the search value set are combined in any pair to obtain several groups Search value combinations; based on Search value combinations and generate corresponding regularized loss value functions.
8. The method for rapid migration of strategies in uncertain scenarios based on neural network optimization according to claim 7 is characterized in that: The calculating of the comprehensive loss value of each preliminary environment general-purpose strategy model on the first test set and the second test set specifically includes: Inputting the input features of the first test set and the second test set into the preliminary environment general-purpose strategy model respectively, obtaining the preliminary environment general-purpose strategy model prediction value corresponding to the first test set and the preliminary environment general-purpose strategy model prediction value corresponding to the second test set; Based on the true value of the first test set and the true value of the second test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the first test set and the predicted value of the preliminary environment general-purpose strategy model corresponding to the second test set, the loss value of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set are calculated by a loss value function; Based on the loss of the preliminary environment general-purpose strategy model for the first test set and the loss value of the second test set, the comprehensive loss value of the preliminary environment general-purpose strategy model on the first test set and the second test set is calculated by using a comprehensive loss formula; The expression of the comprehensive loss formula is: ; In the formula, is the comprehensive loss value of the general strategy model in the preliminary environment on the first test set and the second test set, is the loss value of the general strategy model in the preliminary environment for the first test set, is the loss value of the preliminary environment general strategy model for the second test set, is the environmental emphasis coefficient, and the value range of the environmental emphasis coefficient is .
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for rapid migration of strategies in uncertain scenarios based on neural network optimization as described in any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for rapid migration of strategies in uncertain scenarios based on neural network optimization described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Strawberry identification and positioning method oriented to natural picking scene
CN120496059A
