A user intent parameter management system and method based on state machine
By recognizing and calculating user intent parameters using a state machine, and combining transaction rules and historical records, the problem of uncertain completion results in existing technologies has been solved, achieving more accurate completion of transaction requirements.
Patent Information
- Application Number
- CN202611282804.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies ignore the user's selection bias during the modification process when completing natural language transaction descriptions, leading to uncertainty in the completion results. In particular, when there are omissions in the final text, it is impossible to accurately reflect the user's transaction conditions.
A user intent parameter management system based on a state machine is adopted. By identifying parameters in transaction requirements and requirement modification records, the system calculates verification deviation, missing degree, and variability, filters candidate parameters, calculates content relevance, and finally determines supplementary parameters to form a complete transaction requirement.
It improves the accuracy of the completion process, ensuring that the completion result is consistent with the transaction conditions gradually determined by the user, taking into account transaction rules and historical records, and reducing the uncertainty of the completion result.
Smart Images

Figure CN123068481A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis, specifically to a user intent parameter management system and method based on a state machine. Background Technology
[0002] With the continuous development of electronic trading services and natural language processing technology, automatically forming complete transaction content based on the natural language transaction description submitted by users has become an important development direction in the field of intelligent trading.
[0003] Existing technologies for completing natural language transaction descriptions typically treat the user's final submitted text as the primary processing object, determining the content to be added based on the content already retained in the text. However, during the process of forming a transaction description, users often add, delete, or replace the same content. Different modification operations and their order can reflect the user's preference for relevant transaction content; even if two users submit the same text, their selection preferences formed during the modification process may differ significantly. Existing completion strategies generally ignore this preference exhibited by users during the modification process, resulting in completion results that, while meeting the formal requirements of completeness, deviate from the transaction conditions gradually determined by the user through modification operations. Especially when the final text still contains omissions, and the same gap corresponds to multiple possible additions, ignoring the user's modification preferences will lead to significant uncertainty in the completion results. Summary of the Invention
[0004] The purpose of this invention is to provide a user intent parameter management system and method based on a state machine to solve the problems raised in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for managing user intent parameters based on a state machine, comprising the following steps: The system obtains user-submitted transaction requests and request modification records, identifies parameter names and values in the transaction requests and request modification records to obtain identified parameters; identifies parameters that conform to the transaction rules are used as valid parameters, other identified parameters are used as parameters to be analyzed, and the verification deviation, missing degree, and variability of the parameters to be analyzed are calculated. Furthermore, the parameter names include transaction type, transaction object, target quantity, and transaction time limit; Preset the type code corresponding to the transaction type and the object code corresponding to the transaction object; Each state machine is configured with a corresponding identification state for each parameter name. Transaction requirements and requirement modification records are input into the state machine. The state machine converts the transaction type and transaction object in the transaction requirements and requirement modification records into type codes and object codes according to the identification state. It also identifies the quantity value corresponding to the target quantity and the time limit value corresponding to the transaction time limit. For parameter values that are not identified, blank values are configured. The parameter values include the type code, object code, quantity value, and time limit value corresponding to the parameter name. For requirement modification records, the state machine identifies the parameter name modified by the user and the original and modified values corresponding to the parameter values according to the identification state, and records the corresponding modification time. The transaction rules are the allowed ranges of allowed values for each parameter, including a minimum allowed value and a maximum allowed value; parameters whose values fall within the corresponding transaction rules are considered valid parameters, and other identified parameters are considered parameters to be analyzed.
[0006] Furthermore, the process of calculating the validation bias, missing value, and variability of the parameters to be analyzed includes: For the parameter to be analyzed whose parameter value is not missing, calculate the absolute difference between its parameter value and the corresponding allowable value, and take the smallest absolute difference as the rule difference; take the sum of the rule difference and the difference between the maximum allowable value and the minimum allowable value as the total verification amount, and take the proportion of the rule difference in the total verification amount as the verification deviation; for the parameter to be analyzed whose parameter value is missing, the verification deviation is set to zero. The total number of parameter values for all parameters to be analyzed is counted as the total number of parameter values. At the same time, the number of parameter values that are missing is counted as the number of missing items. The proportion of the number of missing items in the total number of parameter values is the missingness. Arrange the requirement modification records in order of modification time from earliest to latest to obtain the modification sequence. Use the proportion of the modification order value of each requirement modification record in the modification sequence to the sum of all modification order values as the order weight. For each parameter to be analyzed, the sum of the order weights of the requirement modification records with the same parameter name as the parameter to be analyzed is used as the parameter weight; the sum of the order weights of all requirement modification records in the modification sequence is used as the total weight, and the proportion of the parameter weight in the total weight is used as the degree of variation of the parameter to be analyzed; if there are no requirement modification records in the modification sequence, the degree of variation is zero.
[0007] Historical records are filtered according to transaction rules and valid parameters to obtain filtered records; candidate parameters are obtained by matching the filtered records with the parameters to be analyzed; the occurrence ratio of each candidate parameter in the filtered records is calculated to obtain the content relevance; the content relevance is adjusted according to the missing degree and the degree of change to form the relevance quantity; the maximum relevance quantity is compared with the verification deviation to obtain the supplementation degree of each parameter to be analyzed. Furthermore, the process of obtaining the filtered records includes: For each historical record, each historical parameter value is compared with the allowed range of parameter names in the transaction rules, and the number of historical parameter values within the corresponding allowed range is counted as the rule compliance number; each valid parameter is compared with the historical parameters in the historical records, and the number of historical parameters with the same parameter name and parameter value as any valid parameter is counted as the valid compliance number, and the sum of the rule compliance number and the valid compliance number is the record compliance quantity; The total number of historical parameter values in the historical records is used as the number of rule verification items, and the total number of valid parameters is used as the number of valid verification items. The sum of the number of rule verification items and the number of valid verification items is used as the record verification quantity. The proportion of the record conformity quantity in the record verification quantity is used as the record matching degree. Historical records whose record matching degree reaches the preset filtering threshold are used as the filtered records.
[0008] Furthermore, the process of obtaining candidate parameters and content relevance includes: For each parameter to be analyzed, historical parameters in each screening record whose parameter names are the same as those of the parameter to be analyzed are regarded as historical parameters with the same name; historical parameters with the same name whose historical parameter values are the same are grouped into the same analysis group, and the parameter name of the parameter to be analyzed is combined with the historical parameter value corresponding to each analysis group to obtain candidate parameters; For each candidate parameter, its parameter name and value are compared with the historical parameter names and values in each filter record. Filter records that contain historical parameters with the same parameter name and value as the candidate parameter are selected as candidate matching records. The number of candidate matching records is taken as the candidate occurrence count, and the total number of all filter records is taken as the total number of filter records. The proportion of the candidate occurrence count in the total number of filter records is taken as the content relevance of the candidate parameter.
[0009] Furthermore, the process of obtaining correlation and complementarity includes: For each parameter to be analyzed, the weighted sum of the missing value and the variability of the parameter to be analyzed is used as the correlation modifier; the product of the correlation modifier and the content correlation of each candidate parameter corresponding to the parameter to be analyzed is used as the correlation value of each candidate parameter. The maximum value among the correlation values of all candidate parameters corresponding to the same parameter to be analyzed is taken as the maximum correlation value, and the larger value between the maximum correlation value and the verification deviation of the parameter to be analyzed is taken as the complementarity of the parameter to be analyzed.
[0010] The parameters to be analyzed are arranged according to their supplementation degree to form a supplementary sequence; the candidate fit degree between the candidate parameters and the transaction rules is verified, and the modification fit degree is calculated based on the candidate parameters and the requirement modification record; a supplementary score is obtained based on the candidate fit degree, modification fit degree, and content relevance; the candidate parameter with the highest supplementary score is taken as the supplementary parameter, and the completed transaction requirements are obtained based on the supplementary parameter.
[0011] Furthermore, the calculation process for candidate fit, modified fit, and supplementary scoring includes: For candidate parameters whose parameter values are less than the corresponding minimum allowable value, the absolute difference between their parameter values and the minimum allowable value is used as the candidate rule difference; for candidate parameters whose parameter values are greater than the corresponding maximum allowable value, the absolute difference between their parameter values and the maximum allowable value is used as the candidate rule difference; the candidate rule difference for candidate parameters whose parameter values are within the corresponding allowable range is set to zero. The difference between the maximum and minimum allowed values in the transaction rules is taken as the allowed span. The sum of the candidate rule difference and the corresponding allowed span is taken as the total candidate verification. The proportion of the allowed span in the total candidate verification is taken as the candidate fit degree of the candidate parameter. When the total candidate verification is zero, the candidate fit degree is set to 1. For each candidate parameter, the modification records in the modification sequence that have the same parameter name as the candidate parameter, the same modified value as the candidate parameter, and different values before modification are considered as candidate consistency records. Modification records that have the same parameter name as the candidate parameter, the same value before modification as the candidate parameter, and different value after modification are designated as candidate deviation records. The sum of the order weights corresponding to each candidate consistent record is used as the consistency weight, the sum of the order weights corresponding to each candidate deviation record is used as the deviation weight, the sum of the consistency weight and the deviation weight is used as the modification verification quantity, and the proportion of the consistency weight in the modification verification quantity is used as the modification fit degree of the candidate parameter; when the modification verification quantity is zero, the modification fit degree is set to 1. The product of candidate fit, modified fit, and content relevance is used as a supplementary score for each candidate parameter.
[0012] Furthermore, the process of obtaining the completed transaction requirements includes: The candidate parameter with the largest supplementary score corresponding to the parameter to be analyzed is taken as the supplementary parameter of the parameter to be analyzed; if the candidate parameter corresponding to the largest supplementary score is not unique, the supplementary parameter is selected from the candidate parameters corresponding to the non-unique largest supplementary score in descending order of priority of candidate fit, modification consistency and content relevance; if the candidate parameter is still not unique, the candidate parameter with the smaller parameter value is taken as the supplementary parameter. The transaction demand is taken as the first demand to be supplemented corresponding to the parameter to be analyzed in the supplementary sequence. When the parameter value of the current parameter to be analyzed is empty, the parameter value of the supplementary parameter is written into the corresponding empty value position in the demand to be supplemented. When the verification deviation of the current parameter to be analyzed is greater than zero, the parameter value of the supplementary parameter replaces the parameter value in the demand to be supplemented that corresponds to the parameter name of the current parameter to be analyzed. The demand to be supplemented after writing or replacement is taken as the updated demand. The updated demand is used as the next demand to be analyzed in the supplementary sequence. When the current parameter to be analyzed is at the end of the supplementary sequence, the updated demand is used as the completed transaction demand.
[0013] A user intent parameter management system based on a state machine includes a parameter identification module, a parameter verification module, a candidate analysis module, a supplementary evaluation module, and a requirement completion module. The parameter recognition module is used to obtain the transaction requirements and modification records submitted by the user, and to identify the parameter names and parameter values in the transaction requirements and modification records through a state machine to form recognition parameters. The parameter verification module is used to determine the identification parameters that conform to the transaction rules as valid parameters, determine other identification parameters as parameters to be analyzed, and calculate the verification deviation, missing degree and variability of the parameters to be analyzed. The candidate analysis module is used to determine the screening records from the historical records according to the transaction rules and valid parameters, form candidate parameters using the parameters to be analyzed and the screening records, determine the content relevance based on the occurrence ratio of the candidate parameters in the screening records, adjust the content relevance using the missing degree and the degree of change to form the relevance quantity, and determine the supplementation degree of each parameter to be analyzed based on the maximum relevance quantity and the verification deviation. The supplementary evaluation module is used to form a supplementary sequence by determining the order of the parameters to be analyzed according to the supplementary degree, to verify the candidate fit between the candidate parameters and the transaction rules, to calculate the modification fit using the candidate parameters and the requirement modification record, and to determine the supplementary score based on the candidate fit, modification fit, and content relevance. The requirement completion module is used to determine the candidate parameter with the largest supplementary score as the supplementary parameter, and use the supplementary parameter to supplement the transaction requirement to form the completed transaction requirement.
[0014] The output of the parameter identification module is connected to the input of the parameter verification module; the output of the parameter verification module is connected to the input of the candidate analysis module; the output of the candidate analysis module is connected to the input of the supplementary evaluation module; and the output of the supplementary evaluation module is connected to the input of the requirement completion module.
[0015] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention uses a state machine to identify the parameter names and values in transaction requirements and requirement modification records, distinguishes between valid parameters and parameters to be analyzed by combining transaction rules, and calculates the verification deviation, missing degree, and variability, so that missing parameters and parameters that exceed the allowable range can be uniformly identified, providing a clear data foundation for subsequent parameter supplementation.
[0016] 2. This invention filters historical records through transaction rules and valid parameters, forms candidate parameters based on the parameters to be analyzed, and calculates the content relevance. Then, it adjusts the content relevance using missing value and variability, and determines the supplementation degree by combining the maximum relevance and the verification deviation. This allows the processing order of the parameters to be analyzed to simultaneously reflect parameter missingness, modification changes, and rule deviations.
[0017] 3. This invention calculates supplementary scores by considering candidate fit, modification fit, and content relevance. Supplementary parameters are determined from the candidate parameters, and missing values or abnormal parameter values are written in the supplementary sequence one by one. This makes the completion process take into account transaction rules, historical records, and requirement modification records, thereby improving the consistency between the completed transaction requirements and the transaction conditions gradually determined by the user. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a user intent parameter management method based on a state machine according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example: Figure 1 As shown, the present invention provides a technical solution, a user intent parameter management method based on a state machine, the method comprising the following steps: The system obtains user-submitted transaction requests and request modification records, identifies parameter names and values in the transaction requests and request modification records to obtain identified parameters; identifies parameters that conform to the transaction rules are used as valid parameters, other identified parameters are used as parameters to be analyzed, and the verification deviation, missing degree, and variability of the parameters to be analyzed are calculated. The parameter names include transaction type, transaction object, target quantity, and transaction time limit; Preset the type code corresponding to the transaction type and the object code corresponding to the transaction object; Each state machine is configured with a corresponding identification state for each parameter name. Transaction requirements and requirement modification records are input into the state machine. The state machine converts the transaction type and transaction object in the transaction requirements and requirement modification records into type codes and object codes according to the identification state. It also identifies the quantity value corresponding to the target quantity and the time limit value corresponding to the transaction time limit. For parameter values that are not identified, blank values are configured. The parameter values include the type code, object code, quantity value, and time limit value corresponding to the parameter name. For requirement modification records, the state machine identifies the parameter name modified by the user and the original and modified values corresponding to the parameter values according to the identification state, and records the corresponding modification time. The transaction rules are the allowed ranges of allowed values for each parameter, including a minimum allowed value and a maximum allowed value; parameters whose values fall within the corresponding transaction rules are considered valid parameters, and other identified parameters are considered parameters to be analyzed.
[0021] In this embodiment, the bulk liquid chemical raw material trading platform in the bulk water industry receives a transaction request submitted by a chemical company. The transaction request records the purchase of industrial methanol with a target quantity of 5,500 tons, and the transaction time limit is not filled in. The operation log of the same transaction session recorded 4 requirement modification records, with modification times of 09:02, 09:05, 09:08, and 09:11 respectively; The changes are as follows: the trading object is changed from ethylene glycol to industrial methanol; the target quantity is changed from 4800 t to 5200 t; the trading time limit is changed from 48 h to 72 h; and the target quantity is changed from 5200 t to 5500 t. For example, the transaction type is converted into a type code according to the fixed sorting position in the business dictionary, with procurement at the first position and the type code being 1; the transaction object is converted into an object code according to the registration number of the chemical master data, with the registration number of industrial methanol being 101 and the object code being 101; the state machine sequentially enters the transaction type identification state, the transaction object identification state, the target quantity identification state, and the transaction time limit identification state, obtaining the type code 1, the object code 101, the quantity value 5500 t, and the vacancy value; In this embodiment, the business dictionary includes three transaction types: purchase, sales, and exchange, with the allowed range of type codes being 1 to 3; the registration serial number of bulk liquid chemical raw materials that have passed enterprise compliance review in the material master data is 101 to 180, and the allowed range of object codes is 101 to 180. The safe operating capacity of the receiving storage tank is 5200 t, the required buffer capacity is 200 t, and the maximum allowable quantity is calculated to be 5000 t. The minimum full load of the qualified tank truck is 30 t, and the allowable range of the target quantity is 30 t to 5000 t. Chemical compliance review and capacity confirmation require at least 24 hours, the validity period of spot quotations and inventory commitments is 168 hours, and the allowable range of transaction time limits is 24 hours to 168 hours. In other business operations, the coding boundaries are updated with the business dictionary and material master data, the quantity boundaries are calculated based on the minimum executable transport batch and storage safety capacity, and the time limit boundaries are determined based on the shortest period required to complete the review and the longest period of commitment to sustainability. For example, both type code 1 and object code 101 are within their respective allowed ranges, and are therefore considered valid parameters; the quantity value of 5500 t exceeds the maximum allowed value, and the transaction time limit is a missing value, so the target quantity and transaction time limit are considered parameters to be analyzed. The process of calculating the validation bias, missing value, and variability of the parameters to be analyzed includes: For the parameter to be analyzed whose parameter value is not missing, calculate the absolute difference between its parameter value and the corresponding allowable value, and take the smallest absolute difference as the rule difference; take the sum of the rule difference and the difference between the maximum allowable value and the minimum allowable value as the total verification amount, and take the proportion of the rule difference in the total verification amount as the verification deviation; for the parameter to be analyzed whose parameter value is missing, the verification deviation is set to zero. The process of calculating the verification deviation includes: ; ; ; Where k represents the index of the parameter to be analyzed, x k Represents the parameter value, L k U represents the minimum allowed value. k Represents the maximum allowable value, δ k Represents the rule difference, c k e represents the total amount of verification. k This represents the verification deviation. This represents the missing value; min represents taking the minimum value. In this embodiment, the rule difference for the target quantity is 500 t, the total verification quantity is 5470 t, and the verification deviation is 0.0914; the parameter value for the transaction time limit is a blank value, and the verification deviation is 0. The total number of parameter values for all parameters to be analyzed is counted as the total number of parameter values. At the same time, the number of parameter values that are missing is counted as the number of missing items. The proportion of the number of missing items in the total number of parameter values is the missingness. For example, the target quantity and the transaction time limit constitute two parameters to be analyzed, with a total of 2 parameter values. The missing value corresponding to the transaction time limit forms one missing item. In this embodiment, the missing value is 0.5. Arrange the requirement modification records in order of modification time from earliest to latest to obtain the modification sequence. Use the proportion of the modification order value of each requirement modification record in the modification sequence to the sum of all modification order values as the order weight. For each parameter to be analyzed, the sum of the order weights of the requirement modification records with the same parameter name as the parameter to be analyzed is used as the parameter weight; the sum of the order weights of all requirement modification records in the modification sequence is used as the total weight, and the proportion of the parameter weight in the total weight is used as the degree of variation of the parameter to be analyzed; if there are no requirement modification records in the modification sequence, the degree of variation is zero.
[0022] In this embodiment, the four modification records in the operation log are arranged in a modification sequence from earliest to latest time. The process of calculating the order weight includes: ; Where i represents the modification order value of the requirement modification record, j represents the summation index, Q represents the total number of requirement modification records, and w i The order weights represent the i-th request modification record; in this embodiment, the obtained order weights are 0.1, 0.2, 0.3, and 0.4 respectively. In this embodiment, the process of calculating the degree of variability includes: ; ; ; Among them, I k Modify the record index set, p, for the requirement that the parameter name is the same as the k-th parameter to be analyzed. k Here, W represents the parameter weights, and v represents the total weights. k For the degree of variability; In this embodiment, the target quantity corresponds to the second and fourth requirement modification records, with a parameter weight of 0.6 and a variability of 0.6; the transaction time limit corresponds to the third requirement modification record, with a parameter weight of 0.3 and a variability of 0.3. In another optional embodiment, the transaction session operation log does not record requirement modifications, the total number of requirement modification records in the modification sequence is 0, and the degree of change of the parameter to be analyzed is 0. Historical records are filtered according to transaction rules and valid parameters to obtain filtered records; candidate parameters are obtained by matching the filtered records with the parameters to be analyzed; the occurrence ratio of each candidate parameter in the filtered records is calculated to obtain the content relevance; the content relevance is adjusted according to the missing degree and the degree of change to form the relevance quantity; the maximum relevance quantity is compared with the verification deviation to obtain the supplementation degree of each parameter to be analyzed. The process of obtaining the filtered records includes: For each historical record, each historical parameter value is compared with the allowed range of parameter names in the transaction rules, and the number of historical parameter values within the corresponding allowed range is counted as the rule compliance number; each valid parameter is compared with the historical parameters in the historical records, and the number of historical parameters with the same parameter name and parameter value as any valid parameter is counted as the valid compliance number, and the sum of the rule compliance number and the valid compliance number is the record compliance quantity; The total number of historical parameter values in the historical records is used as the number of rule verification items, and the total number of valid parameters is used as the number of valid verification items. The sum of the number of rule verification items and the number of valid verification items is used as the record verification quantity. The proportion of the record conformity quantity in the record verification quantity is used as the record matching degree. Historical records whose record matching degree reaches the preset filtering threshold are used as the filtered records.
[0023] In this embodiment, the historical records are derived from 120 bulk liquid chemical raw material transaction records that the company has fulfilled and confirmed on the platform. Each historical record contains four historical parameter values: transaction type, transaction object, target quantity, and transaction time limit. The total number of valid parameters is 2, and the record verification quantity is 6. To accommodate one non-critical difference caused by manual entry, and to exclude records with two or more differences, the screening threshold is set to 0.8333 for this example. For other business operations, the screening threshold will be recalculated based on the number of non-critical differences allowed to be retained during quality review and the actual record verification quantity.
[0024] For example, the process of calculating record matching degree includes: ; Where s represents the historical record index, A s B represents the number of items that meet the rule. s C represents the number of valid matching items. s R represents the number of rule validation items, D represents the number of valid validation items, and R represents the number of valid validation items. s Represents the record matching degree; In this embodiment, a certain historical record has a type code of 1, an object code of 101, a target quantity of 4800 t, a transaction time limit of 72 h, and a record matching degree of 1. Another record has a type code of 1, an object code of 101, a target quantity of 5200 t, a transaction time limit of 48 h, and a record matching degree of 0.8333. Both of these records are used as filter records. There were also records where the target quantity and transaction time limit did not meet the corresponding allowed range, and the record matching degree was 0.6667. These records were not selected as filter records, resulting in 60 filter records in total. The process of obtaining candidate parameters and content relevance includes: For each parameter to be analyzed, historical parameters in each screening record whose parameter names are the same as those of the parameter to be analyzed are regarded as historical parameters with the same name; historical parameters with the same name whose historical parameter values are the same are grouped into the same analysis group, and the parameter name of the parameter to be analyzed is combined with the historical parameter value corresponding to each analysis group to obtain candidate parameters; For each candidate parameter, its parameter name and value are compared with the historical parameter names and values in each filter record. Filter records that contain historical parameters with the same parameter name and value as the candidate parameter are selected as candidate matching records. The number of candidate matching records is taken as the candidate occurrence count, and the total number of all filter records is taken as the total number of filter records. The proportion of the candidate occurrence count in the total number of filter records is taken as the content relevance of the candidate parameter.
[0025] After historical parameters with the same name are grouped into analysis groups according to their historical parameter values, candidate parameters are formed. The process of calculating the content relevance includes: ; Where k represents the index of the parameter to be analyzed, j represents the index of the candidate parameter, and n kj N represents the number of candidates. s h represents the total number of records to be filtered. kj Represents the relevance of content; In this embodiment, the candidate parameters for target quantities of 4800 t, 5000 t, and 5200 t correspond to 30, 24, and 3 candidate matching records, respectively, with content relevance of 0.5, 0.4, and 0.05. The candidate parameters for transaction time limits of 72 h and 48 h correspond to 36 and 18 candidate matching records, respectively, with content relevance of 0.6 and 0.3.
[0026] The process of obtaining correlation and complementarity includes: For each parameter to be analyzed, the weighted sum of the missing value and the variability of the parameter to be analyzed is used as the correlation modifier; the product of the correlation modifier and the content correlation of each candidate parameter corresponding to the parameter to be analyzed is used as the correlation value of each candidate parameter. The maximum value among the correlation values of all candidate parameters corresponding to the same parameter to be analyzed is taken as the maximum correlation value, and the larger value between the maximum correlation value and the verification deviation of the parameter to be analyzed is taken as the complementarity of the parameter to be analyzed.
[0027] In this embodiment, the platform uses 600 previously manually verified completion results to calculate the weights. Under the constraint that the sum of the missing weight and the variable weight is 1, and with the goal of minimizing the completion error rate of the verification samples, a missing weight of 0.55 and a variable weight of 0.45 are obtained, corresponding to a verification accuracy of 0.918. Other business operations can use the most recent batch of manually verified completion results covering the main transaction types to recalculate the weights. When the sample size is insufficient, the missing weight and the variable weight are kept equal to avoid a single factor dominating the correlation adjustment. In this embodiment, the process of calculating the correlation adjustment amount and the correlation amount includes: ; ; Where α represents the missing weight, β represents the variable weight, d represents the degree of missing data, and v k Represents the degree of variability, a k h represents the related moderating amount. kj b represents the relevance of the content kj The maximum correlation value is taken as the maximum correlation value among the correlation values of all candidate parameters corresponding to the same parameter to be analyzed, and the larger of the verification deviation between the maximum correlation value and the parameter to be analyzed is taken as the complementarity of the parameter to be analyzed. In this embodiment, for example, the correlation adjustment amount of the target quantity is 0.545, the maximum correlation amount is 0.2725, and the complementarity is 0.2725; the correlation adjustment amount of the transaction time limit is 0.410, the maximum correlation amount is 0.2460, and the complementarity is 0.2460, with the complementarity sequence being the target quantity and the transaction time limit in sequence.
[0028] The parameters to be analyzed are arranged according to their supplementation degree to form a supplementary sequence; the candidate fit degree between the candidate parameters and the transaction rules is verified, and the modification fit degree is calculated based on the candidate parameters and the requirement modification record; a supplementary score is obtained based on the candidate fit degree, modification fit degree, and content relevance; the candidate parameter with the highest supplementary score is taken as the supplementary parameter, and the completed transaction requirements are obtained based on the supplementary parameter.
[0029] The calculation process for candidate fit, modified fit, and supplementary scoring includes: For candidate parameters whose parameter values are less than the corresponding minimum allowable value, the absolute difference between their parameter values and the minimum allowable value is used as the candidate rule difference; for candidate parameters whose parameter values are greater than the corresponding maximum allowable value, the absolute difference between their parameter values and the maximum allowable value is used as the candidate rule difference; the candidate rule difference for candidate parameters whose parameter values are within the corresponding allowable range is set to zero. The difference between the maximum and minimum allowed values in the transaction rules is taken as the allowed span. The sum of the candidate rule difference and the corresponding allowed span is taken as the total candidate verification. The proportion of the allowed span in the total candidate verification is taken as the candidate fit degree of the candidate parameter. When the total candidate verification is zero, the candidate fit degree is set to 1. In this embodiment, the process of calculating the candidate fitness includes: ; ; ; ; Among them, y kj L represents the candidate parameter value. k U represents the minimum allowed value. k Represents the maximum allowed value, γ kj λ represents the difference between candidate rules. k τ represents the allowed span. kj f represents the total number of candidate verifications. kj represents the candidate fit, k represents the index of the parameter to be analyzed, and j represents the index of the candidate parameter. In this embodiment, the candidate parameters for target quantities of 4800 t and 5000 t are both within the allowable range, and the candidate fit is 1 for both; the candidate parameter for target quantity of 5200 t is higher than the maximum allowable value, the candidate rule difference is 200 t, the total number of candidate verifications is 5170 t, and the candidate fit is 0.9613. In another optional embodiment, the target quantity in the filtered records is 20 t, the candidate parameter is lower than the minimum allowable value, the candidate rule difference is 10 t, the total candidate verification is 4980 t, and the candidate fit is 0.9980; when the transaction type is a blank value, the type code, minimum allowable value, and maximum allowable value of the corresponding candidate parameter are all 1, the total candidate verification is 0, and the candidate fit is 1; For each candidate parameter, the modification records in the modification sequence that have the same parameter name as the candidate parameter, the same modified value as the candidate parameter, and different values before modification are considered as candidate consistency records. Modification records that have the same parameter name as the candidate parameter, the same value before modification as the candidate parameter, and different value after modification are designated as candidate deviation records. The sum of the order weights corresponding to each candidate consistent record is used as the consistency weight, the sum of the order weights corresponding to each candidate deviation record is used as the deviation weight, the sum of the consistency weight and the deviation weight is used as the modification verification quantity, and the proportion of the consistency weight in the modification verification quantity is used as the modification fit degree of the candidate parameter; when the modification verification quantity is zero, the modification fit degree is set to 1. In this embodiment, the process of calculating the modified fit includes: ; ; ; Among them, C kj P represents the set of candidate consistent record indexes. kj w represents the set of candidate deviation record indexes. i u represents the order weight of the i-th request modification record. kj Represents consistent weight, o kj m represents the deviation from the weight. kj The value represents the modified fit, k represents the index of the parameter to be analyzed, and j represents the index of the candidate parameter. In this embodiment, the candidate parameter with a target quantity of 4800 t corresponds only to a deviation weight of 0.2, and the accuracy is modified to 0; the candidate parameter with a target quantity of 5000 t has no corresponding candidate consistency record or candidate deviation record, and the accuracy is modified to 1; the candidate parameter with a target quantity of 5200 t corresponds to a consistency weight of 0.2 and a deviation weight of 0.4, and the accuracy is modified to 0.3333; the candidate parameter with a transaction time limit of 72 h corresponds to a consistency weight of 0.3, and the accuracy is modified to 1; the candidate parameter with a transaction time limit of 48 h corresponds to a deviation weight of 0.3, and the accuracy is modified to 0.
[0030] The product of candidate fit, modified fit, and content relevance is used as a supplementary score for each candidate parameter.
[0031] In this embodiment, the supplementary scores for the candidate parameters with target quantities of 4800 t, 5000 t, and 5200 t are 0, 0.4, and 0.0160, respectively, and the supplementary parameter for the target quantity is 5000 t; the supplementary scores for the candidate parameters with transaction durations of 72 h and 48 h are 0.6 and 0, respectively, and the supplementary parameter for the transaction duration is 72 h.
[0032] The process of obtaining the completed transaction requirements includes: The candidate parameter with the largest supplementary score corresponding to the parameter to be analyzed is taken as the supplementary parameter of the parameter to be analyzed; if the candidate parameter corresponding to the largest supplementary score is not unique, the supplementary parameter is selected from the candidate parameters corresponding to the non-unique largest supplementary score in descending order of priority of candidate fit, modification consistency and content relevance; if the candidate parameter is still not unique, the candidate parameter with the smaller parameter value is taken as the supplementary parameter. In another optional embodiment, if the target quantity for a certain liquid alkali transaction is a blank value, candidate parameters with target quantities of 4000 t and 4500 t are selected from the records. Both candidate parameters have a candidate fit of 1, a modification fit of 1, a content relevance of 0.5, and a supplementary score of 0.5. The maximum supplementary score, candidate fit, modification fit, and content relevance are all the same, and the parameter with the smaller value of 4000 t is selected as the supplementary parameter. If the supplementary scores are the same but the candidate fits are different, the candidate parameter with the larger candidate fit is selected first; if the candidate fits are the same, the comparison continues according to the order of modification fit and content relevance. The transaction demand is taken as the first demand to be supplemented corresponding to the parameter to be analyzed in the supplementary sequence. When the parameter value of the current parameter to be analyzed is empty, the parameter value of the supplementary parameter is written into the corresponding empty value position in the demand to be supplemented. When the verification deviation of the current parameter to be analyzed is greater than zero, the parameter value of the supplementary parameter replaces the parameter value in the demand to be supplemented that corresponds to the parameter name of the current parameter to be analyzed. The demand to be supplemented after writing or replacement is taken as the updated demand. The updated demand is used as the next demand to be analyzed in the supplementary sequence. When the current parameter to be analyzed is at the end of the supplementary sequence, the updated demand is used as the completed transaction demand.
[0033] In this embodiment, the target quantity is located at the beginning of the supplementary sequence. The transaction demand is first used as the demand to be supplemented corresponding to the target quantity. The original quantity value of 5500 t is replaced by the supplementary parameter value of 5000 t, forming an updated demand that includes the target quantity of 5000 t. This updated demand continues to be used as the demand to be supplemented corresponding to the transaction time limit. The missing value is written by the supplementary parameter value of 72 h. The transaction time limit is located at the end of the supplementary sequence. The resulting completed transaction demand records the purchase of industrial methanol, the target quantity of 5000 t, and the transaction time limit of 72 h.
[0034] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A user intent parameter management method based on a state machine, characterized in that: The method includes the following steps: Obtain user-submitted transaction requests and request modification records; identify the parameter names and parameter values in the transaction requests and request modification records to obtain the identified parameters; select the identified parameters that conform to the transaction rules as valid parameters, select other identified parameters as parameters to be analyzed, and calculate the verification deviation, missing degree, and variability of the parameters to be analyzed. Historical records are filtered according to transaction rules and valid parameters to obtain filtered records; candidate parameters are obtained by matching the filtered records with the parameters to be analyzed; the occurrence ratio of each candidate parameter in the filtered records is calculated to obtain the content relevance; the content relevance is adjusted according to the missing degree and the degree of change to form the relevance quantity; the maximum relevance quantity is compared with the verification deviation to obtain the supplementation degree of each parameter to be analyzed. The parameters to be analyzed are arranged according to their supplementation degree to form a supplementary sequence; the candidate fit degree between the candidate parameters and the transaction rules is verified, and the modification fit degree is calculated based on the candidate parameters and the requirement modification record; a supplementary score is obtained based on the candidate fit degree, modification fit degree, and content relevance; the candidate parameter with the highest supplementary score is taken as the supplementary parameter, and the completed transaction requirements are obtained based on the supplementary parameter.
2. The user intent parameter management method based on a state machine according to claim 1, characterized in that: The parameter names include transaction type, transaction object, target quantity, and transaction time limit; Preset the type code corresponding to the transaction type and the object code corresponding to the transaction object; Each state machine is set with a corresponding identification state for each parameter name. The transaction requirements and requirement modification records are input into the state machine. The state machine converts the transaction type and transaction object in the transaction requirements and requirement modification records into type codes and object codes according to the identification state. It also identifies the quantity value corresponding to the target quantity and the time limit value corresponding to the transaction time limit. For parameter values that are not identified, blank values are configured. The parameter values include the type code, object code, quantity value, and time limit value corresponding to the parameter name. For the requirement modification record, the state machine identifies the parameter name modified by the user and the corresponding value before and after modification according to the identification state, and records the corresponding modification time. The transaction rules are the allowed ranges of allowed values for each parameter, including a minimum allowed value and a maximum allowed value; parameters whose values fall within the corresponding transaction rules are considered valid parameters, and other identified parameters are considered parameters to be analyzed.
3. The user intent parameter management method based on a state machine according to claim 2, characterized in that, The process of calculating the validation bias, missing value, and variability of the parameters to be analyzed includes: For the parameter to be analyzed whose parameter value is not missing, calculate the absolute difference between its parameter value and the corresponding allowable value, and take the smallest absolute difference as the rule difference; take the sum of the rule difference and the difference between the maximum allowable value and the minimum allowable value as the total verification amount, and take the proportion of the rule difference in the total verification amount as the verification deviation; for the parameter to be analyzed whose parameter value is missing, the verification deviation is set to zero. The total number of parameter values for all parameters to be analyzed is counted as the total number of parameter values. At the same time, the number of parameter values that are missing is counted as the number of missing items. The proportion of the number of missing items in the total number of parameter values is the missingness. Arrange the requirement modification records in order of modification time from earliest to latest to obtain the modification sequence. Use the proportion of the modification order value of each requirement modification record in the modification sequence to the sum of all modification order values as the order weight. For each parameter to be analyzed, the sum of the order weights of the requirement modification records with the same parameter name as the parameter to be analyzed is used as the parameter weight; the sum of the order weights of all requirement modification records in the modification sequence is used as the total weight, and the proportion of the parameter weight in the total weight is used as the degree of variation of the parameter to be analyzed; if there are no requirement modification records in the modification sequence, the degree of variation is zero.
4. The user intent parameter management method based on a state machine according to claim 3, characterized in that, The process of obtaining the filtered records includes: For each historical record, each historical parameter value is compared with the allowed range of parameter names in the transaction rules, and the number of historical parameter values within the corresponding allowed range is counted as the rule compliance number; each valid parameter is compared with the historical parameters in the historical records, and the number of historical parameters with the same parameter name and parameter value as any valid parameter is counted as the valid compliance number, and the sum of the rule compliance number and the valid compliance number is the record compliance quantity; The total number of historical parameter values in the historical records is used as the number of rule verification items, and the total number of valid parameters is used as the number of valid verification items. The sum of the number of rule verification items and the number of valid verification items is used as the record verification quantity. The proportion of the record conformity quantity in the record verification quantity is used as the record matching degree. Historical records whose record matching degree reaches the preset filtering threshold are used as the filtered records.
5. The user intent parameter management method based on a state machine according to claim 4, characterized in that, The process of obtaining candidate parameters and content relevance includes: For each parameter to be analyzed, historical parameters in each screening record whose parameter names are the same as those of the parameter to be analyzed are regarded as historical parameters with the same name; historical parameters with the same name whose historical parameter values are the same are grouped into the same analysis group, and the parameter name of the parameter to be analyzed is combined with the historical parameter value corresponding to each analysis group to obtain candidate parameters; For each candidate parameter, its parameter name and value are compared with the historical parameter names and values in each filter record. Filter records that contain historical parameters with the same parameter name and value as the candidate parameter are selected as candidate matching records. The number of candidate matching records is taken as the candidate occurrence count, and the total number of all filter records is taken as the total number of filter records. The proportion of the candidate occurrence count in the total number of filter records is taken as the content relevance of the candidate parameter.
6. The user intent parameter management method based on a state machine according to claim 5, characterized in that, The process of obtaining correlation and complementarity includes: For each parameter to be analyzed, the weighted sum of the missing value and the variability of the parameter to be analyzed is used as the correlation modifier; the product of the correlation modifier and the content correlation of each candidate parameter corresponding to the parameter to be analyzed is used as the correlation value of each candidate parameter. The maximum value among the correlation values of all candidate parameters corresponding to the same parameter to be analyzed is taken as the maximum correlation value, and the larger value between the maximum correlation value and the verification deviation of the parameter to be analyzed is taken as the complementarity of the parameter to be analyzed.
7. The user intent parameter management method based on a state machine according to claim 6, characterized in that, The calculation process for candidate fit, modified fit, and supplementary scoring includes: For candidate parameters whose parameter values are less than the corresponding minimum allowable value, the absolute difference between their parameter values and the minimum allowable value is used as the candidate rule difference; for candidate parameters whose parameter values are greater than the corresponding maximum allowable value, the absolute difference between their parameter values and the maximum allowable value is used as the candidate rule difference; the candidate rule difference for candidate parameters whose parameter values are within the corresponding allowable range is set to zero. The difference between the maximum and minimum allowed values in the transaction rules is taken as the allowed span. The sum of the candidate rule difference and the corresponding allowed span is taken as the total candidate verification. The proportion of the allowed span in the total candidate verification is taken as the candidate fit degree of the candidate parameter. When the total candidate verification is zero, the candidate fit degree is set to 1. For each candidate parameter, the modification records in the modification sequence that have the same parameter name as the candidate parameter, the same modified value as the candidate parameter, and different values before modification are considered as candidate consistency records. Modification records that have the same parameter name as the candidate parameter, the same value before modification as the candidate parameter, and different value after modification are designated as candidate deviation records. The sum of the order weights corresponding to each candidate consistent record is used as the consistency weight, the sum of the order weights corresponding to each candidate deviation record is used as the deviation weight, the sum of the consistency weight and the deviation weight is used as the modification verification quantity, and the proportion of the consistency weight in the modification verification quantity is used as the modification fit degree of the candidate parameter; when the modification verification quantity is zero, the modification fit degree is set to 1. The product of candidate fit, modified fit, and content relevance is used as a supplementary score for each candidate parameter.
8. The user intent parameter management method based on a state machine according to claim 7, characterized in that, The process of obtaining the completed transaction requirements includes: The candidate parameter with the largest supplementary score corresponding to the parameter to be analyzed is taken as the supplementary parameter of the parameter to be analyzed; if the candidate parameter corresponding to the largest supplementary score is not unique, the supplementary parameter is selected from the candidate parameters corresponding to the non-unique largest supplementary score in descending order of priority of candidate fit, modification consistency and content relevance; if the candidate parameter is still not unique, the candidate parameter with the smaller parameter value is taken as the supplementary parameter. The transaction demand is taken as the first demand to be supplemented corresponding to the parameter to be analyzed in the supplementary sequence. When the parameter value of the current parameter to be analyzed is empty, the parameter value of the supplementary parameter is written into the corresponding empty value position in the demand to be supplemented. When the verification deviation of the current parameter to be analyzed is greater than zero, the parameter value of the supplementary parameter replaces the parameter value in the demand to be supplemented that corresponds to the parameter name of the current parameter to be analyzed. The demand to be supplemented after writing or replacement is taken as the updated demand. The updated demand is used as the next demand to be analyzed in the supplementary sequence. When the current parameter to be analyzed is at the end of the supplementary sequence, the updated demand is used as the completed transaction demand.
9. A user intent parameter management system based on a state machine, applied to the user intent parameter management method based on a state machine as described in any one of claims 1-8, characterized in that: The system includes a parameter identification module, a parameter verification module, a candidate analysis module, a supplementary evaluation module, and a requirement completion module; The output of the parameter identification module is connected to the input of the parameter verification module; the output of the parameter verification module is connected to the input of the candidate analysis module; the output of the candidate analysis module is connected to the input of the supplementary evaluation module; and the output of the supplementary evaluation module is connected to the input of the requirement completion module.
10. A user intent parameter management system based on a state machine according to claim 9, characterized in that: The parameter recognition module is used to obtain the transaction requirements and modification records submitted by the user, and to identify the parameter names and parameter values in the transaction requirements and modification records through a state machine to form recognition parameters. The parameter verification module is used to determine the identification parameters that conform to the transaction rules as valid parameters, determine other identification parameters as parameters to be analyzed, and calculate the verification deviation, missing degree and variability of the parameters to be analyzed. The candidate analysis module is used to determine the screening records from the historical records according to the transaction rules and valid parameters, form candidate parameters using the parameters to be analyzed and the screening records, determine the content relevance based on the occurrence ratio of the candidate parameters in the screening records, adjust the content relevance using the missing degree and the degree of change to form the relevance quantity, and determine the supplementation degree of each parameter to be analyzed based on the maximum relevance quantity and the verification deviation. The supplementary evaluation module is used to form a supplementary sequence by determining the order of the parameters to be analyzed according to the supplementary degree, to verify the candidate fit between the candidate parameters and the transaction rules, to calculate the modification fit using the candidate parameters and the requirement modification record, and to determine the supplementary score based on the candidate fit, modification fit, and content relevance. The requirement completion module is used to determine the candidate parameter with the largest supplementary score as the supplementary parameter, and use the supplementary parameter to supplement the transaction requirement to form the completed transaction requirement.
