Model parameter processing method and device, medium and program product
By optimizing the historical session data of the target business, the target values of the model trigger parameters and model input quantity parameters are automatically determined, which solves the inaccuracy and instability of parameters caused by human experience, and improves the accuracy of the model's session analysis.
Patent Information
- Application Number
- CN202411644428.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the determination of model trigger parameters and model input quantity parameters mainly relies on human experience, resulting in inaccurate and unstable parameter value settings, affecting the accuracy of model session analysis.
By obtaining the historical session data set of the target business, determining the initial value, and using the optimization algorithm to perform multiple iteration solutions until the iteration end condition is reached, the target value of the model trigger parameters and model input quantity parameters is determined.
It improves the accuracy and stability of model trigger parameters and model input quantity parameters, and improves the accuracy of the model's analysis of session data.
Smart Images

Figure CN119814713A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a model parameter processing method, device, medium and program product. Background Art
[0002] For real-time conversation data of message types generated by clients such as social chat software and intelligent agents with conversation functions, the time of generating conversation data after the creation of the conversation is uncertain, which makes these clients produce continuous conversation data streams. When the business needs include using models to analyze such conversation data, two parameters need to be determined: one is the model trigger parameter, which determines the number of conversation data received to trigger the model call; the other is the model input parameter, which determines the number of conversation contexts required for the model to perform conversation analysis.
[0003] At present, the above two parameters are mainly determined by manual experience, which may easily lead to inaccurate and unstable parameter value settings, resulting in low accuracy of the model's conversation analysis results. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a model parameter processing method, device, medium and program product.
[0005] In a first aspect, an embodiment of the present disclosure provides a model parameter processing method, the method comprising:
[0006] Obtain a set of historical session data of the target business;
[0007] Determine a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the running of the target model;
[0008] Based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, the model trigger parameter and the model input quantity parameter are optimized and solved for multiple iterations using the target model until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined.
[0009] In a second aspect, the present disclosure also provides a model parameter processing device, the device comprising:
[0010] A historical session data set acquisition module is used to acquire the historical session data set of the target business;
[0011] An initial value determination module, used to determine a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the running of the target model;
[0012] A target value determination module is used to determine the trigger target value of the model trigger parameter and the input target value of the model input parameter based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, and to use the target model to perform multiple iterative optimization and solution processing on the model trigger parameter and the model input quantity parameter until the iteration end condition is reached.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] Processor and memory;
[0015] The processor is used to execute the model parameter processing method described in any embodiment of the present disclosure by calling the program or instruction stored in the memory.
[0016] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instructions, wherein the program or the instructions enable a computer to execute the model parameter processing method described in any embodiment of the present disclosure.
[0017] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which is used to execute the model parameter processing method described in any embodiment of the present disclosure.
[0018] The model parameter processing method, device, medium and program product provided by the embodiments of the present disclosure can obtain the historical session data set of the target business; determine the trigger initial value of the model trigger parameter and the input quantity initial value of the model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the operation of the target model; based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, using the target model, the model trigger parameter and the model input quantity parameter are optimized and solved for multiple iterations until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined. It is realized that the historical conversation data of a certain business is used to calculate the two hyperparameters of the model with conversation analysis function adopted by the business through an optimization algorithm, so as to obtain the parameter values of the model trigger parameters and the parameter values of the model input parameters that are more suitable for the business, thereby avoiding the problem of insufficient accuracy and poor stability of the two parameters of the same business due to differences in human experience, improving the accuracy and stability of the two parameter values, and thus improving the accuracy of the above-mentioned model in analyzing the conversation data of the business. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flow chart of a model parameter processing method provided in an embodiment of the present disclosure;
[0022] Figure 2 A flowchart of another model parameter processing method provided by an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of the structure of a model parameter processing device provided in an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described in detail below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] In the process of communicating through the client, users will directly or indirectly express their demands, emotions, etc. Using models to analyze these conversation data can more accurately understand user needs / emotions, etc., and then conduct conversation feedback or product improvement. When using a model to analyze conversation data that generates a continuous conversation data stream, model trigger parameters and model input parameters are used to determine the timing of model invocation and the number of conversation data input by the model, respectively. In the related art, the two parameters can be determined by human experience settings. However, this method will cause the two parameters to rely on human experience, thereby affecting the accuracy and stability of the parameter values. For example, if the model trigger parameter is not set accurately, the model will be called at an inappropriate time, resulting in a waste of computing resources and insufficient accuracy of the conversation analysis results; if the model input parameter is inaccurate, the input data of the model analysis will be too much or too little, resulting in low model analysis efficiency and insufficient accuracy. For example, for the same business, when different personnel set parameters, due to differences in personnel experience, there will be a large difference in the two parameter values, which will lead to a large difference in the analysis results of the model. Therefore, there is an urgent need for a more objective method to determine more accurate and stable parameter values to improve the model's ability to analyze conversation data.
[0028] Based on the above situation, the embodiment of the present disclosure proposes a model parameter processing solution, so as to optimize and solve the model trigger parameters and model input quantity parameters in the process of model analysis of historical session data in the scenario of performing session analysis on a continuous session data stream, and obtain two parameter values that are adapted to business needs, thereby greatly reducing the dependence of the two parameter values on human experience, thereby improving the accuracy and stability of the parameter values.
[0029] The model parameter processing method provided in the embodiment of the present disclosure can be executed by a model parameter processing device, which can be implemented by software and / or hardware. The device can be integrated in an electronic device with certain data processing functions, such as a laptop computer, a desktop computer, a server or a server cluster.
[0030] Figure 1is a flow chart of a model parameter processing method provided by an embodiment of the present disclosure. Figure 1 , the model parameter processing method specifically includes:
[0031] S110: Obtain a historical session data set of the target service.
[0032] The target business is the business to be analyzed for conversations, which can be a general conversation analysis business or a customized conversation analysis business. For example, the target business can be a conversation data analysis business for second-hand house sales, or a conversation data analysis business in instant messaging software for social or language learning, or a conversation data analysis business in customer service communication software for shopping, etc. The historical conversation data set is a set of multiple conversation data in the historical time period before the current moment that meets the target business.
[0033] Specifically, since the model trigger parameter and the model input parameter are hyperparameters of the target model with the session analysis function and applicable to the target service, the optimization algorithm can be used to relatively objectively calculate the values of these two parameters in the process of using the target model to analyze the session data of the target service. Based on this, the electronic device can monitor the communication channel for transmitting the session data to obtain the historical session data set of the target service.
[0034] In some embodiments, the electronic device may monitor the communication channel corresponding to the target service to obtain session data within a preset time period (eg, 7 consecutive days) as a historical session data set.
[0035] In other embodiments, the electronic device may filter session data corresponding to the target business from multiple original session data to determine multiple intermediate session data; divide each intermediate session data into multiple session intervals according to the number of intermediate session data corresponding to the session identifier; sample session data from each session interval based on the proportion of the number of intermediate session data contained in each session interval to generate a historical session data set.
[0036] Specifically, the electronic device obtains all session data (referred to as original session data) from the communication channel. These original session data may be associated with information such as a session identifier (used to identify a session window), a service identifier, and the like. Then, all original session data are filtered using the service identifier and / or preset duration corresponding to the target service to filter out the original session data carrying the service identifier of the target service and / or within the preset duration as intermediate session data. Then, the number of intermediate session data corresponding to each session identifier is counted, and all session identifiers are sorted according to the number. Then, the sorted session identifiers are divided into n session intervals. In this way, the intermediate session data corresponding to each session identifier is also divided into corresponding session intervals. Afterwards, according to the proportion of the number of intermediate session data in each session interval to the total number of all intermediate session data, the session data is sampled in equal proportion from each session interval, and all the intermediate session data obtained constitute a historical session data set. In this way, it can be ensured that the historical session data set contains session data under various actual session conditions, and relatively uniform sampling of session data is achieved, so that the subsequent parameter calculation process can cover a variety of session conditions, thereby improving the accuracy of the parameter value and the applicability to the target service to a certain extent.
[0037] S120: Determine the initial trigger value of the model trigger parameter and the initial input value of the model input parameter.
[0038] The model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running. For example, the model trigger parameter can be understood as the number of session data received when the target model is called for session analysis. The trigger initial value is the initial value of the model trigger parameter. The model input quantity parameter is a parameter of the number of sessions input during the operation of the target model. For example, the model input quantity parameter can be understood as the number of session data that needs to be obtained as model input data when the model is running. The input quantity initial value is the initial value of the model input quantity parameter.
[0039] Specifically, when optimizing and solving the model trigger parameters and model input quantity parameters, it is necessary to first set their initial values as the starting conditions for the optimization calculation. In addition, the conversation analysis object of the target model is a continuous conversation data stream, and its model application process will judge and extract the conversation data according to the above two parameters. Therefore, in order to adapt to the application process of the target model, the initial values of these two parameters are also required to perform the same processing on the historical conversation data set. Therefore, the electronic device must first determine the trigger initial value of the model trigger parameter and the input quantity initial value of the model input quantity parameter. For example, when the target business is to detect user emotions through conversation data, the trigger initial value can be set to 1, that is, each conversation data triggers the operation of the target model; and when the target business is demand extraction or demand analysis, the trigger initial value can be set to a relatively large positive integer to reduce the analysis of redundant repeated conversation data.
[0040] In some embodiments, the electronic device may receive two parameter values input by the user through a human-computer interaction interface, which are used as a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter.
[0041] In other embodiments, the electronic device may read a configuration file to obtain a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter.
[0042] S130. Based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, the target model is used to perform multiple iterative optimization and solution processing on the model trigger parameter and the model input quantity parameter until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined.
[0043] Among them, the trigger critical value is the value limit of the model trigger parameter. The input quantity critical value is the value limit of the model input quantity parameter. The iteration end condition is the preset end condition of the optimization calculation, for example, it can be at least one of the maximum number of iterations, the critical value of the change in the objective function value, the satisfaction of the specified constraints, the time limit of the algorithm operation, etc. The trigger target value is the final value of the iterative optimization of the model trigger parameter (also called the optimal value or recommended value). The input quantity target value is the final value of the iterative optimization of the model input quantity parameter (also called the optimal value or recommended value).
[0044] Specifically, the electronic device uses the trigger initial value, input quantity initial value, trigger critical value of the model trigger parameter, input quantity critical value of the model input quantity parameter, iteration end condition and random positive integer values within the constraints of other parameters included in the preset optimization algorithm as parameter setting values of the optimization algorithm, and uses the parameter values of the optimized model input quantity parameters and the parameter values of the optimized model trigger parameters to reasonably segment the historical session data set and call the target model to obtain the corresponding model output results, and uses the preset optimization algorithm combined with the target output results to optimize and solve the above two parameters, so as to obtain the final trigger target value and input quantity target value.
[0045] The model parameter processing method provided by the above-mentioned embodiments of the present disclosure can obtain a historical session data set of a target business; determine a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the operation of the target model; based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, the target model is used to perform multiple iterative optimization and solution processing on the model trigger parameter and the model input quantity parameter until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined. It is realized that the historical conversation data of a certain business is used to calculate the two hyperparameters of the model with conversation analysis function adopted by the business through an optimization algorithm, so as to obtain the parameter values of the model trigger parameters and the parameter values of the model input parameters that are more suitable for the business, thereby avoiding the problem of insufficient accuracy and poor stability of the two parameters of the same business due to differences in human experience, improving the accuracy and stability of the two parameter values, and thus improving the accuracy of the above-mentioned model in analyzing the conversation data of the business.
[0046] In some embodiments, the iterative optimization process of S130 can be characterized as z=f(x,y). Wherein, x represents the model trigger parameter; y represents the model input parameter; z represents the optimization target; f() is a binary abstract function, and its implementation function at least includes the operation process of the target model, the processing of the model output result to obtain the value of the model evaluation parameter (i.e., the model evaluation result), and the process of adjusting the x value and the y value by maximizing the objective function of the preset optimization algorithm. The above objective function combines the above model evaluation result; the above preset optimization algorithm can be an optimization solution algorithm in the relevant technology, for example, it can be the Monarch butterfly optimization (MBO) algorithm. In this way, the optimization solution process of S130 can be characterized as using the historical session data set, the target model and the preset optimization algorithm to iteratively calculate the optimal model trigger parameters and model input parameters suitable for the target model. The specific process may include the following steps 131 to 136:
[0047] Step 131: Determine the trigger initial value and the input quantity initial value as the trigger current value and the input quantity current value of the current iteration process respectively.
[0048] Specifically, the currently executed iteration process is referred to as the current iteration process, and the initial values of the two parameters used in the process are referred to as the trigger current value and the input current value. For the first iteration, the electronic device may determine the trigger initial value x and the input initial value y as the trigger current value and the input current value of the current iteration process, respectively.
[0049] Step 132: Segment the historical session data set based on the current value of the trigger and the current value of the input quantity to generate multiple historical session data subsets.
[0050] Specifically, the electronic device divides the historical session data set according to the current value of the trigger, and the target model is called at each division point. In addition, the electronic device divides the historical session data set according to the current value of the input amount, and the session data between the two division points is the input session data of the corresponding target model. Therefore, the electronic device can obtain multiple session data division points and corresponding historical session data subsets.
[0051] Step 133: Use each historical session data subset to run the target model respectively to generate corresponding model output results.
[0052] Specifically, the electronic device calls the target model at each split point, and its input data at least includes the corresponding historical session data subset. In this way, the same number of model output results (such as session analysis results) as the historical session data subset can be obtained. The model output results are adapted to the target business. For example, if the target business is to extract information from the session data, then the model output results can be the extracted multi-dimensional information.
[0053] Step 134: Based on the output results, trigger critical values and input critical values of each model, the model trigger parameters and model input parameters are optimized and solved using a preset optimization algorithm to generate an optimized solution for the current iterative process, and the optimized solution is used to update the current trigger value and the current input value.
[0054] Specifically, the electronic device can use the model output results to calculate the function value of the objective function constructed in the preset optimization algorithm, and then use the maximization of the function value of the objective function, the trigger critical value and the input critical value as constraints, and continuously adjust the values of the two parameters through the preset optimization algorithm for iterative optimization until the optimal solution in the current iteration process is found as the new trigger current value and input current value.
[0055] In some examples, step 134 includes: determining a model evaluation result in the current iteration process based on the output results of each model; under the constraints of a trigger critical value, an input critical value, and a function value that maximizes the objective function of a preset optimization algorithm, based on the model evaluation result, adjusting the model trigger parameters and model input quantity parameters using a variable value update algorithm in a preset optimization algorithm to generate an optimized solution for the current iteration process.
[0056] Among them, the model evaluation result is the value of the model evaluation parameter. The model evaluation parameter is used to characterize the quality of the model output result of the target model. Exemplarily, when the target business includes a business of extracting information from the conversation content, the model evaluation parameter includes the number of dimensions of the extracted information and / or the quality of the extracted information. The variable value update algorithm is an algorithm for adjusting the values of two parameters to be optimized in a preset optimization algorithm, for example, it can be the migration function and adaptation function in the monarch butterfly optimization algorithm, or it can be the gradient function or derivative function in other optimization algorithms.
[0057] Specifically, the electronic device can use the obtained multiple model output results to calculate the model evaluation result. For example, when the model output result is multi-dimensional information, and the model evaluation parameter includes the number of dimensions of the extracted information, the electronic device can count the number of dimensions of each model output result, and then calculate the average number of dimensions of multiple model output results as the model evaluation result in the current iteration process. For another example, when the model output result is multi-dimensional information, and the model evaluation parameter includes the quality of the extracted information, the electronic device can use the pre-annotated quality standard of the extracted information to calculate the information quality of multiple model output results as the model evaluation result in the current iteration process.
[0058] Then, the electronic device can input the above model evaluation result into the objective function of the preset optimization algorithm to obtain the objective function value. Then, in the direction of maximizing the objective function value (for example, the direction of maximizing the mean of the number of dimensions of information extracted from all historical session data in the above example), the variable value update algorithm in the preset optimization algorithm is used to adjust the model trigger parameters and model input quantity parameters within the range of the trigger critical value and the input quantity critical value to obtain a new trigger current value x′ and input quantity current value y′ as the optimization solution of the current iteration process.
[0059] In this way, the evaluation results of multiple target output results of the session data analysis can be fully utilized to optimize the two parameters, so that the final optimized parameter values are more consistent with the analysis of the session data of the target business, thereby further improving the accuracy of the analysis results of the target model on the session data of the target business.
[0060] Step 135: If the iteration end condition is not met, return to step 132.
[0061] Specifically, after one iteration process ends, the electronic device determines whether the iteration end condition is met. If not, the process returns to step 132 to perform a loop process of the entire iteration process.
[0062] Step 136: If the iteration end condition is met, the updated trigger current value and input current value are respectively determined as the trigger target value of the model trigger parameter and the input target value of the model input parameter.
[0063] Specifically, if the electronic device determines that the iteration end condition has been reached, the trigger current value and input current value of the last iteration update are respectively determined as the trigger target value of the model trigger parameter and the input target value of the model input parameter.
[0064] Through the iterative processing of the above steps, the current trigger value and the current input value can be used to more reasonably segment the historical conversation data set, thereby fully simulating the real conversation analysis process of the target model, and further improving the fit of the optimized trigger target value and input target value to the target business and target model, thereby further improving the accuracy of the conversation analysis results.
[0065] Figure 2 is a flowchart of another model parameter processing method provided by an embodiment of the present disclosure. Figure 1 The model parameter processing method shown obtains the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter, and then uses the trigger target value and the input quantity target value to apply the target model to analyze the real-time acquired session data of the target service. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0066] See also Figure 2 , the model parameter processing method includes:
[0067] S210: Acquire current session data of the target service.
[0068] The current session data is the real-time session data at the current moment.
[0069] Specifically, the electronic device monitors the communication channel of the target service to obtain real-time session data corresponding to the target service, and performs preprocessing such as data structure conversion on the target service to obtain current session data.
[0070] S220: If the current session data reaches the trigger target value, extract the session data of the input volume target value from the continuous session data flow of the target service as the input session data set.
[0071] Specifically, after obtaining each current session data, the electronic device compares it with the trigger target value to determine whether it meets the trigger condition for calling the target model. If not, the target model is not called, and the electronic device continues to monitor and obtain real-time session data. If the trigger target value is reached, the call of the target model is triggered. At this time, the electronic device can obtain the session data of the continuous input amount target value including the current session data from the continuous session data stream to form an input session data set.
[0072] In some embodiments, S220 includes: if the current session data meets the filtering condition corresponding to the target service and reaches the trigger target value, extracting session data of the input volume target value from the continuous session data flow of the target service as the input session data set.
[0073] The filtering condition is a pre-configured filtering rule of the target service, which can be set according to the specific service requirements of the target service, for example, the content length of the session data, the generation time of the session data, etc.
[0074] Specifically, in order to improve the conversation analysis efficiency of the target model, the electronic device may filter the monitored current conversation data to reduce the analysis of redundant conversation data.
[0075] The electronic device can use the filtering condition and the trigger target value to judge the current session data. If the current session data does not meet any of the filtering condition and the trigger target value, the target model is not called. On the contrary, if the current session data meets both the filtering condition and the trigger target value, the target model is called, and the input session data set is obtained according to the process in S220.
[0076] S230: Based on the input conversation data set and the model prompt words corresponding to the target business, run the target model to generate conversation analysis results.
[0077] The model prompt words are prompt words of a large-scale target model pre-built according to the target business. Different target businesses will build different prompt words.
[0078] Specifically, the electronic device uses the input conversation data set and the model prompt word prompt to construct model input data, inputs it into the target model for model operation, and outputs the conversation analysis result.
[0079] The model parameter processing method provided by the above embodiments of the present disclosure obtains the current session data of the target business; if the current session data reaches the trigger target value, the session data of the input quantity target value is extracted from the continuous session data stream of the target business as the input session data set; based on the input session data set and the model prompt words corresponding to the target business, the target model is run to generate the session analysis result. The trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter obtained by objective optimization calculation are realized, and the continuous session data stream is continuously analyzed through the target model, thereby improving the real-time, accuracy and efficiency of the session data analysis.
[0080] Figure 3 Schematic diagram of the structure of a model parameter processing device provided by an embodiment of the present disclosure. Figure 3 As shown, the model parameter processing device 300 includes:
[0081] A historical session data set acquisition module 310 is used to acquire a historical session data set of a target service;
[0082] The initial value determination module 320 is used to determine the trigger initial value of the model trigger parameter and the input quantity initial value of the model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the operation of the target model;
[0083] The target value determination module 330 is used to perform multiple iterative optimization and solution processing on the model trigger parameters and the model input quantity parameters based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameters and the input quantity critical value of the model input quantity parameters using the target model until the iteration end condition is reached, and determine the trigger target value of the model trigger parameters and the input quantity target value of the model input quantity parameters.
[0084] The model parameter processing device provided by the embodiment of the present disclosure can obtain the historical session data set of the target business; determine the trigger initial value of the model trigger parameter and the input quantity initial value of the model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the operation of the target model; based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, using the target model, the model trigger parameter and the model input quantity parameter are optimized and solved for multiple iterations until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined. It is realized that the historical conversation data of a certain business is used to calculate the two hyperparameters of the model with conversation analysis function adopted by the business through an optimization algorithm, so as to obtain the parameter values of the model trigger parameters and the parameter values of the model input parameters that are more suitable for the business, thereby avoiding the problem of insufficient accuracy and poor stability of the two parameters of the same business due to differences in human experience, improving the accuracy and stability of the two parameter values, and thus improving the accuracy of the above-mentioned model in analyzing the conversation data of the business.
[0085] In some embodiments, the target value determination module 330 includes:
[0086] A current value determination submodule, used to determine the trigger initial value and the input quantity initial value as the trigger current value and the input quantity current value of the current iteration process respectively;
[0087] The model running submodule is used to split the historical session data set based on the current value of the trigger and the current value of the input quantity to generate multiple historical session data subsets, and use each historical session data subset to run the target model respectively to generate corresponding model output results;
[0088] The current value update submodule is used to optimize and solve the model trigger parameters and model input quantity parameters based on the output results of each model, the trigger critical value and the input quantity critical value, using a preset optimization algorithm, generate an optimized solution for the current iterative process, and use the optimized solution to update the trigger current value and the input quantity current value;
[0089] The target value determination submodule is used to return to the step of dividing the historical session data set based on the trigger current value and the input current value to generate multiple historical session data subsets if the iteration end condition is not met, until the iteration end condition is met, and the updated trigger current value and input current value are determined as the trigger target value of the model trigger parameter and the input target value of the model input parameter, respectively.
[0090] In some embodiments, the current value updating submodule is specifically used for:
[0091] Determine the model evaluation result in the current iteration process based on the output results of each model;
[0092] Under the constraints of the trigger critical value, input critical value and the function value of maximizing the objective function of the preset optimization algorithm, based on the model evaluation results, the variable value update algorithm in the preset optimization algorithm is used to adjust the model trigger parameters and model input parameters to generate the optimal solution for the current iterative process.
[0093] In some embodiments, when the target service includes a service of extracting information from conversation content, the model evaluation parameter includes the number of dimensions of the extracted information and / or the quality of the extracted information.
[0094] In some embodiments, the historical session data set acquisition module 310 is specifically used to:
[0095] Filtering session data corresponding to a target business from multiple pieces of original session data to determine multiple pieces of intermediate session data;
[0096] According to the number of intermediate session data corresponding to the session identifier, each intermediate session data is divided into a plurality of session intervals;
[0097] Based on the proportion of the intermediate session data contained in each session interval, session data is sampled from each session interval to generate a historical session data set.
[0098] In some embodiments, the model parameter processing device 300 further includes:
[0099] The current session data acquisition module is used to acquire the current session data of the target business;
[0100] An input session data set extraction module is used to extract session data of an input volume target value from a continuous session data stream of a target service as an input session data set if the current session data reaches a trigger target value;
[0101] The conversation analysis result generation module is used to run the target model and generate the conversation analysis result based on the input conversation data set and the model prompt words corresponding to the target business.
[0102] In some embodiments, the input session data set extraction module is specifically used to:
[0103] If the current session data meets the filtering condition corresponding to the target service and reaches the trigger target value, the session data of the input volume target value is extracted from the continuous session data stream of the target service as the input session data set.
[0104] The model parameter processing device provided in the embodiments of the present disclosure can execute the model parameter processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0105] It is worth noting that in the embodiment of the above-mentioned model parameter processing device, the various modules and sub-modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules / sub-modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.
[0106] The embodiment of the present disclosure also provides an electronic device, comprising: one or more processors and a memory; wherein the memory is used to store one or more programs or instructions. When the one or more programs or instructions are executed by the one or more processors, the one or more processors implement the model parameter processing method provided by any embodiment of the present disclosure.
[0107] Figure 4 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the electronic device 400 includes a processor 401, a memory 402, an input device 403 and an output device 404, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown). The number of the processor 401 and the memory 402 can be one or more, Figure 4 In the figure, a processor 401 and a memory 402 are taken as an example. .
[0108] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0109] The memory 402 may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. In some embodiments, the memory 902 may further include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the electronic device 900 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 a combination thereof. One or more computer programs or instructions may be stored in the above-mentioned memory 402, and the processor 401 may run these programs or instructions to implement the model parameter processing method and / or other desired functions described in any embodiment of the present disclosure. Various contents such as trigger initial value, input quantity initial value, trigger target value, input quantity target value, etc. may also be stored in the above-mentioned memory 902.
[0110] The input device 403 may include, for example, a keyboard, a mouse, etc. The output device 404 may output various information to the outside, including the determined trigger target value and input amount target value, the output session analysis result, etc. The output device 404 may include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.
[0111] Understandably, for simplicity, Figure 4 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.
[0112] In addition to the above methods and devices, the model parameter processing method in any embodiment of the present disclosure can also be implemented as a computer software program. For example, the present disclosure embodiment also includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory. When the computer program is executed by a processor, the processor executes the model parameter processing method provided in any embodiment of the present disclosure.
[0113] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0114] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the processor executes the model parameter processing method provided by the embodiment of the present disclosure.
[0115] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0116] It should be noted that the terms used in the present disclosure are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present disclosure specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any one and all combinations of one or more related listed items. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0117] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A model parameter processing method, characterized in that: include: Obtain a set of historical session data of the target business; Determine a trigger initial value of a model trigger parameter and an input quantity initial value of a model input quantity parameter; wherein the model trigger parameter is a parameter of the number of sessions that triggers the target model corresponding to the target business to start running; the model input quantity parameter is a parameter of the number of sessions input during the running of the target model; Based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter, the model trigger parameter and the model input quantity parameter are optimized and solved for multiple iterations using the target model until the iteration end condition is reached, and the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter are determined.
2. The method according to claim 1, characterized in that The method of performing multiple iterations of optimization and solving processing on the model trigger parameters and the model input quantity parameters based on the historical session data set, the trigger initial value, the input quantity initial value, the trigger critical value of the model trigger parameter and the input quantity critical value of the model input quantity parameter using the target model until an iteration end condition is reached to determine the trigger target value of the model trigger parameter and the input quantity target value of the model input quantity parameter includes: Determine the trigger initial value and the input quantity initial value as the trigger current value and the input quantity current value of the current iteration process respectively; The historical session data set is divided based on the trigger current value and the input current value to generate multiple historical session data subsets, and the target model is respectively run using each of the historical session data subsets to generate corresponding model output results; Based on the output results of each model, the trigger critical value and the input critical value, the model trigger parameters and the model input parameters are optimized and solved by using a preset optimization algorithm to generate an optimized solution for the current iterative process, and the current trigger value and the current input value are updated by using the optimized solution; If the iteration end condition is not met, return to execute the step of dividing the historical session data set based on the trigger current value and the input current value to generate multiple historical session data subsets until the iteration end condition is met, and the updated trigger current value and input current value are respectively determined as the trigger target value of the model trigger parameter and the input target value of the model input parameter.
3. The method according to claim 2, characterized in that Based on the output results of each model, the trigger critical value and the input critical value, the model trigger parameters and the model input parameters are optimized and solved by using a preset optimization algorithm to generate an optimized solution for the current iterative process, including: Determine the model evaluation result in the current iteration process based on the output results of each model; Under the constraints of the trigger critical value, the input critical value and the function value of maximizing the objective function of the preset optimization algorithm, based on the model evaluation result, the variable value update algorithm in the preset optimization algorithm is used to adjust the model trigger parameters and the model input quantity parameters to generate an optimized solution for the current iterative process.
4. The method according to claim 3, characterized in that When the target service includes a service of extracting information from conversation content, the model evaluation parameter includes the number of dimensions of the extracted information and / or the quality of the extracted information.
5. The method according to claim 1, characterized in that The step of obtaining a historical session data set of a target service includes: Filtering the session data corresponding to the target service from the plurality of original session data to determine the plurality of intermediate session data; According to the number of the intermediate session data corresponding to the session identifier, each of the intermediate session data is divided into a plurality of session intervals; Based on the proportion of the intermediate session data contained in each session interval, session data is sampled from each session interval to generate the historical session data set.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining current session data of the target service; If the current session data reaches the trigger target value, extracting the session data of the input volume target value from the continuous session data flow of the target service as the input session data set; Based on the input conversation data set and the model prompt words corresponding to the target business, the target model is run to generate a conversation analysis result.
7. The method according to claim 6, characterized in that If the current session data reaches the trigger target value, extracting the session data of the input volume target value from the continuous session data flow of the target service as the input session data set includes: If the current session data meets the filtering condition corresponding to the target service and reaches the trigger target value, the session data of the input volume target value is extracted from the continuous session data flow of the target service as the input session data set.
8. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the model parameter processing method according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute the model parameter processing method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product is used to implement the model parameter processing method according to any one of claims 1 to 7.