Task item creation method, task item query method, device and equipment
Through verification and structured processing based on parameter models based on object type matching, the complexity of data verification in application scenarios of large neural network models is solved, the efficiency and accuracy 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
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In different application scenarios of large neural network models, the data structures are complex and the formats are diverse, and existing verification methods are difficult to perform data verification in a comprehensive and accurate manner, resulting in complex and inaccurate verification logic.
Verify the parameter model based on object type matching, generate verification rules, ensure that the parameters of the task object meet the predetermined format requirements and then perform structure processing, and record the target task items.
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 verification or inability to verify, and enhances the stability and maintainability of the system.
Smart Images

Figure CN120386802A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and specifically relates to a method for creating a task item, a method for querying a task item, a device, and a device. Background Art
[0002] 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 the fields of computer vision, speech recognition, recommendation systems, etc. In the process of applying large models in many sub-fields, there will be a variety of different scenarios, such as large model conversations, agent conversations, workflow conversations, backend service (Model Context Protocol Server, MCP Server) conversations, custom service conversations, evaluation of large model capabilities, and evaluation of model service capabilities, etc.
[0003] In the process of implementing the embodiments of this application, it is found that in the specific software engineering implementation process, for different scenarios, various data need to be transmitted and verified to ensure the stable and secure operation of the service. However, due to the complex data structure and diverse formats, it is often difficult for verification methods to comprehensively and accurately handle them, resulting in complex verification logic. Summary of the Invention
[0004] In view of the above problems, this application provides a method for creating a task item, a method for querying a task item, a device, a device, a medium, and a program product.
[0005] According to the first aspect of this application, a method for creating a task item is provided, including: in response to a creation request for a target task, determining task information, where the task information includes a set of task objects; in the case where it is determined that the task information meets the predetermined format requirements, for any task object in the set of task objects: in the case where the object type of the task object is a predetermined type, based on a parameter model matching the object type, verifying the parameters of the task object, and the parameter model is generated based on a verification rule matching the object type; in the case where it is determined that the parameters of any task object in the set of task objects have passed the verification, performing structured processing on the task information; based on the structured task information, recording the target task item of the target task in the database.
[0006] The second aspect of this application provides a method for querying a task item, including: in response to a query request for a task to be queried, querying a target task item matching the query request from a database, where the database includes multiple task items corresponding to multiple tasks respectively; where any task item among 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, configured to determine task information in response to a creation request for a target task, where the task information includes a set of task objects; a verification module, configured to, when determining that the task information meets the predetermined format requirements, for any task object in the set of task objects: when the object type of the task object is a predetermined type, verify the parameters of the task object based on a parameter model matching the object type, and the parameter model is generated based on a verification rule matching the object type; a processing module, configured to perform structured processing on the task information when determining that the parameters of any task object in the set of task objects have all passed the verification; and a recording module, configured to record a 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, configured to query a target task item matching the query request from a database in response to a query request for a task to be queried, where the database includes multiple task items corresponding to multiple tasks respectively; and among the multiple task items of the multiple tasks, any task item is created according to the above method.
[0009] The fifth aspect of the present application provides an electronic device, including: one or more processors; and a memory, configured to store one or more computer programs, where the above one or more processors execute the above 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, on which a computer program or instruction is stored, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0011] The seventh aspect of the present application further provides a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0012] According to the embodiments of the present application, since the parameter verification is performed after matching the parameter model based on the object type, and the parameter model is generated based on the verification rule matching the object type, therefore, corresponding rules can be flexibly applied for verification for 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 the situation of inaccurate verification or inability to verify due to different object types. Description of the Drawings
[0013] Through the following description of the embodiments of the present application with reference to the drawings, the above content and other objects, features, and advantages of the present application will become clearer.
[0014] Figure 1 Shows an application scenario diagram of a task item creation method, a task item query method, a device, a device, a medium, and a program product according to an embodiment of the present application.
[0015] Figure 2 Shows a flowchart of a task item creation method according to an embodiment of the present application.
[0016] Figure 3 Shows a schematic diagram of a generated parameter model according to an embodiment of the present application.
[0017] Figure 4 Shows a flowchart of a task item creation method according to another embodiment of the present application.
[0018] Figure 5 Shows a flowchart of a task item query method according to an embodiment of the present application.
[0019] Figure 6 Shows a flowchart of a task item query method according to another embodiment of the present application.
[0020] Figure 7 Shows a structural block diagram of a task item creation device according to an embodiment of the present application.
[0021] Figure 8 Shows a structural block diagram of a task item query device according to an embodiment of the present application.
[0022] Figure 9 Shows 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. Detailed implementation manners
[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 following detailed description, for the sake of explanation, many specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present application. However, it is obvious that one or more embodiments can be implemented without this information of specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0024] The terms used herein are merely for describing specific embodiments and are not intended to limit the present application. The terms "including", "comprising", 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 of ordinary skill 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] Under the information using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning that those of ordinary skill in the art usually understand this expression (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, having only B, having only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0027] In the process of implementing the embodiments of this application, it is found 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 the fields of computer vision, speech recognition, recommendation systems, etc. In the process of applying large models in many sub - fields, there will be a variety of different scenarios, such as large model conversations, agent conversations, workflow conversations, backend service (Model Context Protocol Server, MCP Server) conversations, custom service conversations, evaluations of large model capabilities, and evaluations of model service capabilities, etc.
[0028] For the evaluation of large model capabilities and model service capabilities, a systematic and comprehensive evaluation is required in multiple aspects such as accuracy, efficiency, robustness, interpretability, diversity, generalization ability, etc. Therefore, in the comparative test of large models or model services, a single evaluation task can include subtasks for multiple large models or multiple model services respectively, in order to conduct an intuitive comparative evaluation of large models and model services. In the specific process of software engineering implementation, when calling to create multiple subtask interfaces, the parameter data for creating subtasks can be carefully verified. When using the parameter data of subtasks, structured data is more in line with the program application scenario, including multiple aspects such as parameter structured access, storage, and data processing. However, in terms of parameter data verification, due to a variety of different scenarios, various data transfer and verification processes will occur. Especially for the parameter data of model services and various plugins, they are diverse and need to be verified one by one at the interface layer to ensure the stable and secure operation of the service. This work is cumbersome and complex. If there are exceptions in the parameter data, it is necessary to accurately locate the exception location and content to help users adjust 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 for a target task, determining task information, where the task information includes a set of task objects; in the case where it is determined that the task information meets the predetermined format requirements, for any task object in the set of task objects: in the case where the object type of the task object is a predetermined type, based on a parameter model matching the object type, verifying the parameters of the task object, and the parameter model is generated based on a verification rule matching the object type; in the case where it is determined that the parameters of any task object in the set of task objects all pass the verification, performing structured processing on the task information; based on the structured task information, recording the target task item of the target task in the database.
[0030] Figure 1 FIG. shows an application scenario diagram of a task item creation method, a task item query method, a device, a device, a medium, and a program product according to an embodiment of the present application.
[0031] As Figure 1 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, and the server device 102 and the database 103 may be provided with a medium for a communication link through a network. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0032] A user may use the terminal device 101 to interact with the server device 102 through the network to receive or send messages, etc. Various communication client applications may be assembled on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0033] The terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0034] The server device 102 may include a server, a workstation, or other types of computer devices. The server may be a server providing various services, such as a background management server that supports the websites browsed by users using the terminal device 101 (only as an example). The background management server may analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0035] The database 103 may be used to store data, and the server device 102 may store data in the database 103 or query data in the database 103 according to the received user requests.
[0036] It should be noted that the task item creation method provided by the embodiments of the present application can generally be executed by the server device 102. Correspondingly, the task item creation device provided by the embodiments of the present application can generally be set in the server device 102. The task item creation method provided by the embodiments of the present application can also be executed by a server device or a cluster of server devices that is different from the server device 102 and can communicate with the terminal device 101 and / or the server device 102. Correspondingly, the task item creation device provided by the embodiments of the present application can also be set in a server device or a cluster of server devices 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 numbers of the terminal device, the server device, and the database in
[0038] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, server devices, and databases. Figure 1 Based on the scenario described below Figures 2 to 4 the task item creation method of the application embodiments will be described in detail through
[0039] Figure 2 FIG. shows a flowchart of the task item creation method according to the embodiments of the present application.
[0040] As Figure 2 shown, the task item creation method of this embodiment includes operation S210 to operation S240.
[0041] In operation S210, in response to a creation request for a target task, task information is determined.
[0042] In operation S220, 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 matching the object type, the parameters of the task object are verified.
[0043] In operation S230, when it is determined that the parameters of any task object in the task object set have all passed the verification, the task information is structured.
[0044] In operation S240, based on the structured task information, a target task item of the target task is recorded in the database.
[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, model performance evaluation. For example, the model performance evaluation may be model evaluation and / or model service evaluation, etc.
[0046] The creation request may include the name of the target task, a description of the target task, and so on.
[0047] The task information may include a set of task objects. For different target tasks, the corresponding task objects are different. The task objects and the data associated with the task objects can be determined based on the name of the target task and the description of the target task.
[0048] For example, for the model performance evaluation task, the task objects may be the model and / or the service. For the dialogue task, the task objects may be the model, the service, the agent, the workflow, etc. The set of task objects may include multiple task objects and the respective parameters of the multiple task objects.
[0049] The predefined format requirements may be format requirements for the task objects in terms of structure, content, representation method, etc. For example, for the model, the predefined format requirements may include, but are not limited to, the model structure definition, the model parameter representation, and the model file format, etc. The model structure definition, such as the format that stipulates the input, output, internal parameters, layer structure, etc. of the model. The model parameter representation, such as the storage format of the model parameters. The model file format, such as the saving format of the model file. For the service, the predefined format requirements may include, but are not limited to, the service interface definition and the service protocol specification, etc. The service interface definition, such as the format requirements that stipulate the input parameters, output results, call methods, etc. of the service.
[0050] The predefined format requirements may also include the format requirements for mandatory items, etc.
[0051] The predefined types can be set in advance. The parameter model can be generated based on the verification rules matching the object type. Each type in the predefined types maps to a parameter model. The verification may include, but is not limited to, type checking, range checking, etc.
[0052] The parameters of the task objects may include, for example, model parameters and / or service parameters. The model parameters, such as the model unique identifier, the model name, the graphical representation of the model, etc. The service parameters, such as the service configuration parameters, interface parameters, security parameters, etc.
[0053] The verification rules may include the type of verification parameters, the data limitations of the verification parameters, etc. For example, the type of verification parameters, such as integer, string, list, structure, union, etc. The data limitations of the verification parameters, such as: the maximum and minimum values for integer verification, the length of the string for string verification, the string format, the string content verification, the length of the list for list verification, the format of the data elements, the content of the data elements, etc. The union can be understood as a combination of different types.
[0054] The verification rules matching the model may include, for example, but are not limited to, the type verification rules of the model structure, the type verification rules of the model input, the type verification rules of the model output, the type verification rules of the model training parameters, and the type verification rules of the model application, etc.
[0055] For example, for the type of parameters of the task object, verify whether the parameter values of the task object under this type are within the allowed range, and / or determine whether the dependency relationships between multiple parameters are satisfied, such as whether the existence of some parameters depends on the existence of other parameters, and / or whether the values between parameters are consistent, such as whether the start time and end time are reasonable, etc.
[0056] When the parameters of any task object in the task object set pass the verification, perform structured processing on the task information. The structured processing may be a process of mapping the respective parameters and parameter values of multiple task objects. When there are task objects in the task object set whose parameters fail the verification, an exception reminder is given.
[0057] According to the embodiments of the present application, since in the parameter verification after matching the parameter model based on the object type, the parameter model is generated based on the verification rules matching the object type, therefore, corresponding rules can be flexibly applied for verification for 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 verification or inability to verify due to different object types.
[0058] Figure 3 The schematic diagram of generating a parameter model according to the embodiments of the present application is shown.
[0059] As Figure 3 shown, the target parameter template 302 matching the object type can be determined from the pre-configured parameter template library 301.
[0060] The parameter template library 301 may include multiple parameter templates. The multiple parameter templates are for different object types, and the parameter template may include multiple fields.
[0061] For example, for the object type being a model, the multiple fields may include, for example, but are not limited to, the model evaluation task name, the model type, and the model parameters, etc. The model parameters may include, for example, but are not limited to, the model name, the model unique identifier, the model hyperparameters, such as top_k, top_p, temperature, etc. For the object type being a service, the multiple fields may include, for example, but are not limited to, the model service evaluation task name, the service type, and the service parameters, etc. The service parameters may be the service name, the service base URL, the secret key required to access the service, the version of the model associated with the service, etc.
[0062] Based on the constraint conditions for the target fields in the target parameter template 302, determine the verification rule 303 that matches the object type. Generate the parameter model 304 according to the target parameter template 302 and the verification rule 303 that matches the object type.
[0063] For example, the constraint condition for the model name can be a combination of a string and text. The verification rule 303 can be that the value corresponding to the model name field needs to conform to the rule of the combination of a string and text, etc. The constraint condition for the secret key required for accessing the service can be in the format of a string and with a length of X, etc. The verification rule 303 can be that the value corresponding to the secret key required for accessing the service field needs to conform to the rules of the string format and the string length, etc.
[0064] Filter the target parameter template from the parameter template library and determine the verification rule based on the constraint conditions for the fields in the target parameter template, which can improve the accuracy and consistency of data processing, ensure that the task information conforms to the expected format and requirements. In addition, it can standardize the task item creation process, reduce errors and exceptions, and at the same time improve the data quality, providing a reliable basis for subsequent analysis and decision-making. In addition, it can enhance the stability and maintainability of the system, facilitate quick positioning and problem-solving, adapt to the needs of different business scenarios, and has strong scalability.
[0065] According to the embodiments of the present application, for the operation S230 as Figure 2 shown, the structured processing of the task information may include the operation of assigning values to the variables of the predetermined structure using the task information.
[0066] Exemplarily, the predetermined structure can be a pre-defined structured structure. For example, the variable name, variable type, etc. can be pre-defined.
[0067] The task information may further include data associated with the task object.
[0068] The data associated with the task object can be assigned to the corresponding variables of the predetermined structure field by field.
[0069] For example, when assigning the data associated with the task object to the predetermined structure one by one, data type conversion and data format conversion are required, such as structuring list and structure data into string data for data storage. Structuring string and JSON data into structure data for data operation. Splitting a string into a list.
[0070] Based on the predetermined structure, using the 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 the data quality and reliability.
[0071] Figure 4The figure shows a flowchart of a task item creation method according to another embodiment of the present application.
[0072] According to another embodiment of the present application, as Figure 4 shown, the task item creation method may include operation S401 to operation S407.
[0073] In operation S401, determine whether the task information meets the predetermined format requirements. If it is determined that the task information does not meet the predetermined format requirements, operation S402 is executed. If it is determined that the task information meets the predetermined format requirements, operation S404 is executed.
[0074] In operation S402, generate a first exception class.
[0075] In operation S403, process the first exception class to obtain a first error response.
[0076] In operation S404, determine 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 executed. If it is determined that the object type of the task object is a predetermined type, operation S405 is executed.
[0077] In operation S405, based on the parameter model matching the object type, verify the parameters of the task object.
[0078] In operation S406, generate a second exception class.
[0079] In operation S407, process the second exception class to obtain a second error response.
[0080] In this embodiment, the first exception class is generated when the task information does not meet the predetermined format requirements through the catch statement in the code during the execution of the code. The exception format of the first exception class can be parsed to determine the specific reason for the generation of the exception format. According to the specific reason for the generation of the exception format, a first error response including format error information is constructed.
[0081] The second exception class is generated when the object type of the task object is not a predetermined type through the catch statement in the code during the execution of the code. The exception type, exception message, and context information where the second exception occurs can be parsed to determine the specific reason for the generation of the second exception. According to the specific reason for the generation of the second exception, a second error response including 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 in which the object type of a specific task object is not the predetermined type, thereby ensuring the stability of the system and the user experience. When it is determined that the format is normal, further matching the parameter model for accurate parameter verification can ensure that the parameters are not only correct in format, but also comply with the rule requirements in terms of semantics and business logic, which helps to improve the accuracy and reliability of data and prevent system failures or business failures caused by parameter errors, etc.
[0083] According to another embodiment of the present application, in addition to the operations S210 to S240 as Figure 2 shown, the task item creation method may further include operations: when it is determined that the parameter verification of the target task object in the task object set fails, determine the abnormal parameters of the target task object. Generate an error message including the abnormal parameters.
[0084] In the embodiment of the present application, the abnormal parameters may be parameters that do not conform to the verification rules. The error message of the abnormal parameters may include the specific reasons for not conforming to the verification rules, etc.
[0085] Since the abnormal parameters of the target task object are determined and an error message including the abnormal parameters is generated, it is possible to accurately locate the problem. Especially for the situation where the parameter data structure is complex, the format is diverse, and the parameter verification logic is complex, it is possible to focus on the abnormal prompt, increase the convenience of problem troubleshooting, facilitate the quick troubleshooting and repair of abnormalities, improve the stability and robustness of the system, and at the same time provide personalized error prompts for users to enhance the user experience.
[0086] According to still another embodiment of the present application, the predetermined structure may further include a nested structure. The nested structure includes different fields with levels 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 further verified. When the variables at each level in the nested structure all pass the verification, record the target task item of the target task in the database.
[0087] For example, for the structured task information of the nested structure, it is possible to recursively verify the numerical value range of the variables at each level based on the verification rules and / or the operation of converting the comma-separated strings in the variables at each level into a list, as well as the dependency relationship between the variables at adjacent levels, record the variables that fail the verification and their error messages, and return a list of error messages.
[0088] Since a second precise verification is performed on the targeted nested structure, it is possible to more meticulously check the correctness of each nested field, ensuring the integrity and accuracy of complex data. This can not only improve data quality but also enhance the robustness of the system, facilitating the rapid location of potential errors and optimizing the processing efficiency of complex business processes.
[0089] According to an embodiment of the present application, for the operation S240 as described above, based on the task information processed by structuring, a target task item of the target task can be recorded in the database, which may include the operation of converting the task information processed by structuring into serialized information and then recording it in the database. Figure 2 Since the structured data is converted into a common serialized format, it is convenient for data sharing between different programming languages and platforms, and for data exchange between different systems or services, etc.
[0090] Based on the above task item creation method, the present application also provides a task item query method. The following will describe this task item query method in detail in conjunction with
[0091] FIG. Figure 5 shows a flowchart of the task item query method according to an embodiment of the present application.
[0092] Figure 5 As shown, the task item query method may include operation S510.
[0093] In operation S510, in response to a query request for a task to be queried, a target task item matching the query request is queried from the database. Figure 5 In this embodiment, the database may include multiple task items corresponding to multiple tasks respectively. Any one of the multiple task items of the multiple tasks is created according to the above task item creation method. For the task item creation method, reference can be made to the above description and will not be elaborated here.
[0094] The task to be queried may include but is not limited to an evaluation task, a dialogue task, etc. It may be exactly the same as the above target task or not completely the same.
[0095] The query request may include query fields, format requirements, etc.
[0096] For example, the field type can be determined according to the query field, and then based on the field type, task items belonging to the field type are matched from the database to obtain the target task item.
[0097] Since the task items are pre-created in the database, the query request for the query task can accurately and quickly query the target task item.
[0098]
[0099]
[0100] Figure 6 The flowchart of the 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 is also found that when performing data query, 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 structure of the database needs to be changed. However, changing the structure of the database may affect existing applications, requiring comprehensive code updates and service interruptions, resulting in performance degradation, such as table locking, blocking, and index rebuilding.
[0102] Based on this, as Figure 6 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 by using the task name field among multiple fields. In the case where it is determined that a task item matching the task to be queried cannot be obtained by using the task name field among multiple fields, operations S602 to S604 are executed. In the case where it is determined that a task item matching the task to be queried can be obtained by using the task name field among multiple fields, operation S604 is executed.
[0104] In operation S602, a variable with the same name corresponding to the virtual field is added to the predetermined structure.
[0105] In operation S603, based on the task information of the target task, the variable with the same name is assigned a value to obtain the target structure.
[0106] In operation S604, a target task item matching the query request is obtained.
[0107] In the embodiments of the present application, a target task item matching the query request can be obtained based on the variables in the target structure.
[0108] The variable names and types in the predetermined structure correspond one-to-one with those in the database, so that the task item creation operation can be completed according to the variable names and types during the creation of the task item.
[0109] In special cases, when the query needs to return more data to meet the functional requirements, it can be processed in the form of virtual fields. At this time, virtual fields need to be added to the data table in the database, and variables with the same name need to be added to the predetermined structure. During the data query process, the virtual fields in the data table are treated as standard fields of the data table, and the variables with the same name are assigned values according to the task information of the target task.
[0110] For example, for the model performance evaluation task, data tables about the model and data tables about the service can be created through the above task item creation method. The data table for the model contains detailed information about the model, including specific information such as the model unique identifier, model name, and model appearance design. In the data table for the service, only the model unique identifier needs to be associated to obtain the detailed data of the model, and it can be associated and queried in the form of virtual fields in the data table for the service.
[0111] Since the task name field in multiple fields cannot be used to obtain task items that match the task to be queried, that is, in a specific scenario, by adding a variable with the same name as the virtual field in a predetermined structure, virtual fields can be used to transmit and use additional data without changing the database structure, 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 is also found that since storing serialized data in the database facilitates data sharing between different programming languages and platforms or data exchange between different systems or services, etc., therefore, based on the variables in the target structure, obtaining the target task item that matches the query request may include 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 with a model unique identifier of 123, the variables of the model unique identifier, model structure, and model parameters can be found from the structure first. After verifying that the model unique identifier is 123, it is serialized into a predetermined format to obtain the target task item containing the model structure and model parameters.
[0114] Since serializing the value of the target variable into a predetermined format is beneficial for storing in a file or sending it to other programs through the network.
[0115] Through the embodiments of the present application, software engineering code can run and be used more safely, stably, and quickly.
[0116] Based on the above task item creation method, the present application also provides a task item creation device. The following will be combined with Figure 7 to describe this device in detail.
[0117] Figure 7 The structural block diagram of the task item creation device according to the embodiment of the present application is shown.
[0118] As Figure 7 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 configured to determine task information in response to a creation request for a target task, where the task information includes a set of task objects. In one embodiment, the determination module 710 may be configured to perform the operation S210 described above, which will not be elaborated herein.
[0120] The verification module 720 is configured to, when it is determined that the task information meets the predetermined format requirements, for any task object in the set of task objects: when the object type of the task object is a predetermined type, based on a parameter model matching the object type, verify the parameters of the task object, and the parameter model is generated based on a verification rule matching the object type. In one embodiment, the verification module 720 may be configured to perform the operation S220 described above, which will not be elaborated herein.
[0121] The processing module 730 is configured to perform a structured processing on the task information when it is determined that the parameters of any task object in the set of task objects all pass the verification. In one embodiment, the processing module 730 may be configured to perform the operation S230 described above, which will not be elaborated herein.
[0122] The recording module 740 is configured to record a target task item of the target task in a database based on the structured task information. In one embodiment, the recording module 740 may be configured to perform the operation S240 described above, which will not be elaborated herein.
[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 configured to determine a target parameter template matching the object type from a pre-configured parameter template library, the parameter template library includes a plurality of parameter templates, the plurality of parameter templates are for different object types, and the parameter template includes a plurality of fields. The rule determination module is configured to determine a verification rule matching the object type based on the constraint conditions of the target fields in the target parameter template. The model generation module is configured to generate a parameter model according to the target parameter template and the verification rule matching the object type.
[0124] According to an embodiment of the present application, performing a structured processing on the task information may include: based on a predetermined structure, using the task information to assign values to variables of 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 configured 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 configured to process the first exception class to obtain a first error response. The second exception module is configured 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 the object type of any task object is not the predetermined type. The second processing module is configured 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 exception parameter determination module and an information generation module. The exception parameter determination module is configured to determine the exception 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 exception parameters.
[0127] According to an embodiment of the present application, any multiple of the determination module 710, the verification module 720, the processing module 730, and the recording module 740 can be combined and implemented in one module, or any one of them can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present application, at least one of the determination module 710, the verification module 720, the processing module 730, and the recording module 740 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 chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the determination module 710, the verification module 720, the processing module 730, and the recording module 740 can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0128] Based on the above task item query method, the present application further provides a task item query device. The following will be combined with Figure 8 to describe this device in detail.
[0129] Figure 8 The block diagram of the task item query device according to an embodiment of the present application is shown.
[0130] As Figure 8As shown, the task item query device 800 of this embodiment includes a query module 810.
[0131] The query module 810 is configured to, in response to a query request for a task to be queried, query a target task item that matches the query request from a database, where the database includes multiple task items corresponding to multiple tasks respectively; and any one of the multiple task items of the multiple tasks is created according to the above method. In one embodiment, the query module 810 may be configured to perform the operation S510 described above, which will not be elaborated here.
[0132] According to an embodiment of the present application, a task item has a predetermined structure form, and the predetermined structure includes multiple fields. The task item query device 800 further includes: a variable adding module, an assignment module, and a task item obtaining module. The variable adding module is configured to add a variable with the same name corresponding to a virtual field to the predetermined structure in the case where a task item that matches the task to be queried cannot be obtained by using the task name field among the multiple fields. The assignment module is configured 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 configured 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 the query request based on the variables in the target structure includes: determining a 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 a target task item.
[0134] According to an embodiment of the present application, any multiple modules in the query module 810 may be combined and implemented in one module, or any one of them may be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present application, at least one of the query module 810 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 chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or by an appropriate combination of any several of them. Or, at least one of the query module 810 may be at least partially implemented as a computer program module, and when the computer program module is run, it may perform corresponding functions.
[0135] Figure 9 Shows 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.
[0136] As Figure 9 shown, the electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage section 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 901 may also include on-board 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 an embodiment of the present application.
[0137] In the RAM 903, various programs and data required for the operation of the electronic device 900 are stored. 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 an embodiment of the present application by executing the program in the ROM 902 and / or the RAM 903. It should be noted that the program 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 an embodiment of the present application by executing the program stored in one or more memories.
[0138] According to an embodiment of the present application, the electronic device 900 may further include an input / output (I / O) interface 905, and the input / output (I / O) interface 905 is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is assembled on the drive 910 as needed so that a computer program read therefrom can be assembled into the storage section 908 as needed.
[0139] The present 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 alone without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0140] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer-readable storage medium may include the above-described ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903.
[0141] An embodiment of the present application also includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to cause the computer system to implement the method provided by the embodiments of the present application.
[0142] When the computer program is executed by the processor 901, the above functions defined in the system / apparatus of the embodiments of the present application are executed. According to an embodiment of the present application, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0143] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and assembled through the communication part 909, and / or assembled from the removable medium 911. The program code included in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0144] In such an embodiment, the computer program can be downloaded and assembled from a network through the communication section 909, and / or assembled from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiments of the present application are performed. According to the embodiments of the present application, the systems, devices, apparatuses, modules, units, etc. described above can be implemented by computer program modules.
[0145] According to the embodiments of the present application, the program code for executing the computer program provided by the embodiments of the present application can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedures and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, such as Java, C++, python, the "C" language, 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, by using an Internet service provider to connect through the Internet).
[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0147] Those skilled in the art can understand that the features described in the various embodiments of the present application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments of the present application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present 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 the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present application.
Claims
1. A method for creating a task item, characterized in that, The method includes: In response to a creation request for a target task, determining task information, where the task information includes a set of task objects; When it is determined that the task information meets the predetermined format requirements, for any task object in the set of task objects: when the object type of the task object is a predetermined type, based on a parameter model matching the object type, verifying the parameters of the task object, where the parameter model is generated based on a verification rule matching the object type; When it is determined that the parameters of any task object in the set of task objects all pass the verification, performing structured processing on the task information; Based on the structured task information, recording a target task item of the target task in a database.
2. The method according to claim 1, wherein The method further includes: Determining a target parameter template matching the object type from a pre-configured parameter template library, where the parameter template library includes multiple parameter templates, the multiple parameter templates are for different object types, and the parameter template includes multiple fields; Determining a verification rule matching the object type based on the constraint conditions of target fields in the target parameter template; Generating the parameter model according to the target parameter template and the verification rule matching the object type.
3. The method according to claim 1, characterized in that, The performing structured processing on the task information includes: Assigning values to variables of a predetermined structure using the task information.
4. The method according to claim 1, wherein The method further includes: When it is determined that the task information does not meet the predetermined format requirements, generating a first exception class; Processing the first exception class to obtain a first error response; When it is determined that the task information meets the predetermined format requirements, for any task object in the set of task objects, when the object type of the any task object is not the predetermined type, generating a second exception class; Processing the second exception class to obtain a second error response.
5. The method according to claim 1, wherein The method further includes: When it is determined that there is a task object in the set of task objects whose parameter verification fails, determining the abnormal parameter of the target task object; Generating an error message including the abnormal parameter.
6. A task item query method, characterized in that, The method includes: In response to a query request for a task to be queried, querying a target task item matching the query request from a database, where 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 method described in any one of claims 1 to 5.
7. The method according to claim 6, characterized in that, The task item has the form of a predetermined structure, and the predetermined structure includes multiple fields; The method further includes: When a task item matching the task to be queried cannot be obtained using the task name field among the multiple fields, adding a variable with the same name corresponding to a virtual field to the predetermined structure; Assigning values to the variable with the same name based on the task information of the target task to obtain a target structure; Obtaining the target task item matching the query request based on the variables in the target structure.
8. The method according to claim 7, characterized in that, The obtaining the target task item matching the query request based on the variables in the target structure includes: Determine a target variable that matches the query request from the variables in the target structure; Serialize the value of the target variable into a predetermined format to obtain the target task item.
9. A task item creation device, characterized in that, The device includes: A determination module, configured to determine task information in response to a creation request for a target task, where the task information includes a set of task objects; A verification module, configured to, when determining that the task information meets the requirements of a predetermined format, for any task object in the set of task objects: 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, and the parameter model is generated based on a verification rule that matches the object type; A processing module, configured to perform structured processing on the task information when determining that the parameters of any task object in the set of task objects have all passed the verification; A recording module, configured to record the target task item of the target task in a database based on the structured task information.
10. 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 method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data verification method and device
CN113312900A
Task processing method and device, agent side creating method and device and electronic equipment
CN117130684A
Data verification method and apparatus, and computer device and storage medium
WO2020258655A1