Strategy optimization processing method, device, storage medium and electronic device
By using the Monte Carlo algorithm in the AI system to simulate and optimize Q&A information of different industry types, the problem of low Q&A accuracy in AI in different industry types is solved, and higher Q&A accuracy and automatic reply accuracy are achieved. sex.
Patent Information
- Application Number
- CN202111617060.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In the prior art, AI uses the same question-and-answer method when processing user Q&A, resulting in low accuracy among different industry types.
By using the Monte Carlo algorithm to simulate multiple industry-type Q&A information in the knowledge base, the Monte Carlo algorithm is optimized, so that the target Q&A information of the simulation results meets the preset conditions, determine the corresponding strategy as the target strategy, and provide it to the corresponding industry Type of client.
Improve the accuracy of AI in handling user Q&A in different industry types, ensure that users get the desired answers, and improve the accuracy of AI's automatic reply statements.
Smart Images

Figure CN114282728B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communications, and more specifically, to a strategy optimization processing method, device, storage medium, and electronic device. Background Art
[0002] When artificial intelligence (AI) processes user questions and answers, it generally uses pre-set question formats, which is not very accurate due to differences in different industry types.
[0003] Regarding the problem that in related technologies, AI uses the same questioning method to process user questions and answers for different industry types, resulting in low accuracy, no solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a strategy optimization processing method, device, storage medium and electronic device to at least solve the problem in the related art that AI uses the same questioning method when processing user questions and answers for different industry types, resulting in low accuracy.
[0005] According to an embodiment of the present application, a policy optimization processing method is provided, including:
[0006] Using a Monte Carlo algorithm to simulate question-and-answer information of multiple industry types in a knowledge base, and obtaining simulation results of the multiple industry types;
[0007] Optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types so that the target question and answer information corresponding to the simulation results meets the preset conditions;
[0008] The policy corresponding to the target question and answer information is determined as a target policy, and the target policy is used to provide to clients of corresponding industry types.
[0009] Optionally, optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types so that the target question and answer information corresponding to the simulation results meets the preset conditions includes:
[0010] Using a Monte Carlo algorithm to simulate the question-and-answer information of the multiple industry types;
[0011] For each industry type, the question and answer information is analyzed and the simulation results are statistically analyzed;
[0012] Obtaining the number of simulation rounds and the quality of responses to the question and answer information in the simulation result, wherein the quality of the responses is determined by the similarity between the simulation response and the standard answer;
[0013] If the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions, the corresponding target question and answer information is obtained.
[0014] Optionally, if the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions, before obtaining the corresponding target question and answer information, the method further includes:
[0015] Determine whether the number of simulation rounds is greater than a preset number, and determine whether the quality of the response to the question and answer information is greater than a preset threshold;
[0016] When the judgment results are all yes, it is determined that the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions.
[0017] Optionally, the question-answer information of multiple industry types in the knowledge base is simulated using a Monte Carlo algorithm, and the simulation results of the multiple industry types include:
[0018] The following steps are performed for each industry type of question and answer information in the multiple industry type question and answer information, and the industry type being performed is referred to as the current industry type:
[0019] For the question and answer information of the current industry type, randomly select a state-behavior pair, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information;
[0020] Based on the current Monte Carlo algorithm, simulate and traverse semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and generate a sequence of the multiple behaviors;
[0021] Counting the values of the plurality of behaviors in the sequence according to a value function;
[0022] Updating the value function according to the values of the multiple behaviors to obtain an updated value function;
[0023] Optimizing the current Monte Carlo algorithm using the updated value function to obtain an optimized Monte Carlo algorithm;
[0024] The simulation results of the current industry type are obtained through multiple rounds of simulation.
[0025] Optionally, the value function is updated according to the values of the multiple behaviors to obtain an updated value function including:
[0026] determining an average of the values of the plurality of actions;
[0027] The value function is updated according to the average value to obtain the updated value function.
[0028] Optionally, for the question-and-answer information of the current industry type, a state-behavior pair is randomly selected including:
[0029] Determine the value of each state-action pair in the question-answer information of the current industry type;
[0030] Determine a target state behavior pair corresponding to a maximum value among the values;
[0031] A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the semantic sample.
[0032] Optionally, randomly selecting a state-behavior pair from state-behavior pairs other than the target state-behavior pair in the semantic sample includes:
[0033] Setting a probability parameter ε between 0 and 1 for each state-behavior pair in the question-answer information of the current industry type;
[0034] A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the question-answer information of the current industry type with a probability of 1-ε.
[0035] According to another embodiment of the present application, a strategy optimization processing device is also provided, including:
[0036] A simulation module, used to simulate the question-and-answer information of multiple industry types in the knowledge base using a Monte Carlo algorithm to obtain simulation results of the multiple industry types;
[0037] An optimization module, used for optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets the preset conditions;
[0038] A determination module is used to determine the policy corresponding to the target question and answer information as a target policy, and the target policy is used to provide to clients of corresponding industry types.
[0039] Optionally, the optimization module includes:
[0040] A simulation submodule, used for simulating the question and answer information of the multiple industry types using a Monte Carlo algorithm;
[0041] The statistical submodule is used to collect the statistical simulation results for the question and answer information of each industry type;
[0042] A first acquisition submodule is used to obtain the number of simulation rounds and the quality of responses to the question and answer information in the simulation result, wherein the quality of the response is determined by the similarity between the simulation response and the standard answer;
[0043] The second acquisition submodule is used to acquire the corresponding target question and answer information if the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions.
[0044] Optionally, the device further comprises:
[0045] A judgment submodule, one day judging whether the number of simulation rounds is greater than a preset number, and judging whether the reply quality of the question and answer information is greater than a preset threshold;
[0046] The determination submodule is used to determine whether the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions when the judgment results are all yes.
[0047] Optionally, the simulation module includes:
[0048] The execution submodule is used to execute the following steps for each industry type of question and answer information in the multiple industry type question and answer information, and the industry type being executed is called the current industry type:
[0049] For the question and answer information of the current industry type, randomly select a state-behavior pair, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information;
[0050] Based on the current Monte Carlo algorithm, simulate and traverse semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and generate a sequence of the multiple behaviors;
[0051] Counting the values of the plurality of behaviors in the sequence according to a value function;
[0052] Updating the value function according to the values of the multiple behaviors to obtain an updated value function;
[0053] Optimizing the current Monte Carlo algorithm using the updated value function to obtain an optimized Monte Carlo algorithm;
[0054] The simulation results of the current industry type are obtained through multiple rounds of simulation.
[0055] Optionally, the execution submodule is further used to:
[0056] determining an average of the values of the plurality of actions;
[0057] The value function is updated according to the average value to obtain the updated value function.
[0058] Optionally, the execution submodule includes:
[0059] A first determining unit, used to determine the value of each state-behavior pair in the question-answer information of the current industry type;
[0060] A second determining unit, used to determine a target state behavior pair corresponding to a maximum value among the values;
[0061] A selection unit is used to randomly select a state-behavior pair from the state-behavior pairs other than the target state-behavior pair in the semantic sample.
[0062] Optionally, the selection unit is further used to:
[0063] Setting a probability parameter ε between 0 and 1 for each state-behavior pair in the question-answer information of the current industry type;
[0064] A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the question-answer information of the current industry type with a probability of 1-ε.
[0065] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0066] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0067] In an embodiment of the present application, a Monte Carlo algorithm is used to simulate question and answer information of multiple industry types in a knowledge base to obtain simulation results of the multiple industry types; the corresponding Monte Carlo algorithm is optimized according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets a preset condition; a strategy corresponding to the target question and answer information is determined as a target strategy, and the target strategy is used to provide to a client of the corresponding industry type, which can solve the problem in the related technology that the same questioning method is used when AI processes user questions and answers for different industry types, and the accuracy is not high. Based on the Monte Carlo algorithm, the different industry types in the knowledge base are simulated, the accuracy of the user question analysis is improved, and the words corresponding to the answers expected by the user are obtained, thereby improving the accuracy of the AI automatic reply statements. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a hardware structure block diagram of a mobile terminal of the policy optimization processing method of an embodiment of the present application;
[0069] Figure 2is a flow chart of a strategy optimization processing method according to an embodiment of the present application;
[0070] Figure 3 is a flow chart of a semantic evaluation based on a Monte Carlo algorithm according to an embodiment of the present application;
[0071] Figure 4 It is a block diagram of a strategy optimization processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0072] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0073] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0074] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of the policy optimization processing method of an embodiment of the present application, such as Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0075] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the policy optimization processing method in the embodiment of the present application. The processor 102 executes various functional applications and service chain address pool slicing processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0076] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0077] In this embodiment, a policy optimization processing method running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a strategy optimization processing method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0078] Step S202, using a Monte Carlo algorithm to simulate question-and-answer information of multiple industry types in the knowledge base to obtain simulation results of the multiple industry types;
[0079] Step S204, optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets the preset conditions;
[0080] Step S206: determine that the policy corresponding to the target question and answer information is a target policy, and the target policy is used to provide to clients of corresponding industry types.
[0081] Through the above steps S202 to S206, the problem in the related technology that AI uses the same questioning method to process user questions and answers for different industry types and the accuracy is not high can be solved. Based on the Monte Carlo algorithm, the different industry types in the knowledge base are simulated to improve the accuracy of user question analysis, and the words corresponding to the answers expected by the users are obtained, thereby improving the accuracy of AI automatic reply statements.
[0082] The knowledge base in the embodiment of the present application stores necessary question and answer information of different industry types; the question and answer information is simulated using a Monte Carlo algorithm; the results of knowledge base information simulation training are statistically analyzed, with the main indicators being the number of simulation rounds and the quality of responses; the necessary question and answer information with a high accuracy rate is obtained; and the various reordering models of the similarity algorithm are continuously optimized, and the optimal strategy is obtained after multiple rounds of simulation.
[0083] In an embodiment of the present application, in the above step S204, the Monte Carlo algorithm can be optimized specifically in the following manner: using the Monte Carlo algorithm to simulate the question and answer information of the multiple industry types; for each industry type of question and answer information, statistically analyzing the simulation results; obtaining the number of simulation rounds in the simulation results and the quality of the response to the question and answer information, wherein the response quality is determined by the similarity between the simulated reply and the standard answer, specifically, determining the similarity between the simulated answer and the marked answer in the simulation result, and the similarity is positively correlated with the response quality, that is, the higher the similarity, the higher the response quality; if the number of simulation rounds and the response quality of the question and answer information meet the preset conditions, the corresponding target question and answer information is obtained.
[0084] In an optional embodiment, before obtaining the corresponding target question and answer information, it is necessary to first determine whether the response quality meets the preset conditions, which can be determined in the following manner: determine whether the number of simulation rounds is greater than the preset number of times, and determine whether the response quality of the question and answer information is greater than a preset threshold; if the judgment results are both yes, determine that the number of simulation rounds and the response quality of the question and answer information meet the preset conditions.
[0085] In an embodiment of the present application, in the above-mentioned step S202, the question and answer information of multiple industry types in the knowledge base can be specifically simulated in the following manner: the following steps are performed for each industry type of the question and answer information of the multiple industry types, and the industry type being executed is called the current industry type: for the question and answer information of the current industry type, a state-behavior pair is randomly selected, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information; based on the current Monte Carlo algorithm, a simulation is performed to traverse the semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and a sequence is generated for the multiple behaviors; according to the value function, the values of the multiple behaviors on the sequence are counted; according to the values of the multiple behaviors, the value function is updated to obtain an updated value function, specifically, the average value of the values of the multiple behaviors is determined, and the value function is updated according to the average value to obtain the updated value function; the current Monte Carlo algorithm is optimized using the updated value function to obtain an optimized Monte Carlo algorithm; the simulation result of the current industry type is obtained through multiple rounds of simulation.
[0086] In an optional embodiment, the method of randomly selecting a state-behavior pair may specifically include: determining the value of each state-behavior pair in the question and answer information of the current industry type; determining the target state-behavior pair corresponding to the maximum value of the value; randomly selecting a state-behavior pair from the state-behavior pairs other than the target state-behavior pair in the semantic sample, specifically, setting a probability parameter ε between 0 and 1 for each state-behavior pair in the question and answer information of the current industry type; and randomly selecting a state-behavior pair from the state-behavior pairs other than the target state-behavior pair in the question and answer information of the current industry type with a probability of 1-ε.
[0087] The principle of the Monte Carlo algorithm is to understand a system through a large number of random samples and then obtain the value to be calculated. The Monte Carlo method can not only be used for calculation, but also for simulating random movements within the system. Improve the flexibility and accuracy of AI automatic replies.
[0088] Text recognition requires a large number of training samples, combined with the Monte Carlo algorithm to achieve the value analysis and calculation of semantic samples; the key is to obtain the probability distribution of x. If the probability distribution of x is obtained, we can sample n x sample sets based on this probability distribution based on the probability distribution, and then substitute them into the Monte Carlo summation formula to solve it.
[0089] For probability distributions that are not common, acceptance-rejection sampling can be used. A feasible approach is to use acceptance-rejection sampling to obtain samples of the distribution. Set a distribution q(x) that can be sampled by the program, such as a Gaussian distribution, and then reject certain samples according to a certain method to achieve the purpose of approaching the distribution of the proposal distribution(x).
[0090] Normal distribution is a probability distribution. Normal distribution is the distribution of continuous random variables with two parameters μ and σ^2. The first parameter μ is the mean of the random variable that follows the normal distribution, and the second parameter σ^2 is the variance of this random variable, so the normal distribution is recorded as N(μ, σ^2). The probability law of random variables that follow the normal distribution is that the probability of taking values close to μ is large, and the probability of taking values farther away from μ is small; the smaller σ is, the more concentrated the distribution is near μ, and the larger σ is, the more dispersed the distribution is.
[0091] The Monte Carlo algorithm is a sample-based value learning method that only requires experience learned through continuous trial and error.
[0092] Each time, a complete sampling simulation is performed on the sample, and the final actual value harvest is used to update the strategy and value function. There are two ways to calculate the value in this process: first-visit and every-visit.
[0093] First-visit means averaging the values of all states traversed for the first time when calculating the value return, and every-visit means averaging the values of each state traversed. There is a problem here, that some state-behavior pairs may have never been traversed, making it impossible to evaluate the state-behavior pair. Therefore, individuals need to maintain a certain spirit of exploration during each traversal, which means that all state-behavior pairs are likely to be selected.
[0094] ExploringStarts method, ES method stipulates that each state-behavior pair can be selected as the starting point of a traversal with a non-zero probability. Figure 3 is a flowchart of a semantic evaluation based on a Monte Carlo algorithm according to an embodiment of the present application, such as Figure 3 As shown, the specific algorithm implementation steps are as follows:
[0095] S301, exploration, select a state-action pair (s, a);
[0096] S302, simulation, using the current strategy F, starting from (s, a) to simulate traversal until the end, generating a sequence;
[0097] S303, sampling, counting the reward R(s,a) of each action in this sequence;
[0098] S304, valuation, sum and average R(s,a) to update the value function V;
[0099] S305, strategy optimization, using the new value function V to optimize the strategy function F.
[0100] Note that although simulation can make any action possible, it is impossible to enumerate all possible actions in actual situations. Therefore, the sequence used to calculate the state-behavior reward can only be regarded as a sampling.
[0101] By setting a probability parameter ε between 0 and 1, the individual will not choose the behavior with the maximum reward at the moment with a probability of 1-ε, but will randomly select one from other behaviors, which ensures that all behaviors have the possibility of being selected.
[0102] The evaluation optimization strategy and the simulation strategy are separated. The former is responsible for strategy updating, while the latter is responsible for behavior simulation, which also ensures that all behaviors have the possibility of being selected.
[0103] Intelligent outbound calling realizes number industry type recognition, which requires voice and semantic recognition, and requires AI to conduct questions and answers with users to further identify the industry type. The efficiency can be improved based on the method provided in the embodiments of this application.
[0104] According to another embodiment of the present application, a strategy optimization processing device is also provided. Figure 4 is a block diagram of a strategy optimization processing device according to an embodiment of the present application, such as Figure 4 As shown, including:
[0105] A simulation module 42, configured to simulate question-answer information of multiple industry types in the knowledge base using a Monte Carlo algorithm to obtain simulation results of the multiple industry types;
[0106] An optimization module 44, configured to optimize the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question-answer information corresponding to the simulation results meets a preset condition;
[0107] The determination module 46 is used to determine the policy corresponding to the target question and answer information as a target policy, and the target policy is used to provide to clients of corresponding industry types.
[0108] Optionally, the optimization module 44 includes:
[0109] A simulation submodule, used for simulating the question and answer information of the multiple industry types using a Monte Carlo algorithm;
[0110] The statistical submodule is used to collect the statistical simulation results for the question and answer information of each industry type;
[0111] A first acquisition submodule is used to obtain the number of simulation rounds and the quality of responses to the question and answer information in the simulation result, wherein the quality of the response is determined by the similarity between the simulation response and the standard answer;
[0112] The second acquisition submodule is used to acquire the corresponding target question and answer information if the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions.
[0113] Optionally, the device further comprises:
[0114] A judgment submodule, one day judging whether the number of simulation rounds is greater than a preset number, and judging whether the reply quality of the question and answer information is greater than a preset threshold;
[0115] The determination submodule is used to determine whether the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions when the judgment results are all yes.
[0116] Optionally, the simulation module 42 includes:
[0117] The execution submodule is used to execute the following steps for each industry type of question and answer information in the multiple industry type question and answer information, and the industry type being executed is called the current industry type:
[0118] For the question and answer information of the current industry type, randomly select a state-behavior pair, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information;
[0119] Based on the current Monte Carlo algorithm, simulate and traverse semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and generate a sequence of the multiple behaviors;
[0120] Counting the values of the plurality of behaviors in the sequence according to a value function;
[0121] Updating the value function according to the values of the multiple behaviors to obtain an updated value function;
[0122] Optimizing the current Monte Carlo algorithm using the updated value function to obtain an optimized Monte Carlo algorithm;
[0123] The simulation results of the current industry type are obtained through multiple rounds of simulation.
[0124] Optionally, the execution submodule is further used to:
[0125] determining an average of the values of the plurality of actions;
[0126] The value function is updated according to the average value to obtain the updated value function.
[0127] Optionally, the execution submodule includes:
[0128] A first determining unit, used to determine the value of each state-behavior pair in the question-answer information of the current industry type;
[0129] A second determining unit, used to determine a target state behavior pair corresponding to a maximum value among the values;
[0130] A selection unit is used to randomly select a state-behavior pair from the state-behavior pairs other than the target state-behavior pair in the semantic sample.
[0131] Optionally, the selection unit is further used to:
[0132] Setting a probability parameter ε between 0 and 1 for each state-behavior pair in the question-answer information of the current industry type;
[0133] A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the question-answer information of the current industry type with a probability of 1-ε.
[0134] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute at least the following steps in any one of the above method embodiments when running:
[0135] S1, using a Monte Carlo algorithm to simulate question-and-answer information of multiple industry types in a knowledge base to obtain simulation results of the multiple industry types;
[0136] S2, optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets the preset conditions;
[0137] S3, determining the policy corresponding to the target question and answer information as a target policy, wherein the target policy is provided to clients of corresponding industry types.
[0138] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0139] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform at least the following steps in any one of the above method embodiments:
[0140] S1, using a Monte Carlo algorithm to simulate question-and-answer information of multiple industry types in a knowledge base to obtain simulation results of the multiple industry types;
[0141] S2, optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets the preset conditions;
[0142] S3, determining the policy corresponding to the target question and answer information as a target policy, wherein the target policy is provided to clients of corresponding industry types.
[0143] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0144] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0145] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0146] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A strategy optimization processing method, characterized in that: include: Using a Monte Carlo algorithm to simulate question-and-answer information of multiple industry types in a knowledge base, and obtaining simulation results of the multiple industry types; Optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types so that the target question and answer information corresponding to the simulation results meets the preset conditions; Determine the policy corresponding to the target question and answer information as the target policy, wherein the target policy is used to provide to clients of the corresponding industry type; The Monte Carlo algorithm is used to simulate the question and answer information of multiple industry types in the knowledge base, and the simulation results of the multiple industry types include: The following steps are performed for each industry type of question and answer information in the multiple industry type question and answer information, and the industry type being performed is referred to as the current industry type: For the question and answer information of the current industry type, randomly select a state-behavior pair, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information; Based on the current Monte Carlo algorithm, simulate and traverse semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and generate a sequence of the multiple behaviors; Counting the values of the plurality of behaviors in the sequence according to a value function; Updating the value function according to the values of the multiple behaviors to obtain an updated value function; Optimizing the current Monte Carlo algorithm using the updated value function to obtain an optimized Monte Carlo algorithm; The simulation results of the current industry type are obtained through multiple rounds of simulation.
2. The method according to claim 1, characterized in that Optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types so that the target question and answer information corresponding to the simulation results meets the preset conditions includes: Using a Monte Carlo algorithm to simulate the question-and-answer information of the multiple industry types; For each industry type, the question and answer information is analyzed and the simulation results are statistically analyzed; Obtaining the number of simulation rounds and the quality of responses to the question and answer information in the simulation result, wherein the quality of the responses is determined by the similarity between the simulation response and the standard answer; If the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions, the corresponding target question and answer information is obtained.
3. The method according to claim 2, characterized in that If the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions, before obtaining the corresponding target question and answer information, the method further includes: Determine whether the number of simulation rounds is greater than a preset number, and determine whether the quality of the response to the question and answer information is greater than a preset threshold; When the judgment results are all yes, it is determined that the number of simulation rounds and the quality of the response to the question and answer information meet the preset conditions.
4. The method according to claim 1, characterized in that: The value function is updated according to the values of the multiple behaviors, and the updated value function includes: determining an average of the values of the plurality of actions; The value function is updated according to the average value to obtain the updated value function.
5. The method according to claim 1, characterized in that: For the question and answer information of the current industry type, a state-behavior pair is randomly selected including: Determine the value of each state-action pair in the question-answer information of the current industry type; Determine a target state behavior pair corresponding to a maximum value among the values; A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the semantic sample.
6. The method according to claim 5, characterized in that Randomly selecting a state-behavior pair from state-behavior pairs other than the target state-behavior pair in the semantic sample includes: Setting a probability parameter ε between 0 and 1 for each state-behavior pair in the question-answer information of the current industry type; A state-behavior pair is randomly selected from the state-behavior pairs other than the target state-behavior pair in the question-answer information of the current industry type with a probability of 1-ε.
7. A strategy optimization processing device, characterized in that: include: A simulation module, used to simulate the question-and-answer information of multiple industry types in the knowledge base using a Monte Carlo algorithm to obtain simulation results of the multiple industry types; An optimization module, used for optimizing the corresponding Monte Carlo algorithm according to the simulation results of the multiple industry types, so that the target question and answer information corresponding to the simulation results meets the preset conditions; A determination module, used to determine the policy corresponding to the target question and answer information as a target policy, and the target policy is used to provide to a client of a corresponding industry type; Wherein, the simulation module includes: The execution submodule is used to execute the following steps for each industry type of question and answer information in the multiple industry type question and answer information, and the industry type being executed is called the current industry type: For the question and answer information of the current industry type, randomly select a state-behavior pair, wherein the state corresponds to the industry type, and the behavior corresponds to the question and answer information; Based on the current Monte Carlo algorithm, simulate and traverse semantic samples starting from the selected state-behavior pair to obtain multiple behaviors corresponding to the state, and generate a sequence of the multiple behaviors; Counting the values of the plurality of behaviors in the sequence according to a value function; Updating the value function according to the values of the multiple behaviors to obtain an updated value function; Optimizing the current Monte Carlo algorithm using the updated value function to obtain an optimized Monte Carlo algorithm; The simulation results of the current industry type are obtained through multiple rounds of simulation.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Human-machine personalized dialogue method and system based on inference dialogue model
CN113220851A