Parameter checking method and device, equipment, storage medium and program product

By performing multi-level detection and correction on the parameters of the intelligent agent system, the problems of low efficiency and low accuracy of parameter verification in the existing technology are solved, realizing efficient and accurate parameter verification in complex scenarios, and ensuring the stability of the intelligent agent system and user experience.

CN119474474BActive Publication Date: 2026-02-03SHANDONG INSPUR SCI RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411301737.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2026-02-03
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Existing parameter verification methods are inefficient and inaccurate, making it difficult to support automated task processing in complex scenarios for intelligent agent systems.

Method used

A multi-level parameter detection method is adopted to perform existence checks, data type checks, parameter format checks, and authenticity checks on the list of input parameters to be verified. Based on the check results, corresponding corrections are made to finally obtain the corrected target input parameter list.

Benefits of technology

It improves the accuracy and efficiency of parameter verification, ensuring that the intelligent agent system can accurately invoke skills in complex scenarios, enhancing the system's stability and robustness, and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474474B_ABST
    Figure CN119474474B_ABST
Patent Text Reader

Abstract

The application provides a parameter verification method, device and equipment, a storage medium and a program product, relates to the technical field of artificial intelligence, and is applied to an agent system. The method comprises the following steps: performing existence checking on a to-be-verified input parameter list, performing existence correction based on the existence checking result, and obtaining a first intermediate parameter list; performing data type checking on the first intermediate parameter list, and performing data type correction based on the data type checking result to obtain a second intermediate parameter list; performing parameter format checking on the second intermediate parameter list, and performing parameter format correction based on the parameter format checking result to obtain a third intermediate parameter list; and performing authenticity checking on the third intermediate parameter list, and performing authenticity correction based on the authenticity checking result to obtain a target input parameter list. In the foregoing manner, the parameters can be accurately and efficiently verified, the agent system can accurately call skills, and automatic task processing in a complex scene is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a parameter verification method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the rapid development of artificial intelligence technology, especially the continuous progress of natural language processing (NLP) and machine learning technologies, intelligent agent systems are widely used in many fields, including but not limited to customer service, smart home control, and virtual personal assistants.

[0003] The core function of an agent system is to accurately understand the intent in a user's dialogue text, generate relevant skill input parameters based on that intent, and execute corresponding skill operations to complete a specific task. The validity and accuracy of these parameters are crucial during skill execution. If the parameters generated by the agent system contain errors—such as missing parameters, mismatched data types, incorrect formatting, or parameters not based on the user's actual dialogue text—the agent system's skill execution may fail, or even produce results unexpected by the user.

[0004] In existing technologies, most agent systems rely on fixed rules or simple preset conditions to process and validate parameters. Rule-based validation methods can effectively ensure the correctness of parameters when processing simple parameters.

[0005] However, as the application scenarios of Agent systems become more complex and user needs change dynamically, the limitations of verification methods based on fixed rules gradually become apparent: when faced with complex parameter configurations, existing verification methods are not flexible enough and are prone to errors; in addition, as the frequency of interaction between Agent systems and users continues to increase, the uncertainty of user dialogue text also increases, resulting in more diverse and complex parameters generated by Agent systems, which increases the difficulty of parameter verification.

[0006] Therefore, existing parameter verification methods are inefficient and inaccurate, making it difficult to support automated task processing of intelligent agent systems in complex scenarios. Summary of the Invention

[0007] This invention provides a parameter verification method, apparatus, device, storage medium, and program product to address the shortcomings of existing parameter verification methods, such as low efficiency, low accuracy, and difficulty in supporting automated task processing of intelligent agent systems in complex scenarios.

[0008] This invention provides a parameter verification method applied to an intelligent agent system, comprising: obtaining a list of input parameters to be verified; the list of input parameters to be verified includes multiple input parameters to be verified, which are generated by the intelligent agent system based on the user's dialogue text; performing an existence check on the list of input parameters to be verified, obtaining an existence check result, and performing an existence correction on the list of input parameters to be verified based on the existence check result to obtain a first intermediate parameter list; performing a data type check on the first intermediate parameter list, obtaining a data type check result, and performing a data type correction on the first intermediate parameter list based on the data type check result to obtain a second intermediate parameter list; performing a parameter format check on the second intermediate parameter list, obtaining a parameter format check result, and performing a parameter format correction on the second intermediate parameter list based on the parameter format check result to obtain a third intermediate parameter list; performing a authenticity check on the third intermediate parameter list, obtaining an authenticity check result, and performing an authenticity correction on the third intermediate parameter list based on the authenticity check result to obtain a target input parameter list.

[0009] According to a parameter verification method provided by the present invention, an existence check is performed on a list of input parameters to be verified to obtain an existence check result, and an existence correction is performed on the list of input parameters to be verified based on the existence check result to obtain a first intermediate parameter list. The method includes: obtaining a list of actual required input parameters; the list of actual required input parameters includes multiple actual required input parameters; comparing each input parameter to be verified with each actual required input parameter to obtain an existence check result; determining, based on the existence check result, whether there are missing or redundant parameters in the list of input parameters to be verified; if there are missing or redundant parameters in the list of input parameters to be verified, deleting the redundant parameters in the list of input parameters to be verified, and performing an existence correction on the list of input parameters to be verified based on the missing parameters and parameter completion prompt template to obtain a first intermediate parameter list.

[0010] According to a parameter verification method provided by the present invention, a first intermediate parameter list is subjected to data type checking to obtain a data type checking result, and the data type of the first intermediate parameter list is corrected based on the data type checking result to obtain a second intermediate parameter list. The method includes: performing data type checking on each parameter in the first intermediate parameter list to obtain a data type checking result; determining, based on the data type checking result, whether there are any parameters in the first intermediate parameter list with incorrect data types; and if there are parameters in the first intermediate parameter list with incorrect data types, correcting the data type of the parameters with incorrect data types using a data type conversion tool to obtain the second intermediate parameter list.

[0011] According to a parameter validation method provided by the present invention, a second intermediate parameter list is subjected to parameter format checks to obtain parameter format check results, and the parameter format of the second intermediate parameter list is corrected based on the parameter format check results to obtain a third intermediate parameter list. The method includes: performing parameter format checks on each parameter in the second intermediate parameter list based on format regular expressions to obtain parameter format check results; extracting information from the second intermediate parameter list to obtain key information for each parameter; determining whether there are any incorrectly formatted parameters in the second intermediate parameter list based on the parameter format check results; and correcting the incorrectly formatted parameters based on format regular expressions and format correction prompt templates to obtain a third intermediate parameter list.

[0012] According to a parameter verification method provided by the present invention, a third intermediate parameter list is subjected to a authenticity check to obtain an authenticity check result, and the third intermediate parameter list is corrected for authenticity based on the authenticity check result to obtain a target input parameter list. The method includes: generating an authenticity regular expression based on key information of each parameter in a second intermediate parameter list; performing an authenticity check on each parameter in the third intermediate parameter list based on the authenticity regular expression to obtain an authenticity check result; determining whether there are any unmatched parameters in the third intermediate parameter list based on the authenticity check result; and correcting the authenticity of the unmatched parameters if there are unmatched parameters in the third intermediate parameter list to obtain the target input parameter list.

[0013] According to a parameter verification method provided by the present invention, unmatched parameters are corrected for authenticity to obtain a target input parameter list, including: generating clarification information based on unmatched parameters and a clarification template; returning the clarification information to the user; receiving the user's correction text; and correcting the unmatched parameters for authenticity based on the correction text to obtain a target input parameter list.

[0014] The present invention also provides a parameter verification device, comprising: an acquisition module for acquiring a list of input parameters to be verified; the list of input parameters to be verified includes multiple input parameters to be verified, which are generated by an intelligent agent system based on the user's dialogue text; an existence check module for performing an existence check on the list of input parameters to be verified, obtaining an existence check result, and performing an existence correction on the list of input parameters to be verified based on the existence check result to obtain a first intermediate parameter list; a data type check module for performing a data type check on the first intermediate parameter list, obtaining a data type check result, and performing a data type correction on the first intermediate parameter list based on the data type check result to obtain a second intermediate parameter list; a format check module for performing a parameter format check on the second intermediate parameter list, obtaining a parameter format check result, and performing a parameter format correction on the second intermediate parameter list based on the parameter format check result to obtain a third intermediate parameter list; and a authenticity check module for performing an authenticity check on the third intermediate parameter list, obtaining an authenticity check result, and performing an authenticity correction on the third intermediate parameter list based on the authenticity check result to obtain a target input parameter list.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parameter verification method as described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the parameter verification method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the parameter verification method as described above.

[0018] The parameter verification method, apparatus, device, storage medium, and program product provided by this invention perform existence checks, data type checks, parameter format checks, and authenticity checks on the list of input parameters to be verified generated by the intelligent agent system. Based on the check results, corresponding corrections are made to obtain a corrected target input parameter list. This method can accurately and efficiently verify parameters, thereby ensuring that the intelligent agent system can accurately invoke skills to support automated task processing in complex scenarios and improve user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is one of the flowcharts illustrating the parameter verification method provided by the present invention.

[0021] Figure 2 This is the second flowchart of the parameter verification method provided by the present invention.

[0022] Figure 3 This is a schematic diagram of the parameter verification device provided by the present invention.

[0023] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0025] Please see Figure 1 , Figure 1 This is one of the flowcharts illustrating the parameter verification method provided by this invention. For example... Figure 1 As shown, in this embodiment, the parameter verification method is applied to the intelligent agent system (i.e., the agent system). The parameter verification method includes steps S110 to S150, and the specific steps are as follows:

[0026] S110: Obtain the list of input parameters to be verified.

[0027] The list of input parameters to be verified includes multiple input parameters to be verified, which are generated by the intelligent agent system based on the user's dialogue text.

[0028] Specifically, the Agent system can provide various skill invocations. The relevant information for each skill is stored in the skill list. The skill list stores the skill parameter information corresponding to each skill, including parameter name, data type, example, description, format expression, and authenticity expression.

[0029] When a user needs to invoke a certain skill, they can interact with the Agent system. The Agent system can generate the input parameters to be verified for the skill based on the user's dialogue text. Understandably, a skill may require multiple input parameters, so there are usually multiple input parameters to be verified. The Agent system can store the generated multiple input parameters to be verified into the input parameter list according to the skill that the user needs to invoke.

[0030] S120: Perform an existence check on the list of input parameters to be verified, obtain the existence check result, and based on the existence check result, perform an existence correction on the list of input parameters to be verified to obtain the first intermediate parameter list.

[0031] In this embodiment, the parameter verification system includes a parameter existence check module, a parameter data type check module, a parameter format check module, a parameter authenticity check module, a parameter existence correction module, a parameter data type correction module, a parameter format correction module, and a parameter authenticity correction module.

[0032] The parameter existence check module is used to perform an existence check on the list of input parameters to be verified, that is, to determine whether the names and quantities of multiple input parameters to be verified generated by the Agent system are consistent with the actual input parameters required by the corresponding skill, and to generate an existence check result.

[0033] The parameter existence correction module can correct the existence of the input parameter list to be verified based on the existence check results, and obtain the first intermediate parameter list.

[0034] S130: Perform data type checks on the first intermediate parameter list, obtain the data type check results, and based on the data type check results, correct the data type of the first intermediate parameter list to obtain the second intermediate parameter list.

[0035] After the existence check is completed, the parameter data type check module can perform a data type check on the first intermediate parameter list, that is, determine whether the data types of the multiple input parameters to be verified generated by the Agent system are consistent with the data types of the input parameters actually required by the corresponding skills, and obtain the data type check results.

[0036] The parameter data type correction module can correct the data type of the first intermediate parameter list based on the data type check results to obtain the second intermediate parameter list.

[0037] S140: Perform parameter format checks on the second intermediate parameter list, obtain the parameter format check results, and based on the parameter format check results, correct the parameter format of the second intermediate parameter list to obtain the third intermediate parameter list.

[0038] After completing the data type check, the parameter format check module can create matching rules for each actual input parameter required for each skill in the skill list, and perform parameter format checks on the second intermediate parameter list according to the matching rules. That is, it determines whether the multiple input parameters to be verified generated by the Agent system meet the format requirements of the actual input parameters required for the corresponding skill, and obtains the parameter format check results.

[0039] The parameter format correction module can correct the parameter format of the second intermediate parameter list based on the parameter format check results to obtain the third intermediate parameter list.

[0040] S150: Perform a authenticity check on the third intermediate parameter list, obtain the authenticity check result, and based on the authenticity check result, perform authenticity correction on the third intermediate parameter list to obtain the target input parameter list.

[0041] After completing the parameter format check, the parameter authenticity check module can perform an authenticity check on the third intermediate parameter list, that is, determine whether the multiple input parameters to be verified generated by the Agent system are based on the user's real dialogue text, and obtain the authenticity check result.

[0042] The parameter authenticity correction module can correct the authenticity of the third intermediate parameter list based on the authenticity check results to obtain the target input parameter list.

[0043] The parameter verification method provided in this embodiment performs existence checks, data type checks, parameter format checks, and authenticity checks on the list of input parameters to be verified generated by the intelligent agent system. Based on the check results, corresponding corrections are made to obtain the corrected target input parameter list. This method can accurately and efficiently verify parameters, thereby ensuring that the intelligent agent system can accurately invoke skills to support the automated task processing of the intelligent agent system in complex scenarios and improve the user experience.

[0044] In some embodiments, an existence check is performed on the list of input parameters to be verified to obtain an existence check result, and based on the existence check result, an existence correction is performed on the list of input parameters to be verified to obtain a first intermediate parameter list, including: obtaining an actual required input parameter list; the actual required input parameter list includes multiple actual required input parameters; comparing each input parameter to be verified with each actual required input parameter to obtain an existence check result; based on the existence check result, determining whether there are missing or redundant parameters in the list of input parameters to be verified; if there are missing or redundant parameters in the list of input parameters to be verified, deleting the redundant parameters in the list of input parameters to be verified, and based on the missing parameters and parameter completion prompt word template, performing an existence correction on the list of input parameters to be verified to obtain a first intermediate parameter list.

[0045] Specifically, when a user needs to invoke a certain skill, they can interact with the Agent system. The Agent system can generate multiple input parameters to be verified for the skill based on the user's dialogue text and store these multiple input parameters in a list of input parameters to be verified. .

[0046] Furthermore, the agent system can obtain a list of the actual input parameters required for the corresponding skill. Actual required input parameter list It stores multiple actual input parameters required for the corresponding skill.

[0047] Furthermore, each input parameter to be verified is compared with each actual required input parameter to obtain the existence check result.

[0048] Specifically, the parameter existence check module can perform an existence check on the list of input parameters to be checked: The list of input parameters to be checked... Each input parameter to be verified in the list corresponds to the actual required input parameter list. Each actual input parameter required in the process is compared pairwise to determine whether the names and quantities of the multiple input parameters to be verified generated by the Agent system are consistent with the actual input parameters required by the corresponding skill, thus obtaining the existence check result.

[0049] The existence check results contain a list of input parameters to be verified. and the actual list of required input parameters The difference between the two is that the input parameter list is different from the actual list required. In comparison, the list of input parameters to be validated There are missing and / or redundant parameters.

[0050] Among them, the list of actual required input parameters In comparison, the list of input parameters to be validated Existing missing parameters The expression is as follows:

[0051] ;

[0052] List of actual required input parameters In comparison, the list of input parameters to be validated Existing redundant parameters The expression is as follows:

[0053] ;

[0054] Where k represents a parameter in the parameter list.

[0055] Furthermore, the parameter existence correction module determines the list of input parameters to be verified based on the existence check results. Are there any missing or redundant parameters?

[0056] If the list of input parameters to be verified Missing parameters exist Or redundant parameters Then delete the list of input parameters to be verified. Redundant parameters in And based on missing parameters The system completes the input parameter list with pre-set parameter completion prompt templates through dialogue between the user and the Agent system. Perform existence correction and complete the list of input parameters to be verified. Missing parameters in Obtain the first list of intermediate parameters.

[0057] In some embodiments, a data type check is performed on a first intermediate parameter list to obtain a data type check result, and the data type of the first intermediate parameter list is corrected based on the data type check result to obtain a second intermediate parameter list. This includes: performing a data type check on each parameter in the first intermediate parameter list to obtain a data type check result; determining, based on the data type check result, whether there are any parameters in the first intermediate parameter list with incorrect data types; and if there are any parameters in the first intermediate parameter list with incorrect data types, correcting the data type of the parameters with incorrect data types using a data type conversion tool to obtain a second intermediate parameter list.

[0058] Specifically, after completing the existence check, the parameter data type check module can perform a data type check on the first intermediate parameter list, that is, determine whether the data types of the multiple input parameters to be verified generated by the Agent system are consistent with the data types of the input parameters actually required by the corresponding skills, and obtain the data type check results.

[0059] Furthermore, the parameter data type correction module can determine whether there are parameters with incorrect data types in the first intermediate parameter list based on the data type check results.

[0060] If there are parameters with incorrect data types in the first intermediate parameter list, the parameter data type correction module can use a predefined data type conversion tool to convert and correct the parameters with incorrect data types to obtain the second intermediate parameter list.

[0061] In some embodiments, a parameter format check is performed on the second intermediate parameter list to obtain a parameter format check result, and the parameter format of the second intermediate parameter list is corrected based on the parameter format check result to obtain a third intermediate parameter list. This includes: performing a parameter format check on each parameter in the second intermediate parameter list based on a format regular expression to obtain a parameter format check result; extracting information from the second intermediate parameter list to obtain key information for each parameter in the second intermediate parameter list; determining whether there are any parameters with incorrect format in the second intermediate parameter list based on the parameter format check result; and if there are parameters with incorrect format in the second intermediate parameter list, correcting the parameter format of the parameters with incorrect format based on a format regular expression and a format correction prompt template to obtain a third intermediate parameter list.

[0062] Specifically, the parameter format checking module includes a rule-making module and a matching extraction module.

[0063] The rule-making module can create regular expressions for format checking based on the description and examples of each actual input parameter required.

[0064] Optionally, the format regular expression can be automatically generated by the rule definition module and manually validated.

[0065] Optionally, the format regular expressions can be automatically generated by the rule-making module through fine-tuning the language model: First, a matching dictionary containing commonly used parameter format types and their corresponding format regular expressions is created; then, ChatGPT is used to generate several parameter example-expression pairs based on the matching dictionary, and further generate a dataset for training the fine-tuned language model; finally, a fine-tuned language model is trained using the dataset, and the trained fine-tuned language model can be used to generate the corresponding format regular expressions based on the parameters.

[0066] Optionally, format regular expressions can also be automatically generated through a large language model and prompting project: First, create a matching dictionary containing commonly used parameter format types and their corresponding format regular expressions; then, use the matching dictionary as a few-shot (i.e., a small number of samples) and combine it with prompt word templates to directly input into a large language model (e.g., ChatGPT-4), so that the large language model can output the corresponding format regular expressions according to the parameter examples and descriptions.

[0067] Furthermore, the matching and extraction module can perform regular expression matching on each parameter in the second intermediate parameter list based on the format regular expression corresponding to each parameter, thereby determining whether the parameter format of each parameter is correct and obtaining the parameter format check result.

[0068] The second intermediate parameter list includes multiple input parameters to be verified, generated by the Agent system and corrected for existence.

[0069] Simultaneously, the matching and extraction module can also extract information from the second intermediate parameter list through precise capture groups, obtaining key information for each parameter in the second intermediate parameter list. .

[0070] For example, for the date parameter "August 24, 2024", the key information is "2024", "8", and "24".

[0071] Furthermore, the parameter format correction module can determine whether there are any incorrectly formatted parameters in the second intermediate parameter list based on the parameter format check results.

[0072] If there are incorrectly formatted parameters in the second intermediate parameter list, the parameter format correction module can fill the incorrectly formatted parameters and format regular expressions into the format correction prompt template to generate a format correction instruction. The filled format correction prompt template and format correction instruction are then input into the large language model, which can correct the incorrectly formatted parameters, return the correctly formatted parameters, and generate the third intermediate parameter list.

[0073] In some embodiments, a authenticity check is performed on the third intermediate parameter list to obtain an authenticity check result, and the authenticity of the third intermediate parameter list is corrected based on the authenticity check result to obtain a target input parameter list. This includes: generating an authenticity regular expression based on the key information of each parameter in the second intermediate parameter list; performing an authenticity check on each parameter in the third intermediate parameter list based on the authenticity regular expression to obtain an authenticity check result; determining whether there are any unmatched parameters in the third intermediate parameter list based on the authenticity check result; and if there are any unmatched parameters in the third intermediate parameter list, correcting the authenticity of the unmatched parameters to obtain a target input parameter list.

[0074] Specifically, the parameter authenticity check module can use the key information of each parameter in the second intermediate parameter list extracted by the parameter format check module. Create a authenticity regular expression; authenticity regular expressions are used to detect key information. Whether it appears in the user's conversation history is used to determine whether the multiple parameters generated by the Agent system are based on the user's real conversation text, thereby obtaining the authenticity check result.

[0075] Optionally, the authenticity regular expression can be generated using a combination of general templates and custom templates.

[0076] Optionally, for text with special formats such as dates, latitude and longitude, and coordinates, customized templates can be used to adapt to different text presentation styles.

[0077] For example, the textual representation of a date might be "August 24, 2024", "20240824", or "2024.08.24". In this case, the regular expression "2024[year.]?0?8[month.]?24[day]?" can be used for regular expression matching; the specific numerical value of the date can be obtained through key information. Perform the extraction.

[0078] Alternatively, for general parameters that do not have a special format, matching can be performed using a generic template, the expression of which is as follows:

[0079] ;

[0080] Where n represents key information The number of elements in For key information The i-th element in.

[0081] Furthermore, the parameter authenticity correction module can determine whether there are any unmatched parameters in the third intermediate parameter list based on the authenticity check results.

[0082] If there are unmatched parameters in the third intermediate parameter list, the unmatched parameters are corrected for authenticity to obtain the target input parameter list.

[0083] In some embodiments, the unmatched parameters are corrected for authenticity to obtain a target input parameter list, including: generating clarification information based on the unmatched parameters and the clarification template; returning the clarification information to the user; receiving the user's correction text; and correcting the unmatched parameters for authenticity based on the correction text to obtain a target input parameter list.

[0084] Specifically, the parameter authenticity correction module can generate clarification information (i.e., clarification script) based on the authenticity check results, the unmatched parameters, and the clarification template.

[0085] Furthermore, clarification information (i.e. clarification script) is returned to the user to guide the user in correctly filling in the specified unmatched parameter information, generating correction text and receiving the user's correction text; based on the correction text, the unmatched parameters are corrected for authenticity to obtain the target input parameter list.

[0086] The parameter verification method provided in this embodiment adopts multi-level parameter detection, which can accurately detect potential problems in the parameters generated by the Agent system. Through multiple correction methods, including existence correction, data type correction, format correction, and authenticity correction, it can effectively improve the correctness of the skill parameter generation of the Agent system, thereby ensuring the effectiveness of skill invocation and enhancing the stability and robustness of the Agent system.

[0087] This invention also provides a specific example of a parameter verification method. Please refer to [link / reference]. Figure 2 , Figure 2 This is the second flowchart of the parameter verification method provided by the present invention.

[0088] like Figure 2 As shown, when a user needs to invoke a certain skill, they can interact with the Agent system. The Agent system can generate multiple input parameters to be verified corresponding to the skill based on the user's dialogue text, and store the generated input parameters to be verified in the input parameter list. .

[0089] Furthermore, the agent system can load a skill list, extract the corresponding skill parameter information from the skill list, including parameter name, data type, example, description, format expression, and truth expression, to obtain the actual list of input parameters required for the corresponding skill. Actual required input parameter list It stores multiple actual input parameters required for the corresponding skill.

[0090] In this embodiment, it is assumed that the list of input parameters to be verified is as follows: The actual list of required input parameters is as follows: .

[0091] Specifically, the list of input parameters to be validated is as follows: Perform an existence check and obtain the existence check results.

[0092] The existence check results contain a list of input parameters to be verified. and the actual list of required input parameters The differences exist.

[0093] In this embodiment, the actual required input parameter list is... In comparison, the list of input parameters to be validated Existing missing parameters as follows:

[0094] ;

[0095] List of actual required input parameters In comparison, the list of input parameters to be validated Existing redundant parameters as follows:

[0096] .

[0097] Furthermore, based on the existence check results, the list of input parameters to be verified is corrected to obtain the first intermediate parameter list.

[0098] Specifically, delete the list of input parameters to be validated. Redundant parameters in And based on missing parameters And pre-set parameter completion prompt templates, through the dialogue between the user and the Agent system, the list of input parameters to be verified. Perform existence correction and complete the list of input parameters to be verified. Missing parameters in Obtain the first list of intermediate parameters.

[0099] Among them, the first intermediate parameter list The expression is as follows:

[0100] .

[0101] For example, the parameter completion prompt template is: "The following is the parameter information required for the skill {skill name}: parameter name: {parameter name}; parameter type: {parameter type}; parameter description: {parameter description}; parameter example: {parameter example}. Please extract the parameter values ​​based on the parameter information and the historical dialogue content, and output them in the format {key:value}".

[0102] Furthermore, regarding the first intermediate parameter list Perform data type checks, comparing the data with the corresponding skill parameter information in the skill list, and then check the first intermediate parameter list sequentially. The data type of all parameters is checked, and the data type check results are obtained.

[0103] Assuming the extracted parameters have the wrong data type Then traverse The parameters in the file will specify the data type of the actual required parameters. The data types of the generated parameters are input into a predefined Python script tool to perform data type conversion and correct the first intermediate parameter list. Parameters with incorrect data types are used to obtain a second list of intermediate parameters. .

[0104] Further, the format regular expressions are created: First, a matching dictionary containing commonly used parameter format types and their corresponding format regular expressions is created; then, the matching dictionary is used as a few-shot (i.e., a small number of samples) and directly input into a large language model (e.g., ChatGPT-4) in conjunction with prompt word templates, so that the large language model can output the corresponding format regular expressions according to the parameter examples and descriptions, and the validity of the format regular expressions is ensured through manual verification, and the skill list is updated.

[0105] Furthermore, regarding the second intermediate parameter list Perform parameter format checks using regular expressions on the second intermediate parameter list. The format of all parameters is matched to obtain the parameter format check result.

[0106] Simultaneously, the matching and extraction module can also extract information from the second intermediate parameter list through precise capture groups, obtaining key information for each parameter in the second intermediate parameter list. .

[0107] Furthermore, based on the parameter format check results, the parameter format of the second intermediate parameter list is corrected to obtain the third intermediate parameter list.

[0108] Assuming a second list of intermediate parameters There are parameters with incorrect formatting. The parameter format correction module can fill the incorrectly formatted parameters and format regular expressions into the format correction prompt template to generate a format correction instruction. The completed format correction prompt template and instruction are then input into the large language model, which can then correct the incorrectly formatted parameters. Correct the parameter format, return the correctly formatted parameters, and generate a third intermediate parameter list. .

[0109] Furthermore, the creation of realistic regular expressions is performed: the rules are created using a combination of general templates and custom templates: for text with special formats such as dates, latitude and longitude, and coordinates, custom templates can be used to adapt to different text representations; for general parameters without special formats, general templates can be used for matching. The expression for the general template is as follows:

[0110] ;

[0111] Where n represents key information The number of elements in For key information The i-th element in.

[0112] Furthermore, regarding the third intermediate parameter list Perform an authenticity check and obtain the authenticity check results; based on the authenticity check results, determine the third intermediate parameter list. Does the file contain any unmatched parameters?

[0113] Assuming a third intermediate parameter list There are unmatched parameters. Based on the authenticity check results, and based on the unmatched parameters and clarification template, clarification information (i.e., clarification script) is generated.

[0114] Furthermore, clarification information (i.e., clarification script) is returned to the user to guide them in correctly filling in the specified unmatched parameter information, a correction text is generated, and the user's correction text is received; based on the correction text, the unmatched parameters are corrected for authenticity to obtain the target input parameter list. .

[0115] For example, the clarification template is: "The following are the parameter information required for the skill {Skill Name}: {Parameter 1}: {Parameter Name: {Parameter Name}; Parameter Type: {Parameter Type}; Parameter Description: {Parameter Description}; Parameter Example: {Parameter Example}}; {Parameter 2}: {Parameter Name: {Parameter Name}; Parameter Type: {Parameter Type}; Parameter Description: {Parameter Description}; Parameter Example: {Parameter Example}}. These parameter values ​​were not found in the history of the conversation. Please fill in the following parameter values: {Parameter 1} and {Parameter 2}."

[0116] The present invention also provides a parameter verification device. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of the parameter verification device provided by the present invention. In this embodiment, the parameter verification device includes an acquisition module 310, an existence check module 320, a data type check module 330, a format check module 340, and an authenticity check module 350.

[0117] The acquisition module 310 is used to acquire the list of input parameters to be verified.

[0118] The list of input parameters to be verified includes multiple input parameters to be verified, which are generated by the intelligent agent system based on the user's dialogue text.

[0119] The existence check module 320 is used to perform an existence check on the list of input parameters to be checked, obtain the existence check result, and perform an existence correction on the list of input parameters to be checked based on the existence check result to obtain the first intermediate parameter list.

[0120] The data type checking module 330 is used to check the data type of the first intermediate parameter list, obtain the data type checking result, and correct the data type of the first intermediate parameter list based on the data type checking result to obtain the second intermediate parameter list.

[0121] The format checking module 340 is used to check the parameter format of the second intermediate parameter list, obtain the parameter format checking result, and correct the parameter format of the second intermediate parameter list based on the parameter format checking result to obtain the third intermediate parameter list.

[0122] The authenticity check module 350 is used to perform authenticity checks on the third intermediate parameter list, obtain authenticity check results, and correct the authenticity of the third intermediate parameter list based on the authenticity check results to obtain the target input parameter list.

[0123] In some embodiments, the existence check module 320 is used to obtain a list of actual required input parameters; the list of actual required input parameters includes multiple actual required input parameters; each input parameter to be checked is compared with each actual required input parameter to obtain an existence check result; based on the existence check result, it is determined whether there are missing or redundant parameters in the list of input parameters to be checked; if there are missing or redundant parameters in the list of input parameters to be checked, the redundant parameters in the list of input parameters to be checked are deleted, and based on the missing parameters and parameter completion prompt word template, the existence of the list of input parameters to be checked is corrected to obtain a first intermediate parameter list.

[0124] In some embodiments, the data type checking module 330 is used to perform data type checking on each parameter in the first intermediate parameter list to obtain data type checking results; based on the data type checking results, determine whether there are parameters with incorrect data types in the first intermediate parameter list; if there are parameters with incorrect data types in the first intermediate parameter list, then based on a data type conversion tool, correct the data types of the parameters with incorrect data types to obtain a second intermediate parameter list.

[0125] In some embodiments, the format checking module 340 is used to perform parameter format checks on each parameter in the second intermediate parameter list based on a format regular expression to obtain parameter format check results; extract information from the second intermediate parameter list to obtain key information of each parameter in the second intermediate parameter list; determine whether there are any parameters with incorrect format in the second intermediate parameter list based on the parameter format check results; if there are parameters with incorrect format in the second intermediate parameter list, then correct the parameter format of the parameters with incorrect format based on the format regular expression and the format correction prompt word template to obtain a third intermediate parameter list.

[0126] In some embodiments, the authenticity check module 350 is used to generate an authenticity regular expression based on the key information of each parameter in the second intermediate parameter list; perform authenticity checks on each parameter in the third intermediate parameter list based on the authenticity regular expression to obtain authenticity check results; determine whether there are unmatched parameters in the third intermediate parameter list based on the authenticity check results; if there are unmatched parameters in the third intermediate parameter list, perform authenticity correction on the unmatched parameters to obtain the target input parameter list.

[0127] In some embodiments, the authenticity check module 350 is used to generate clarification information based on the unmatched parameters and the clarification template; return the clarification information to the user; receive the user's correction text; and perform authenticity correction on the unmatched parameters based on the correction text to obtain a list of target input parameters.

[0128] The present invention also provides an electronic device. Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a parameter verification method.

[0129] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the parameter verification methods provided by the methods described above.

[0131] The present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the parameter verification methods provided by the above methods.

[0132] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0133] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A parameter verification method, characterized in that, Applied to intelligent agent systems, including: Obtain a list of input parameters to be verified; the list of input parameters to be verified includes multiple input parameters to be verified, which are generated by the intelligent agent system based on the user's dialogue text; An existence check is performed on the list of input parameters to be verified to obtain an existence check result. Based on the existence check result, an existence correction is performed on the list of input parameters to be verified to obtain a first intermediate parameter list. The data type of the first intermediate parameter list is checked to obtain the data type check result, and the data type of the first intermediate parameter list is corrected based on the data type check result to obtain the second intermediate parameter list; The second intermediate parameter list is subjected to parameter format check to obtain parameter format check result, and the parameter format of the second intermediate parameter list is corrected based on the parameter format check result to obtain a third intermediate parameter list; The authenticity of the third intermediate parameter list is checked to obtain the authenticity check result. Based on the authenticity check result, the authenticity of the third intermediate parameter list is corrected to obtain the target input parameter list. The step of performing an existence check on the list of input parameters to be verified, obtaining an existence check result, and then performing an existence correction on the list of input parameters to be verified based on the existence check result to obtain a first intermediate parameter list includes: Obtain the actual required input parameter list; the actual required input parameter list includes multiple actual required input parameters; Each of the input parameters to be verified is compared with each of the actual required input parameters to obtain the existence check result; Based on the existence check results, it is determined whether the list of input parameters to be verified contains missing or redundant parameters. If the list of input parameters to be verified contains missing or redundant parameters, the redundant parameters in the list of input parameters to be verified are deleted, and the existence of the list of input parameters to be verified is corrected based on the missing parameters and the parameter completion prompt word template to obtain the first intermediate parameter list. The expression for the first intermediate parameter list is as follows: in, This represents the first intermediate parameter list; P agent This represents the list of input parameters to be verified; P extra This indicates the redundant parameter; P miss Indicates the missing parameter; P actual This represents the list of actual required input parameters; The step of performing parameter format checks on the second intermediate parameter list, obtaining parameter format check results, and correcting the parameter format of the second intermediate parameter list based on the parameter format check results to obtain a third intermediate parameter list includes: Based on regular expressions, parameter format checks are performed on each parameter in the second intermediate parameter list to obtain parameter format check results. Information is extracted from the second intermediate parameter list to obtain key information for each parameter in the second intermediate parameter list; Based on the parameter format check results, determine whether there are any parameters with incorrect formats in the second intermediate parameter list; If there are parameters with incorrect formatting in the second intermediate parameter list, then the parameter with incorrect formatting is corrected based on the formatting regular expression and the formatting correction prompt word template to obtain the third intermediate parameter list; The process of performing a authenticity check on the third intermediate parameter list, obtaining the authenticity check result, and then correcting the authenticity of the third intermediate parameter list based on the authenticity check result to obtain the target input parameter list includes: Based on the key information of each parameter in the second intermediate parameter list, a authenticity regular expression is generated; the authenticity regular expression is used to detect whether the key information appears in the user's dialogue record. Based on the authenticity regular expression, the authenticity of each parameter in the third intermediate parameter list is checked to obtain the authenticity check result. Based on the authenticity check results, determine whether there are any unmatched parameters in the third intermediate parameter list; If there are unmatched parameters in the third intermediate parameter list, the unmatched parameters are corrected for authenticity to obtain the target input parameter list; The authenticity regular expression is generated based on a combination of a general template and a custom template. The expression of the general template is as follows: I k [0].+I k [1].+……I k [n]; Where n represents key information I k The number of elements in I k [i] represents key information I k The i-th element in; The step of performing a data type check on the first intermediate parameter list to obtain a data type check result, and then correcting the data type of the first intermediate parameter list based on the data type check result to obtain a second intermediate parameter list, includes: Perform a data type check on each parameter in the first intermediate parameter list to obtain the data type check result; Based on the data type check results, determine whether there are any parameters with incorrect data types in the first intermediate parameter list; If there are parameters with incorrect data types in the first intermediate parameter list, the data types of the parameters with incorrect data types are corrected using a data type conversion tool to obtain a second intermediate parameter list; The step of correcting the unmatched parameters for authenticity to obtain a list of target input parameters includes: Based on the unmatched parameters and the clarification template, clarification information is generated; Return the clarification information to the user; Receive the user's corrected text; Based on the corrected text, the unmatched parameters are corrected for authenticity to obtain a list of target input parameters.

2. A parameter verification device, characterized in that, include: The acquisition module is used to acquire a list of input parameters to be verified; the list of input parameters to be verified includes multiple input parameters to be verified, which are generated by the intelligent agent system based on the user's dialogue text. An existence check module is used to perform an existence check on the list of input parameters to be checked, obtain an existence check result, and perform an existence correction on the list of input parameters to be checked based on the existence check result to obtain a first intermediate parameter list. The data type checking module is used to check the data type of the first intermediate parameter list, obtain the data type checking result, and correct the data type of the first intermediate parameter list based on the data type checking result to obtain the second intermediate parameter list. The format checking module is used to check the parameter format of the second intermediate parameter list, obtain the parameter format checking result, and correct the parameter format of the second intermediate parameter list based on the parameter format checking result to obtain the third intermediate parameter list. The authenticity check module is used to perform authenticity checks on the third intermediate parameter list, obtain authenticity check results, and correct the authenticity of the third intermediate parameter list based on the authenticity check results to obtain the target input parameter list. The existence check module is used to obtain the actual required input parameter list; the actual required input parameter list includes multiple actual required input parameters; Each input parameter to be verified is compared with each actual required input parameter to obtain the existence check result; based on the existence check result, it is determined whether the list of input parameters to be verified contains missing or redundant parameters. If the list of input parameters to be verified contains missing or redundant parameters, the redundant parameters in the list of input parameters to be verified are deleted, and the existence of the list of input parameters to be verified is corrected based on the missing parameters and the parameter completion prompt word template to obtain the first intermediate parameter list. The expression for the first intermediate parameter list is as follows: in, This represents the first intermediate parameter list; P agent This represents the list of input parameters to be verified; P extra This indicates the redundant parameter; P miss Indicates the missing parameter; P actual This represents the list of actual required input parameters; The format checking module is used to perform parameter format checks on each parameter in the second intermediate parameter list based on a format regular expression to obtain parameter format check results; extract information from the second intermediate parameter list to obtain key information for each parameter in the second intermediate parameter list; determine whether there are any parameters with incorrect format in the second intermediate parameter list based on the parameter format check results; if there are parameters with incorrect format in the second intermediate parameter list, then correct the parameter format of the parameters with incorrect format based on the format regular expression and the format correction prompt word template to obtain a third intermediate parameter list; The authenticity check module is used to generate an authenticity regular expression based on the key information of each parameter in the second intermediate parameter list; the authenticity regular expression is used to detect whether the key information appears in the user's dialogue record; based on the authenticity regular expression, the authenticity of each parameter in the third intermediate parameter list is checked to obtain an authenticity check result; based on the authenticity check result, it is determined whether there are any unmatched parameters in the third intermediate parameter list; if there are any unmatched parameters in the third intermediate parameter list, the authenticity of the unmatched parameters is corrected to obtain a target input parameter list; The authenticity regular expression is generated based on a combination of a general template and a custom template. The expression of the general template is as follows: I k [0].+I k [1].+……I k [n]; Where n represents key information I k The number of elements in I k [i] represents key information I k The i-th element in; The data type checking module is used to check the data type of each parameter in the first intermediate parameter list and obtain the data type checking result; based on the data type checking result, it is determined whether there are any parameters with incorrect data type in the first intermediate parameter list; if there are any parameters with incorrect data type in the first intermediate parameter list, the data type of the parameters with incorrect data type is corrected based on the data type conversion tool to obtain the second intermediate parameter list. The authenticity check module is used to generate clarification information based on the unmatched parameters and the clarification template; return the clarification information to the user; receive the user's correction text; and perform authenticity correction on the unmatched parameters based on the correction text to obtain a list of target input parameters.

3. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the parameter verification method as described in claim 1.

4. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the parameter verification method as described in claim 1.

5. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the parameter verification method as described in claim 1.

Citation Information

Patent Citations

  • Large model plug-in calling method and device, equipment and medium

    CN117112064A

  • Large model plug-in calling method and device, equipment and medium

    CN117112065A

  • Data visualization method and device, storage medium and electronic equipment

    CN118247380A