Task item creation method, task item query method, device and equipment
By performing verification and structured processing based on the parameter model of object type matching in different application scenarios of large-scale neural network models, the problem of complex verification logic caused by complex data structure and diverse formats is solved, the speed and efficiency of data processing are improved, and the stability and maintainability of the system are enhanced.
Patent Information
- Application Number
- CN202510873953.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In different application scenarios of large-scale neural network models, the data structure is complex and the formats are diverse, which leads to complex verification logic and makes it difficult to perform comprehensive and accurate data verification, affecting the stability and security of the service.
By responding to the creation request of the target task, determining the task information and verifying it based on the parameter model matching the object type, ensuring that the parameters of the task object meet the predetermined format requirements, then performing structured processing and recording the target task item in the database.
It realizes flexible verification of different types of task objects, reduces unnecessary processing steps and labor costs, improves the speed and efficiency of data processing, avoids inaccurate or unverifiable verification, and enhances the stability and maintainability of the system.
Smart Images

Figure CN120386802B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task item creation method, a task item query method, an apparatus and a device. Background Art
[0002] With the rapid development of deep learning technology, large neural network models (hereafter referred to as "big models") have become the core of various applications. Big models not only excel in natural language processing but have also achieved remarkable success in fields such as computer vision, speech recognition, and recommendation systems. The application of big models in various sub-domains arises in a variety of scenarios, including big model dialogue, agent dialogue, workflow dialogue, backend service (Model Context Protocol Server, MCP Server) dialogue, custom service dialogue, and evaluation of big model capabilities and model service capabilities.
[0003] During the implementation of the embodiments of this application, it was found that in the specific software engineering implementation process, various data need to be transmitted and verified for different scenarios to ensure stable and secure service operation. However, due to the complex data structure and diverse formats, verification methods are often difficult to deal with comprehensively and accurately, resulting in complex verification logic. Summary of the Invention
[0004] In view of the above problems, the present application provides a task item creation method, a task item query method, an apparatus, a device, a medium and a program product.
[0005] According to the first aspect of the present application, a task item creation method is provided, comprising: in response to a creation request of a target task, determining task information, the task information including a task object set; when it is determined that the task information meets the predetermined format requirements, for any task object in the task object set: when the object type of the task object is a predetermined type, based on a parameter model that matches the object type, verifying the parameters of the task object, the parameter model is generated based on a verification rule that matches the object type; when it is determined that the parameters of any task object in the task object set are verified, structuring the task information; based on the structured task information, recording the target task item of the target task in a database.
[0006] The second aspect of the present application provides a task item query method, comprising: in response to a query request for a task to be queried, querying a target task item that matches the query request from a database, the database including multiple task items corresponding to multiple tasks respectively; wherein any one of the multiple task items of the multiple tasks is created according to the above method.
[0007] The third aspect of the present application provides a task item creation device, including: a determination module, used to determine task information in response to a creation request of a target task, the task information including a task object set; a verification module, used to, when it is determined that the task information meets the predetermined format requirements, for any task object in the task object set: when the object type of the task object is a predetermined type, based on a parameter model that matches the object type, verify the parameters of the task object, the parameter model is generated based on a verification rule that matches the object type; a processing module, used to, when it is determined that the parameters of any task object in the task object set have passed the verification, perform structured processing on the task information; a recording module, used to record the target task item of the target task in a database based on the structured task information.
[0008] The fourth aspect of the present application provides a task item query device, including: a query module, used to respond to a query request for a task to be queried, and query a target task item that matches the query request from a database, wherein the database includes multiple task items corresponding to multiple tasks respectively; wherein any task item among the multiple task items of the multiple tasks is created according to the above method.
[0009] The fifth aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0010] The sixth aspect of the present application further provides a computer-readable storage medium having a computer program or instruction stored thereon, which implements the steps of the above method when the above computer program or instruction is executed by a processor.
[0011] The seventh aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0012] According to the embodiments of the present application, since parameter verification is performed after matching the parameter model based on the object type, the parameter model is generated based on the verification rules that match the object type. Therefore, the corresponding rules can be flexibly applied to verify different types of task objects, ensuring that the parameters of various task objects can be effectively checked, reducing unnecessary processing steps and labor costs, improving the speed and efficiency of data processing, and avoiding inaccurate or unverifiable verification due to different object types. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings.
[0014] Figure 1 An application scenario diagram of a task item creation method, a task item query method, an apparatus, a device, a medium, and a program product according to an embodiment of the present application is shown.
[0015] Figure 2 A flowchart of a task item creation method according to an embodiment of the present application is shown.
[0016] Figure 3 A schematic diagram of generating a parameter model according to an embodiment of the present application is shown.
[0017] Figure 4 A flowchart of a task item creation method according to another embodiment of the present application is shown.
[0018] Figure 5 A flowchart of a task item query method according to an embodiment of the present application is shown.
[0019] Figure 6 A flowchart of a task item query method according to another embodiment of the present application is shown.
[0020] Figure 7 A structural block diagram of a task item creation device according to an embodiment of the present application is shown.
[0021] Figure 8 A structural block diagram of a task item query device according to an embodiment of the present application is shown.
[0022] Figure 9 A block diagram of an electronic device suitable for implementing a task item creation method and a task item query method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without the information of these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0026] When using expressions such as "at least one of A, B, and C," the expressions should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0027] During the implementation of the embodiments of this application, it was discovered that with the rapid development of deep learning technology, large neural network models (hereinafter referred to as large models) have become the core of various applications. Large models not only perform well in the field of natural language processing, but also have achieved remarkable success in computer vision, speech recognition, recommendation systems and other fields. In the process of applying large models in many sub-fields, there will be many different scenarios, such as large model dialogues, intelligent agent dialogues, workflow dialogues, backend service (Model Context Protocol Server, MCP Server) dialogues, custom service dialogues, evaluation of large model capabilities, and evaluation of model service capabilities.
[0028] Evaluating the capabilities of large models and model services requires a systematic and comprehensive assessment across multiple dimensions, including accuracy, efficiency, robustness, interpretability, diversity, and generalization. Therefore, in comparative testing of large models or model services, a single evaluation task can include subtasks for multiple large models or multiple model services, enabling intuitive comparative evaluation of the large models and model services. During software engineering implementation, detailed validation of the parameter data used to create the subtasks can be performed when calling the APIs that create multiple subtasks. When using subtask parameter data, structured data is more suitable for program application scenarios, including structured parameter access, storage, and data processing. However, parameter data validation, due to the diverse nature of the scenarios, results in a variety of data transmission and validation processes. This is particularly true for model service parameter data and the parameter data of various plug-ins, which require individual validation at the interface level to ensure stable and secure service operation. This is a tedious and complex task. In the event of parameter data anomalies, the location and content of the anomaly must be precisely located to assist users in adjusting the parameter data.
[0029] In view of this, an embodiment of the present application provides a task item creation method, including: in response to a creation request of a target task, determining task information, the task information including a task object set; when it is determined that the task information meets the predetermined format requirements, for any task object in the task object set: when the object type of the task object is a predetermined type, based on a parameter model that matches the object type, verifying the parameters of the task object, the parameter model is generated based on a verification rule that matches the object type; when it is determined that the parameters of any task object in the task object set are verified, structuring the task information; based on the structured task information, recording the target task item of the target task in the database.
[0030] Figure 1 An application scenario diagram of a task item creation method, a task item query method, an apparatus, a device, a medium, and a program product according to an embodiment of the present application is shown.
[0031] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a terminal device 101, a server device 102, and a database 103. The terminal device 101 and the server device 102, or the server device 102 and the database 103, may be connected via a network providing a medium for a communication link. The network may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0032] The user can use the terminal device 101 to interact with the server device 102 via the network to receive or send messages, etc. The terminal device 101 can be installed with various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0033] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0034] The server device 102 may include a server, workstation, or other type of computer device. The server may provide various services, such as a backend management server (for example only) that supports websites browsed by users using the terminal device 101. The backend management server may analyze and process received data such as user requests, and provide feedback (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal device.
[0035] The database 103 may be used to store data. The server device 102 may store data in the database 103 or query data in the database 103 according to a received user request.
[0036] It should be noted that the task item creation method provided in the embodiment of the present application can generally be executed by the server device 102. Accordingly, the task item creation device provided in the embodiment of the present application can generally be set in the server device 102. The task item creation method provided in the embodiment of the present application can also be executed by a server device or a server device cluster that is different from the server device 102 and can communicate with the terminal device 101 and / or the server device 102. Accordingly, the task item creation device provided in the embodiment of the present application can also be set in a server device or a server device cluster that is different from the server device 102 and can communicate with the terminal device 101 and / or the server device 102.
[0037] It should be understood that Figure 1 The number of terminal devices, server devices and databases in the embodiment is merely illustrative. Any number of terminal devices, server devices and databases may be provided as required.
[0038] The following will be based on Figure 1 The scene described by Figures 2 to 4 The task item creation method of the application embodiment is described in detail.
[0039] Figure 2 A flowchart of a task item creation method according to an embodiment of the present application is shown.
[0040] like Figure 2 As shown, the task item creation method of this embodiment includes operations S210 to S240.
[0041] In operation S210 , task information is determined in response to a creation request of a target task.
[0042] In operation S220 , when it is determined that the task information meets the predetermined format requirement, for any task object in the task object set: if the object type of the task object is a predetermined type, the parameters of the task object are verified based on a parameter model that matches the object type.
[0043] In operation S230 , when it is determined that the parameters of any task object in the task object set have passed verification, the task information is structured.
[0044] In operation S240 , target task items of the target task are recorded in a database based on the structured task information.
[0045] In this embodiment, the target task may include, but is not limited to, an evaluation task, a dialogue task, etc. The evaluation task may include, for example, a model performance evaluation. The model performance evaluation may include, for example, a model evaluation and / or a model service evaluation.
[0046] The creation request may include a name of the target task, a description of the target task, and the like.
[0047] Task information may include a collection of task objects. Different target tasks correspond to different task objects. The task objects and the data associated with the task objects can be determined based on the name and description of the target task.
[0048] For example, for a model performance evaluation task, the task object can be a model and / or a service. For a dialogue task, the task object can be a model, a service, an agent, a workflow, etc. A task object set can include multiple task objects and their respective parameters.
[0049] Predetermined format requirements can be format requirements for task objects in terms of structure, content, and representation. For example, for models, predetermined format requirements may include, but are not limited to, model structure definition, model parameter representation, and model file format. Model structure definition may specify the format of the model's input, output, internal parameters, and layer structure. Model parameter representation may specify the storage format of model parameters. Model file format may specify the format in which model files are saved. For services, predetermined format requirements may include, but are not limited to, service interface definition and service protocol specifications. Service interface definition may specify the format requirements for service input parameters, output results, and invocation methods.
[0050] The predetermined format requirements may also include format requirements for required fields, etc.
[0051] The predefined types can be pre-set. The parameter model can be generated based on validation rules that match the object type. Each type in the predefined types is mapped to a parameter model. Verification can include, but is not limited to, type checking, range checking, etc.
[0052] The parameters of the task object may include, for example, model parameters and / or service parameters. Model parameters include a model unique identifier, model name, and graphical representation of the model, and service parameters include service configuration parameters, interface parameters, and security parameters.
[0053] Verification rules can include verification parameter types and data restrictions. For example, verification parameter types include integers, strings, lists, structures, and unions. Data restrictions for verification parameters include: integer verification of minimum and maximum values; string verification of string length, format, and content; and list verification of list length, data element format, and content. A union can be understood as a combination of different types.
[0054] The verification rules that match the model may include, but are not limited to, type verification rules for model structure, type verification rules for model input, type verification rules for model output, type verification rules for model training parameters, and type verification rules for model application.
[0055] For example, for the type of the parameters of the task object, verify whether the parameter values of the task object under this type are within the allowable range, and / or determine whether the dependency relationship between multiple parameters is satisfied, such as whether the existence of certain parameters depends on the existence of other parameters, and / or whether the values between the parameters are consistent, such as whether the start time and end time are reasonable, etc.
[0056] If the parameters of any task object in the task object set pass verification, the task information is structured. Structuring can be the process of mapping the parameters and parameter values of multiple task objects. If the parameters of any task object in the task object set fail verification, an exception alert is issued.
[0057] According to the embodiments of the present application, since parameter verification is performed after matching the parameter model based on the object type, the parameter model is generated based on the verification rules that match the object type. Therefore, the corresponding rules can be flexibly applied to different types of task objects for verification, ensuring that the parameters of various task objects can be effectively checked, reducing unnecessary processing steps and labor costs, improving the speed and efficiency of data processing, and avoiding inaccurate or unverifiable verification due to different object types.
[0058] Figure 3 A schematic diagram of generating a parameter model according to an embodiment of the present application is shown.
[0059] like Figure 3 As shown, a target parameter template 302 matching the object type can be determined from a pre-configured parameter template library 301 .
[0060] The parameter template library 301 may include multiple parameter templates. The multiple parameter templates are targeted at different object types. The parameter templates may include multiple fields.
[0061] For example, for an object of type model, multiple fields may include, but are not limited to, the model evaluation task name, model type, and model parameters. Model parameters may include, but are not limited to, the model name, model unique identifier, and model hyperparameters such as top_k, top_p, and temperature. For an object of type service, multiple fields may include, but are not limited to, the model service evaluation task name, service type, and service parameters. Service parameters may include, for example, the service name, service base URL, the key required to access the service, and the version of the model associated with the service.
[0062] Based on the constraint conditions of the target field in the target parameter template 302, a verification rule 303 matching the object type is determined. According to the target parameter template 302 and the verification rule 303 matching the object type, a parameter model 304 is generated.
[0063] For example, the constraints for the model name can be a combination of a string and text. Verification rule 303 can be that the value corresponding to the model name field must conform to the string and text combination rules. Constraints for the key required to access a service can be, for example, a string format and a length of X. Verification rule 303 can be that the value corresponding to the key required to access a service field must conform to the string format and string length rules.
[0064] Filtering target parameter templates from the parameter template library and determining validation rules based on the constraints on the fields in the target parameter templates improves the accuracy and consistency of data processing, ensuring that task information conforms to the expected format and requirements. Furthermore, it standardizes the task item creation process, reducing errors and anomalies while improving data quality and providing a reliable basis for subsequent analysis and decision-making. Furthermore, it enhances system stability and maintainability, facilitates rapid problem identification and resolution, adapts to the needs of diverse business scenarios, and offers strong scalability.
[0065] According to the embodiments of the present application, for the above Figure 2 Operation S230 shown, structuring the task information, may include the operation of assigning values to variables of a predetermined structure using the task information.
[0066] Exemplarily, the predetermined structure may be a predefined structured structure, for example, a variable name, a variable type, etc. may be predefined.
[0067] Task information may also include data associated with the task object.
[0068] The data associated with the task object may be assigned to corresponding variables of the predetermined structure field by field.
[0069] For example, when assigning values to data associated with a task object according to a predefined structure, data type conversion and format conversion are required. For example, lists and structured data are converted to string data for storage. For example, strings and JSON data are converted to structured data for data manipulation. Strings are split into lists.
[0070] Based on the predetermined structure, using task information to assign values to the variables of the predetermined structure can ensure the accuracy and consistency of the data, standardize the operation process, and improve data quality and reliability.
[0071] Figure 4A flowchart of a task item creation method according to another embodiment of the present application is shown.
[0072] According to another embodiment of the present application, Figure 4 As shown, the task item creation method may include operations S401 to S407.
[0073] In operation S401, it is determined whether the task information meets the predetermined format requirement. If it is determined that the task information does not meet the predetermined format requirement, operation S402 is performed. If it is determined that the task information meets the predetermined format requirement, operation S404 is performed.
[0074] In operation S402 , a first exception class is generated.
[0075] In operation S403 , the first exception class is processed to obtain a first error response.
[0076] In operation S404, it is determined whether the object type of the task object is a predetermined type. If it is determined that the object type of the task object is not a predetermined type, operation S406 is performed. If it is determined that the object type of the task object is a predetermined type, operation S405 is performed.
[0077] In operation S405 , the parameters of the task object are verified based on the parameter model that matches the object type.
[0078] In operation S406 , a second exception class is generated.
[0079] In operation S407 , the second exception class is processed to obtain a second error response.
[0080] In this embodiment, the first exception class is generated during code execution, through a capture statement in the code, when task information does not conform to predetermined format requirements. The exception format of the first exception class can be parsed to determine the specific cause of the exception format. Based on the specific cause of the exception format, a first error response containing format error information is constructed.
[0081] The second exception class is generated during code execution, through a catch statement in the code, when the object type of the task object is not a predetermined type. The exception type, exception message, and contextual information of the second exception class can be parsed to determine the specific cause of the second exception. Based on the specific cause of the second exception, a second error response containing error information is constructed.
[0082] It should be noted that the above operations S404 to S407 are operations for any task object in the task object set. Since the object type of each task object is judged, it is possible to accurately locate the abnormal situation of which specific task object's object type is not the predetermined type, thereby ensuring the stability of the system and user experience. When it is determined that there is no abnormality in the format, further matching the parameter model for accurate parameter verification can ensure that the parameters are not only correct in format, but also meet the requirements of the rules in terms of semantics and business logic, which helps to improve the accuracy and reliability of the data and prevent system failures or business failures caused by parameter errors.
[0083] According to another embodiment of the present application, the task item creation method is as follows Figure 2 In addition to operations S210 to S240, the process may further include: if it is determined that the target task object in the task object set fails parameter verification, determining abnormal parameters of the target task object, and generating error information including the abnormal parameters.
[0084] In the embodiment of the present application, the abnormal parameter may be a parameter that does not comply with the verification rule. The error information of the abnormal parameter may include the specific reason for not complying with the verification rule.
[0085] Since the abnormal parameters of the target task object are determined and error information including the abnormal parameters is generated, the problem can be accurately located. Especially for situations where the parameter data structure is complex, the format is diverse, and the parameter verification logic is complex, it can focus on abnormal prompts, increase the convenience of troubleshooting, facilitate rapid troubleshooting and repair of abnormalities, improve the stability and robustness of the system, and provide users with personalized error prompts to enhance the user experience.
[0086] According to another embodiment of the present application, the predetermined structure may further include a nested structure. The nested structure includes different fields whose levels are from small to large or from large to small, and there is a dependency relationship between the fields. After the task information is structured, when it is determined that the structured task information is a nested structure, the structured task information may be re-verified. When the variables at each level in the nested structure are verified, the target task item of the target task is recorded in the database.
[0087] For example, for the task information of structured processing of nested structures, the numerical value range of variables at each level and / or the operation of converting comma-separated strings in variables at each level into lists, as well as the dependency relationship between variables at adjacent levels can be recursively verified based on the verification rules, and the variables that failed the verification and their error information can be recorded, and an error information list can be returned.
[0088] This second, precise validation of targeted nested structures allows for a more detailed check of the correctness of each nested field, ensuring the integrity and accuracy of complex data. This not only improves data quality but also enhances system robustness, facilitates quick identification of potential errors, and optimizes the processing efficiency of complex business processes.
[0089] According to the embodiments of the present application, for the above Figure 2 Operation S240 shown, recording the target task item of the target task in the database based on the structured task information, may include the operation of converting the structured task information into serialized information and then recording it in the database.
[0090] Converting structured data into a common serialization format facilitates data sharing between different programming languages and platforms, as well as data exchange between different systems or services.
[0091] Based on the above task item creation method, this application also provides a task item query method. Figure 5 The task item query method is described in detail.
[0092] Figure 5 A flowchart of a task item query method according to an embodiment of the present application is shown.
[0093] like Figure 5 As shown, the task item query method may include operation S510.
[0094] In operation S510 , in response to a query request for a task to be queried, a database is searched for target task items that match the query request.
[0095] In this embodiment, the database may include a plurality of task items corresponding to a plurality of tasks. Any of the plurality of task items of the plurality of tasks is created according to the above-mentioned task item creation method. The task item creation method can be referred to the above description and will not be described in detail.
[0096] The task to be queried may include but is not limited to an evaluation task, a dialogue task, etc. It may or may not be exactly the same as the target task.
[0097] The query request may include query fields, format requirements, etc.
[0098] For example, the field type may be determined according to the query field, and then task items belonging to the field type may be matched from the database based on the field type to obtain the target task item.
[0099] Since the task items are created in the database in advance, the query request for the query task can accurately and quickly query the target task item.
[0100] Figure 6 A flowchart of a task item query method according to another embodiment of the present application is shown.
[0101] In the process of implementing the embodiments of the present application, it was also found that when performing data queries, the field information of the task item in the database is defined in advance. When returning the task item, if a new field needs to be added to the structure of the task item, and the field does not exist in the database, in this case, the database structure needs to be changed. However, changing the database structure may affect existing applications, requiring a comprehensive update of the code and interruption of services, resulting in performance degradation, such as table locking, blocking, and index reconstruction.
[0102] Based on this, Figure 6 As shown, in this embodiment, the task item query method may include operations S601 to S604.
[0103] In operation S601, it is determined whether a task item matching the task to be queried can be obtained using the task name field in the multiple fields. If it is determined that a task item matching the task to be queried cannot be obtained using the task name field in the multiple fields, operations S602 to S604 are performed. If it is determined that a task item matching the task to be queried can be obtained using the task name field in the multiple fields, operation S604 is performed.
[0104] In operation S602 , a variable with the same name as the virtual field is added to a predetermined structure.
[0105] In operation S603 , based on the task information of the target task, the variables with the same name are assigned values to obtain a target structure.
[0106] In operation S604 , target task items matching the query request are obtained.
[0107] In an embodiment of the present application, a target task item that matches the query request can be obtained based on the variables in the target structure.
[0108] The predetermined structure corresponds to the variable name and type in the database one by one, so that during the task item creation process, the task item creation operation can be completed according to the variable name and type.
[0109] In special cases, when a query needs to return more data to meet functional requirements, virtual fields can be used. This requires adding virtual fields to the database table and adding variables with the same name to the predefined structure. During the data query process, the virtual fields in the table are treated as standard fields, and the variables with the same name are assigned values based on the target task's task information.
[0110] For example, for a model performance evaluation task, you can use the task item creation method described above to create a data table for the model and a data table for the service. The model data table contains detailed information about the model, including the model's unique identifier, model name, and model design. In the service data table, you only need to associate the model's unique identifier to obtain detailed model data, which can be queried using virtual fields in the service data table.
[0111] Since the task name field in multiple fields cannot obtain the task item that matches the task to be queried, that is, in specific scenarios, by adding variables with the same name corresponding to virtual fields in the predetermined structure, virtual fields can be used to transmit and use additional data without changing the database structure, thereby enhancing query flexibility and facilitating the expansion of the data model in specific scenarios.
[0112] In the process of implementing the embodiments of the present application, it was also found that since storing serialized data in a database facilitates data sharing between different programming languages and platforms or facilitates data exchange between different systems or services, etc., therefore, based on the variables in the target structure, obtaining a target task item that matches the query request can include the following operations: determining the target variable that matches the query request from the variables in the target structure; serializing the value of the target variable into a predetermined format to obtain the target task item.
[0113] For example, to query the model structure and model parameters of the model unique identifier 123, you can first find the variables of the model unique identifier, model structure and model parameters from the structure, verify that the model unique identifier is 123, and then serialize it into a predetermined format to obtain the target task item containing the model structure and model parameters.
[0114] Since the value of the target variable is serialized into a predetermined format, it is convenient to store it in a file or send it to other programs over the network.
[0115] Through the embodiments of the present application, software engineering codes can be run and used more safely, stably and quickly.
[0116] Based on the above task item creation method, this application also provides a task item creation device. Figure 7 The device is described in detail.
[0117] Figure 7 A structural block diagram of a task item creation device according to an embodiment of the present application is shown.
[0118] like Figure 7 As shown, the task item creation device 700 of this embodiment includes a determination module 710 , a verification module 720 , a processing module 730 and a recording module 740 .
[0119] The determination module 710 is used to determine task information in response to a target task creation request, where the task information includes a task object set. In one embodiment, the determination module 710 can be used to perform the operation S210 described above, which will not be described in detail here.
[0120] Verification module 720 is configured to, upon determining that the task information conforms to a predetermined format requirement, verify the parameters of any task object in the task object set based on a parameter model that matches the object type, if the object type of the task object is a predetermined type. The parameter model is generated based on a verification rule that matches the object type. In one embodiment, verification module 720 may be configured to perform operation S220 described above, which will not be further described herein.
[0121] The processing module 730 is used to perform structural processing on the task information when it is determined that the parameters of any task object in the task object set have passed the verification. In one embodiment, the processing module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0122] The recording module 740 is used to record the target task items of the target task in the database based on the structured task information. In one embodiment, the recording module 740 can be used to perform the operation S240 described above, which will not be repeated here.
[0123] According to an embodiment of the present application, the task item creation device 700 further includes a template determination module, a rule determination module, and a model generation module. The template determination module is used to determine a target parameter template that matches the object type from a pre-configured parameter template library, wherein the parameter template library includes multiple parameter templates, each of which is for different object types and includes multiple fields. The rule determination module is used to determine a verification rule that matches the object type based on the constraints on the target field in the target parameter template. The model generation module is used to generate a parameter model based on the target parameter template and the verification rule that matches the object type.
[0124] According to an embodiment of the present application, structuring the task information may include: assigning values to variables of a predetermined structure using the task information based on the predetermined structure.
[0125] According to an embodiment of the present application, the task item creation device 700 further includes a first exception module, a first processing module, a second exception module, and a second processing module. The first exception module is used to generate a first exception class when it is determined that the task information does not meet the predetermined format requirements. The first processing module is used to process the first exception class to obtain a first error response. The second exception module is used to generate a second exception class for any task object in the task object set when it is determined that the task information meets the predetermined format requirements and when the object type of any task object is not a predetermined type. The second processing module is used to process the second exception class to obtain a second error response.
[0126] According to an embodiment of the present application, the task item creation device 700 further includes an abnormal parameter determination module and an information generation module. The abnormal parameter determination module is configured to determine abnormal parameters of the target task object when it is determined that the parameter verification of the target task object in the task object set fails. The information generation module is configured to generate an error message including the abnormal parameters.
[0127] According to embodiments of the present application, any multiple modules among the determination module 710, verification module 720, processing module 730, and recording module 740 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the determination module 710, verification module 720, processing module 730, and recording module 740 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the determination module 710 , the verification module 720 , the processing module 730 and the recording module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
[0128] Based on the above task item query method, this application also provides a task item query device. Figure 8 The device is described in detail.
[0129] Figure 8 A structural block diagram of a task item query device according to an embodiment of the present application is shown.
[0130] like Figure 8As shown, the task item query device 800 of this embodiment includes a query module 810 .
[0131] Query module 810 is configured to, in response to a query request for a task to be queried, retrieve a target task item from a database that matches the query request, where the database includes multiple task items corresponding to multiple tasks, wherein any of the multiple task items for the multiple tasks is created according to the above method. In one embodiment, query module 810 may be configured to perform operation S510 described above, which will not be further described herein.
[0132] According to an embodiment of the present application, the task item has a predetermined structure form, and the predetermined structure includes multiple fields. The task item query device 800 also includes: a variable adding module, an assignment module and a task item obtaining module. The variable adding module is used to add a variable with the same name corresponding to the virtual field in the predetermined structure when the task name field in the multiple fields fails to obtain a task item that matches the task to be queried. The assignment module is used to assign values to the variables with the same name based on the task information of the target task to obtain a target structure. The task item obtaining module is used to obtain a target task item that matches the query request based on the variables in the target structure.
[0133] According to an embodiment of the present application, obtaining a target task item that matches a query request based on variables in a target structure includes: determining a target variable that matches the query request from the variables in the target structure, and serializing the value of the target variable into a predetermined format to obtain the target task item.
[0134] According to embodiments of the present application, any multiple modules in the query module 810 can be combined into a single module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the query modules 810 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the query modules 810 can be at least partially implemented as a computer program module that, when executed, can perform the corresponding functions.
[0135] Figure 9 A block diagram of an electronic device suitable for implementing a task item creation method and a task item query method according to an embodiment of the present application is shown.
[0136] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0137] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.
[0138] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed in storage section 908 as needed.
[0139] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0140] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0141] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.
[0142] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0143] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and assembled via the communication portion 909, and / or assembled from removable media 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0144] In such an embodiment, the computer program can be downloaded and assembled from a network via the communication section 909, and / or assembled from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0145] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] It will be understood by those skilled in the art that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0148] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A task item creation method, characterized in that: The method comprises: In response to a request to create a target task, determining task information, the task information including a set of task objects, the target task including a model performance evaluation task or a dialogue task, when the target task is the model performance evaluation task, any task object in the set of task objects including a model and / or a service, and when the target task is the dialogue task, any task object in the set of task objects including at least one of the following: a model, a service, an agent, or a workflow; If it is determined that the task information meets the predetermined format requirements, for any task object in the task object set: if the object type of the task object is a predetermined type, verify the parameters of the task object based on a parameter model that matches the object type, where the parameter model is obtained by the following operations: Determining a target parameter template matching the object type from a pre-configured parameter template library, wherein the parameter template library includes a plurality of parameter templates, each of which is for different object types and includes a plurality of fields; Determining a validation rule that matches the object type based on a constraint condition on a target field in the target parameter template; generating the parameter model according to the target parameter template and a verification rule matching the object type; When it is determined that the parameters of any task object in the task object set have passed the verification, performing structural processing on the task information; Based on the structured task information, the target task items of the target task are recorded in a database.
2. The method according to claim 1, characterized in that The structural processing of the task information includes: The task information is used to assign values to variables of a predetermined structure.
3. The method according to claim 1, characterized in that The method further comprises: If it is determined that the task information does not meet the predetermined format requirements, a first exception class is generated; Processing the first exception class to obtain a first error response; When it is determined that the task information meets the predetermined format requirement, for any task object in the task object set, if the object type of any task object is not the predetermined type, generating a second exception class; The second exception class is processed to obtain a second error response.
4. The method according to claim 1, wherein The method further comprises: If it is determined that the parameter verification of the target task object fails in the task object set, determining abnormal parameters of the target task object; An error message including the abnormal parameters is generated.
5. A task item query method, characterized in that: The method comprises: In response to a query request for a task to be queried, searching a database for a target task item that matches the query request, the database including a plurality of task items corresponding to the plurality of tasks respectively; Wherein, any task item among the multiple task items of the multiple tasks is created according to the method according to any one of claims 1 to 4.
6. The method according to claim 5, characterized in that The task item has a form of a predetermined structure, and the predetermined structure includes a plurality of fields; The method further comprises: In the case that a task item matching the task to be queried cannot be obtained by using the task name field among the multiple fields, adding a variable with the same name corresponding to the virtual field in the predetermined structure; Based on the task information of the target task, assign values to the variables with the same name to obtain the target structure; Based on the variables in the target structure, the target task item matching the query request is obtained.
7. The method according to claim 6, characterized in that The obtaining, based on the variables in the target structure, the target task item that matches the query request, includes: Determine a target variable that matches the query request from the variables in the target structure; The value of the target variable is serialized into a predetermined format to obtain the target task item.
8. A task item creation device, characterized in that: The device comprises: A determination module, configured to determine task information in response to a creation request of a target task, wherein the task information includes a set of task objects; a verification module configured to, upon determining that the task information complies with a predetermined format requirement, verify, for any task object in the task object set, parameters of the task object based on a parameter model that matches the object type if the object type of the task object is a predetermined type, wherein the parameter model is obtained by: Determining a target parameter template matching the object type from a pre-configured parameter template library, wherein the parameter template library includes a plurality of parameter templates, each of which is for different object types and includes a plurality of fields; Determining a validation rule that matches the object type based on a constraint condition on a target field in the target parameter template; generating the parameter model according to the target parameter template and a verification rule matching the object type; a processing module, configured to perform structural processing on the task information when it is determined that the parameters of any task object in the task object set have passed verification; The recording module is used to record the target task items of the target task in the database based on the structured task information.
9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Task processing method and device, agent side creating method and device and electronic equipment
CN117130684A