Task processing method and device, electronic equipment and storage medium
By introducing large models in the OA system, receiving task requests and combining function sets, automatic completion of task processing, solving the problem of low task processing efficiency in traditional OA systems, and realizing efficient and accurate task automation processing.
Patent Information
- Application Number
- CN202411394799.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
In traditional OA systems, task processing efficiency is low, users need to manually process tasks, and the automated processing mechanism relies on preset rules and cannot process fields or information not specified by the rules, resulting in frequent manual input and errors prone.
After receiving the task request in the task processing system, input it and the corresponding function set into the large model, determine the reply content through the large model, obtain the target tool function and request parameters, and call the target application program interface to automatically complete the task processing.
Efficient automation of task processing is achieved, the accuracy and efficiency of task processing are improved, and manual operation errors are reduced or avoided.
Smart Images

Figure CN119356768A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a task processing method, device, electronic device and storage medium. Background Art
[0002] In traditional OA (Office Automation) systems, each task needs to be processed manually by the user, including logging into the system, entering the corresponding task processing page, and manually filling in task information. Some OA systems have set up some automatic processing mechanisms, but most of these mechanisms improve task processing efficiency by matching some field information through preset rules. For fields or information that are not specified in the rules, they cannot be matched and still require manual input from the user. Summary of the invention
[0003] In view of this, embodiments of the present application provide a task processing method, device, electronic device and storage medium to solve the problem of low task processing efficiency in the prior art.
[0004] According to a first aspect of an embodiment of the present application, a task processing method is provided. The method is executed by a task processing system and includes:
[0005] Receiving a task request, and determining a function set corresponding to the task request, wherein the function set includes at least one tool function;
[0006] Inputting the task request and the function set into the big model, so that the big model determines the reply content based on the task request and the function set;
[0007] In response to receiving the first type of reply from the big model, obtaining the target tool function and request parameters recommended by the big model for selection from the first type of reply;
[0008] Call the target application program interface corresponding to the target tool function, input the request parameters in the target application program interface, and obtain the task execution result.
[0009] A second aspect of an embodiment of the present application provides a task processing device, including:
[0010] A receiving module is configured to receive a task request and determine a function set corresponding to the task request, wherein the function set includes at least one tool function;
[0011] A transmission module, configured to input the task request and the function set into the big model, so that the big model determines the reply content based on the task request and the function set;
[0012] An acquisition module is configured to, in response to receiving a first type of reply from the big model, acquire a target tool function and request parameters recommended by the big model from the first type of reply;
[0013] The execution module is configured to call the target application program interface corresponding to the target tool function, input the request parameters in the target application program interface, and obtain the task execution result.
[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: when a task request is received in the task processing system, the embodiments of the present application input the task request and the corresponding function set into the big model, so that the big model determines the reply content based on the task request and the function set, and in response to receiving a first type of reply from the big model, obtains the target tool function and request parameters recommended by the big model from the first type of reply, then calls the target application program interface corresponding to the target tool function, and inputs the request parameters into the target application program interface to obtain the task execution result, automatically completes the task processing through function calls combined with the big model, realizes efficient automation of task processing, improves the accuracy and efficiency of task processing, and reduces or avoids errors in manual operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a flowchart of a task processing method provided in an embodiment of the present application.
[0019] Figure 2 It is a flowchart of a method for a large model to determine reply content based on a task request and a function set provided in an embodiment of the present application.
[0020] Figure 3 It is a flowchart of a method for obtaining a task execution result by inputting request parameters in a target application program interface provided in an embodiment of the present application.
[0021] Figure 4 It is a flowchart of the method for training a large model provided in an embodiment of the present application.
[0022] Figure 5 It is a flowchart of another method for training a large model provided in an embodiment of the present application.
[0023] Figure 6 It is an interaction diagram of the task processing method provided in an embodiment of the present application.
[0024] Figure 7 The task form display page includes exemplary user input prompt words and is returned to the user.
[0025] Figure 8 It is a schematic diagram of a task processing device provided in an embodiment of the present application.
[0026] Fig. 9 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0028] A task processing method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0029] As mentioned above, in traditional OA systems, various tasks require users to manually handle various business processes through the interactive web interface, such as applying for leave, compensatory leave, business trips, etc. Users need to log in to the OA system, enter the corresponding application page, and manually fill in multiple information including applicant information, application type, time range, reason, etc.
[0030] With the development of technology, some OA systems have set up some automatic processing mechanisms, such as automatically verifying application information through preset rules, automatically assigning approvers, etc., to improve processing efficiency. At the same time, data integration with other systems is strengthened through methods such as API (Application Programming Interface) to achieve real-time synchronization and sharing of information. However, most of these mechanisms improve task processing efficiency by matching some field information through preset rules. For fields not specified by the rules or information that cannot be matched, users still need to enter manually, that is, users need to fill in the form item by item. For users who submit applications frequently, the repetitive workload is large. Moreover, manually entering information is prone to errors due to negligence, affecting approval efficiency. Furthermore, the task processing process is fixed, difficult to adjust quickly according to actual needs, and lacks flexibility.
[0031] In other words, the above improvements still rely mainly on users triggering processes through the Web interface, and fail to fully utilize the advantages of modern programming technology and system architecture. Faced with increasingly complex and changing business needs, traditional OA systems are gradually showing technical bottlenecks in processing efficiency, user experience, and system integration. Enterprises urgently need a more efficient, flexible, and intelligent OA process management method to cope with the rapidly changing market environment and internal management needs.
[0032] In view of this, an embodiment of the present application provides a task processing method. When a task request is received in a task processing system, the task request and the corresponding function set are input into a large model, so that the large model determines the reply content based on the task request and the function set. In response to receiving a first type of reply from the large model, the target tool function and request parameters recommended by the large model are obtained from the first type of reply, and then the target application program interface corresponding to the target tool function is called, and the request parameters are input into the target application program interface to obtain the task execution result. The task processing is automatically completed through function calls combined with the large model, thereby realizing efficient automation of task processing, improving the accuracy and efficiency of task processing, and reducing or avoiding errors in manual operations.
[0033] Figure 1 is a flowchart of a task processing method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0034] In step S101 , a task request is received and a function set corresponding to the task request is determined.
[0035] The function set includes at least one tool function.
[0036] In step S102 , the task request and the function set are input into the large model, so that the large model determines the reply content based on the task request and the function set.
[0037] In step S103, in response to receiving the first type of reply from the big model, the target tool function and request parameters recommended by the big model are obtained from the first type of reply.
[0038] In step S104, the target application program interface corresponding to the target tool function is called, and the request parameters are input into the target application program interface to obtain the task execution result.
[0039] In certain embodiments of the present application, the method may be performed by a task processing system. The task processing system may be, for example, an OA system, or other systems. If the task processing system is an OA system, the tasks to be processed are OA tasks, such as tasks such as leave requests and attendance inquiries initiated by users. Processing these tasks may be receiving prompt words input by the user, and then automatically calling and filling in the corresponding task module according to the prompt words, generating a task form, and submitting the task form after the user confirms the task form.
[0040] In some implementations, the task processing system may receive a task request sent by a user, and the task request may include a prompt input by the user, and the prompt may be a voice prompt, a text prompt, or other recognizable prompts.
[0041] Furthermore, the task processing system may determine a function set corresponding to the task request. The function set is pre-configured and includes at least one tool function. The specific configuration method of the function set and each tool function is described below and will not be described in detail here.
[0042] In one example, if the task processing system is a single-scenario system, the function set may be unique, and in this case, the unique function set may be directly determined as the function set of the task request. In other embodiments, if the task processing system is a multi-scenario system, different function sets may be preconfigured for different task scenarios, and the user may select a scenario when inputting the task request, and then obtain the function set corresponding to the scenario. Alternatively, keywords may be directly extracted from the task request input by the user, and the corresponding scenario may be automatically matched using the keywords, thereby determining the function set corresponding to the scenario.
[0043] In certain embodiments of the present application, the task request and the determined function set can be input into the big model so that the big model determines the reply content based on the task request and the function set. The big model can be, for example, an LLM (Large Language Model) for semantic recognition of the input information. In one example, the big model can recognize the user prompt words in the task request to determine whether it can match the tool function in the function set, and if so, further determine the request parameters of the tool function based on the user prompt words.
[0044] The task processing system can receive a reply from the big model. If a first type of reply is received, the target tool function and request parameters recommended by the big model can be obtained from the first type of reply. Furthermore, the task processing system can call the API interface corresponding to the target tool function, input the above request parameters into the API interface, and thus obtain the task execution result.
[0045] According to the technical solution provided in the embodiment of the present application, when a task request is received in the task processing system, the task request and the corresponding function set are input into the big model, so that the big model determines the reply content based on the task request and the function set. In response to receiving a first type of reply from the big model, the target tool function and request parameters recommended by the big model are obtained from the first type of reply, and then the target application program interface corresponding to the target tool function is called, and the request parameters are input into the target application program interface to obtain the task execution result. The task processing is automatically completed through function calling combined with the big model, thereby realizing efficient automation of task processing, improving the accuracy and efficiency of task processing, and reducing or avoiding errors in manual operations.
[0046] In some embodiments of the present application, each tool function in the function set corresponds to a task function in the task processing system. Each tool function includes at least the following fields: function description, parameter list, parameter type, parameter description, and parameter list that must be returned, and the content of each field is determined according to the task function corresponding to the tool function in the task processing system.
[0047] Taking the task processing system as an OA system as an example, the following describes in detail how to define function sets and tool functions.
[0048] First, it is necessary to conduct an in-depth analysis of the API interface usage scenarios and user needs of the big model involved in each process task in the OA system to clarify what functions and services the API interface of the big model needs to provide, so as to ensure that the design of the API interface of the big model meets the actual needs. Among them, the task processing system determines the reply content based on the task request and function set by calling the API interface of the big model and inputting the task request and function set into it.
[0049] In one example, after demand analysis, it was determined that users in the OA system usually have functional requirements such as business trips, leave, compensatory leave, leave balance inquiry and attendance inquiry.
[0050] Independent tool functions can be set up according to the functional requirements determined above. Each function should have a clear functional positioning and maintain low coupling with other functions, which can improve the modularity and scalability of the API. For example, in an OA system, the functions can be divided into 5 independent tool functions, each of which corresponds to a function. For example, business trips, leave, compensatory leave, vacation balance inquiry, and attendance inquiry correspond to 5 different tool functions.
[0051] The field descriptions of each tool function are shown in Table 1:
[0052] Table 1 Field description of tool functions
[0053] name type Is it necessary to transmit describe name String yes Function name description String yes Function Description parameters Json yes Function parameter list parameters.type String yes Parameter Type parameters.properties String yes Parameter information description properties.xxx.type String yes Parameter Type Description properties.xxx.description String yes Parameter Detailed Description parameters.required Array yes List of parameters that must be returned
[0054] That is, the tool function needs to configure the name field, function description field, parameter list field, parameter type field, parameter description field and the parameter list field that must be returned. Among them, the parameter description automatically further includes the parameter information description field, the parameter type description field and the parameter detailed description field.
[0055] The configuration of each field in the tool function needs to correspond to the configuration of the execution function of the corresponding function in the task processing system. Taking the business trip function as an example, the parameters required by the business trip function in the task processing system include the business trip reason, start date, start time, end date, end time and business trip category, so the tool function corresponding to the business trip function can be defined as:
[0056] {
[0057] "name":"public_travel", / / Function name: public travel / /
[0058] "description":"User on business trip", / / Function description: User on business trip / /
[0059] "parameters":{
[0060] "type":"object", / / Function parameter list / /
[0061] "properties":{ / / Parameter information description / /
[0062] "reason_for_public_travel":{ / / Parameter information description: reason for public travel / /
[0063] "type":"string", / / Parameter type description / /
[0064] "description":"Business trip reason" / / Detailed description of parameters / /
[0065] },
[0066] "start_date":{ / / Parameter information description: start date / /
[0067] "type":"string", / / Parameter type description / /
[0068] "description":"Start date, YYYY-MM-DD" / / Detailed description of parameters / /
[0069] },
[0070] "start_time":{ / / Parameter information description: start time / /
[0071] "type":"string", / / Parameter type description / /
[0072] "description":"Start time, HH:MM, the start time in the morning is 08:00, and the start time in the afternoon is 13:00" / / Detailed description of parameters / /
[0073] },
[0074] "end_date":{ / / Parameter information description: end date / /
[0075] "type":"string", / / Parameter type description / /
[0076] "description":"End date, YYYY-MM-DD" / / Detailed description of parameters / /
[0077] },
[0078] "end_time":{ / / Parameter information description: end time / /
[0079] "type":"string", / / Parameter type description / /
[0080] "description":"End time, HH:MM, end time in the morning is 12:00, end time in the afternoon is 19:00" / / Detailed description of parameters / /
[0081] },
[0082] "public_travel_category":{ / / Parameter information description: public travel type / /
[0083] "type":"string", / / Parameter type description / /
[0084] "enum":[
[0085] "Normal business trip",
[0086] "Forgot to punch in",
[0087] "Transportation vehicle is late",
[0088] "Meeting"
[0089] ],
[0090] "description":"Business trip category, default [Normal business trip]" / / Detailed description of parameters / /
[0091] }
[0092] },
[0093] "required":[ / / Parameter list that must be returned / /
[0094] "reason_for_public_travel", / / reason for public travel / /
[0095] "start_date", / / Start date / /
[0096] "start_time", / / Start time / /
[0097] "end_date", / / End date / /
[0098] "end_time", / / End time / /
[0099] "public_travel_category" / / Business travel type / / ]
[0101] }
[0102] }
[0103] In this way, tool functions corresponding to various functions in the task processing system can be defined, and tool functions belonging to the same business scenario can be combined into a function set. The function set can be pre-configured and stored in the task processing system, or stored in the cloud, and obtained by the task processing system when needed, without limitation here. Furthermore, a large model calling API interface corresponding to the function set is configured in the task processing system, thereby realizing the large model calling capability in the task processing system, and then the task request can be parsed with the help of the large model, and the task execution can be completed based on the parsing results.
[0104] Figure 2 1 is a flow chart of a method for determining a reply content based on a task request and a function set provided by a large model in an embodiment of the present application. Figure 2 As shown, the method includes the following process:
[0105] In step S201, the large model parses the task request and obtains the parsing result.
[0106] In step S202, in response to determining that the parsing result has a matching tool function in the function set, a first type of reply is obtained.
[0107] Among them, the first type of reply includes at least a target tool function that matches the task request, and request parameters of the input target tool function determined according to the parsing result.
[0108] In step S203, in response to determining that the parsing result has no matching tool function in the function set, a second type of reply is generated according to the parsing result.
[0109] Among them, the second type of reply is used to prompt that the task request was not successfully identified.
[0110] In certain embodiments of the present application, after receiving the task request and the function set, the large model may first parse the task request to obtain a parsing result. Then, it is determined whether the parsing result has a matching target tool function in the function set. If so, the request parameters of the target tool function are further generated according to the parsing result. Among them, the request parameters of the target tool function may be request parameters corresponding to each field in the target tool function, that is, the request parameters of the target tool function may be suggested values for each field in the target tool function. The large model returns a first type of reply including the target tool function and the request parameters of the target tool function to the task processing system. The task processing system may extract the target tool function and the request parameters therein, and then call the corresponding task processing function, and input the request parameters therein to obtain the task execution result.
[0111] On the other hand, if the big model determines that the parsing result does not have a matching target tool function in the function set, for example, the current function set is the task set corresponding to the OA scenario, and the prompt word in the task request is not a prompt word related to the OA scenario, such as "Please prepare a certain file", then the big model can provide a second type of response to prompt that the task request was not successfully identified, such as "This task is not currently supported."
[0112] In some embodiments of the present application, the step of inputting the task request and the function set into the large model is to input the task request and the function set into the API interface of the large model. The API interface of the large model includes input parameters and output parameters, wherein the input parameters include at least a conversation message list field and a description list field of a triggerable function, and the output parameters include at least a message reply content field and a function call field generated by the model. Furthermore, the message list field is used to input the task request, the description list field of the triggerable function is used to input the function set, the function call field generated by the model is used to output a first type of reply, and the message reply content field is used to output a second type of reply.
[0113] That is, the API interface of the large model may include input parameters and output parameters, where the input parameters are shown in Table 2:
[0114] Table 2 Input parameters of the large model API interface
[0115]
[0116]
[0117] Further, the description of the data parameter is shown in Table 3:
[0118] Table 3 Description of data parameters
[0119]
[0120] The output parameters are shown in Table 4:
[0121] Table 4 Output parameters of the large model API interface
[0122]
[0123]
[0124] The description of the function_call parameters is shown in Table 5:
[0125] Table 5 Description of function_call parameters
[0126] Parameter name type Must be passed Remark name string yes Triggered function name arguments string yes Request Parameters
[0127] When calling the big model, the name, description and other input parameter information of each tool function are passed in through the functions parameter in the function set. After receiving the task request and function set, the big model will determine whether the tool function needs to be used. If the tool function is not needed, the function_call parameter is not returned, but the reply generated by the big model for the prompt word in the task request is returned. If the tool function is needed, the big model will return a message containing the function_call field, and the task processing system can determine the execution function corresponding to the task function that needs to be called based on the information. In one example, the task processing system can parse the tool function name and request parameters contained in the function_call field, and then call the API interface of the execution function corresponding to the task function corresponding to the tool function in the back end of the task processing system, execute the task through the execution function, and obtain the execution result.
[0128] Still taking the task processing system as the OA system and the task to be executed as a business trip as an example, the following content can be entered in the API interface of the large model:
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135] \"2024-08-13\",\"compensatory_leave_mode\":\"half day\",\"start_compensatory_leave_mode\":\"first half day\",\"end_compensatory_leave_mode\":\"first half day\"}" / / Request parameters / /
[0136] }
[0137] },
[0138] "usage":{ / / Token data consumed by this request / /
[0139] "input_tokens":1009, / / The length of the input text after it is converted into tokens / /
[0140] "output_tokens":100, / / The length of the model-generated response after conversion to token / /
[0141] "total_tokens":1109 / / The sum of input_tokens and output_tokens / /
[0142] },
[0143] "code":2000, / / Return code / /
[0144] "msg":"success", / / Return status description / /
[0145] "time":3.23 / / Model processing time / /
[0146] }
[0147] In this way, it is possible to call the big model through its API interface, input the task request and function set, and when the task request can match the target tool function in the function set, receive a reply from the big model including the function name of the target tool function and the request parameters of the target tool function.
[0148] Figure 3 1 is a flow chart of a method for obtaining a task execution result by inputting a request parameter in a target application program interface provided by an embodiment of the present application. Figure 3 As shown, the method includes the following process:
[0149] In step S301, request parameters are input into the target application program interface.
[0150] In step S302, the execution function of the task function corresponding to the application program interface processes the request parameters and generates a task form.
[0151] In step S303, the generated task form is displayed on the front end of the task processing system. In response to receiving a user confirmation message, the task form is submitted and a task execution result is generated.
[0152] In some embodiments of the present application, request parameters can be input in the target API interface, which can be an API interface of an execution function of a task function corresponding to a target tool function in a task operating system. The execution function generates a task form based on the received request parameters, and displays the generated task form on the front end of the task processing system for the user to confirm. If the user confirms that the generated form is filled in correctly, the task processing system can automatically submit the task form after receiving the user confirmation message to generate the task execution result.
[0153] In some implementations, the large model may be a trained large model.
[0154] Figure 4 Schematic diagram of the method for training a large model provided in the embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0155] In step S401, a training sample is obtained.
[0156] The training samples include at least labeled general sample data and labeled business sample data.
[0157] In step S402, a pre-trained large model is obtained, and the pre-trained large model is trained using labeled general sample data to obtain a general large model.
[0158] In step S403, the general large model is trained using the labeled general sample data and the labeled business sample data to obtain a trained large model.
[0159] In certain embodiments of the present application, when training a large model, a training sample may be first obtained, the training sample at least including labeled general sample data and labeled business sample data. Then a pre-trained large model is obtained, and the pre-trained large model is trained using the labeled general sample data to obtain a general large model. Finally, the general large model is trained using the labeled general sample data and the labeled business sample data to obtain a trained large model.
[0160] Furthermore, the general sample data may include sample data with large model call parameters and sample data without large model call parameters, and the business data may include business data supported by the large model for identification and business data not supported for identification. The amount of sample data corresponding to each type of business is determined according to the available resources of the type of business in the task processing system.
[0161] Among them, since the API interface of the large model has high requirements for the model, the sample data needs to be reasonably labeled, including accurate labeling for different application scenarios. The data labeling process should be iterated in small batches to avoid wasting too much time due to incorrect data or incorrect guidance, and the labeled data needs to be quality checked.
[0162] On the other hand, the amount of sample data corresponding to each type of business is determined according to the available resources of the type of business in the task processing system, which means that the amount of sample data corresponding to each type of business can be determined according to the product of the slot of the tool function corresponding to the type of business and the preset threshold. In an example, if the number of necessary slots for the public tool function of the OA system is 5, then a better training effect can be obtained when the amount of data is selected as 5*500=2500.
[0163] Furthermore, during the data annotation process, some noise can be added to improve the robustness of the large model. For example, negative rejection data can be added before normal multi-round dialogues, or data that rejects requirements outside the business can be added.
[0164] Figure 5 FIG. 1 is a flow chart of another method for training a large model provided in an embodiment of the present application. Figure 5 As shown, the training of the large model can be implemented in a phased training manner, wherein the first phase uses general sample data with large model call parameters, including general Chinese sample data with large model call parameters, general Chinese sample data without large model call parameters, general English sample data with large model call parameters, and general English sample data without large model call parameters to train the pre-trained large model, thereby preheating the base model of the pre-trained large model for large model call capability. The second phase can be trained with general Chinese sample data with large model call parameters, business sample data in various vertical fields, general negative sample data with large model call parameters, and vertical negative sample data with large model call parameters, thereby obtaining a large model with large model call capability. The training of both phases can be 1 iteration (epochs).
[0165] Figure 6 is an interactive diagram of the task processing method provided in the embodiment of the present application. Figure 6 As shown, the user can initiate a task request at the front end of the task processing system. The task processing system calls the big model according to the task request and inputs the function set corresponding to the task request into the big model. The big model determines whether it is necessary to call the tool function in the function set according to the received task request and function set. If necessary, it returns the function name and request parameters of the tool function to be called to the task processing system. The task processing system calls the corresponding execution function of the back end according to the function name and inputs the request parameters. The execution function obtains the execution result based on the request parameters, and then returns the execution result to the front end of the task processing system for display.
[0166] On the other hand, if the large model determines that it does not need to call the tool function, it generates a response according to the task request and returns the generated response to the task processing system. The task processing system can also send the response to the front-end for display.
[0167] Taking the task processing system as an OA system as an example, if the user enters a task request in the OA system, that is, sends a prompt to the task processing system "I forgot to punch in yesterday morning, please help me to leave for work this morning", the task processing system will fuse the prompt provided by the user with the function set of the OA scenario, for example, splice and pass it to the large model.
[0168] After receiving the function and prompt word information, the big model can determine whether the function needs to be used. If the function is not needed, the big model will not return the function_call parameter, and the task processing system can directly return the big model's reply to the user. If the function is needed, the big model will return a message containing the function_call field, and the task management system can determine the need to call the function based on this information. According to the function declaration, the big model will give tool function selection suggestions and related request parameters, but the big model does not actually call the execution function.
[0169] The task management system backend calls and executes the corresponding execution function according to the tool function and request parameters suggested by the big model, such as calling the API interface of the public execution function, and generates a task form. The task form can be returned to the user for confirmation.
[0170] Figure 7 The page includes a prompt word input by an exemplary user and a task form display page returned to the user. Figure 7 As shown, according to the prompt words input by the user "I forgot to punch in yesterday morning, please help me to apply for a business trip this morning", a business trip form can be obtained, in which the business trip start and end time fields, business trip reasons and business trip categories in the business trip form are automatically filled in.
[0171] By adopting the technical solution of the embodiment of the present application, the task process can be quickly started and automatically executed through function calls, which reduces manual intervention and improves processing efficiency. It supports adjusting the process logic through configuration rather than coding, such as setting different function definitions according to different businesses, which can meet the needs of different business scenarios. Combined with the artificial intelligence technology provided by the big model, intelligent analysis and decision-making are performed on the key nodes in the task process, which improves the accuracy and efficiency of information input and reduces or avoids errors in manual operations.
[0172] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0173] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0174] Figure 8 Schematic diagram of a task processing device provided in an embodiment of the present application. Figure 8 As shown, the device comprises:
[0175] The receiving module 801 is configured to receive a task request and determine a function set corresponding to the task request, wherein the function set includes at least one tool function.
[0176] The transmission module 802 is configured to input the task request and the function set into the big model, so that the big model determines the reply content based on the task request and the function set.
[0177] The acquisition module 803 is configured to obtain the target tool function and request parameters recommended by the big model from the first type of reply in response to receiving the first type of reply from the big model.
[0178] The execution module 804 is configured to call the target application program interface corresponding to the target tool function, input the request parameters in the target application program interface, and obtain the task execution result.
[0179] According to the technical solution provided in the embodiment of the present application, when a task request is received in the task processing system, the task request and the corresponding function set are input into the big model, so that the big model determines the reply content based on the task request and the function set. In response to receiving a first type of reply from the big model, the target tool function and request parameters recommended by the big model are obtained from the first type of reply, and then the target application program interface corresponding to the target tool function is called, and the request parameters are input into the target application program interface to obtain the task execution result. The task processing is automatically completed through function calling combined with the big model, thereby realizing efficient automation of task processing, improving the accuracy and efficiency of task processing, and reducing or avoiding errors in manual operations.
[0180] In one embodiment, each tool function in the function set corresponds to a task function in the task processing system; wherein each tool function includes at least the following fields: function description, parameter list, parameter type, parameter description and parameter list that must be returned, and the content of each field is determined according to the task function corresponding to the tool function in the task processing system.
[0181] In one embodiment, the big model determines the reply content based on the task request and the function set, including: the big model parses the task request to obtain a parsing result; in response to determining that the parsing result has a matching tool function in the function set, a first type of reply is obtained, the first type of reply includes at least a target tool function that matches the task request, and a request parameter of the input target tool function determined according to the parsing result; in response to determining that the parsing result does not have a matching tool function in the function set, a second type of reply is generated according to the parsing result, the second type of reply is used to prompt that the task request has not been successfully identified.
[0182] In one embodiment, the step of inputting the task request and the function set into the big model is to input the task request and the function set into the application programming interface of the big model; the application programming interface of the big model includes input parameters and output parameters, wherein the input parameters include at least a conversation message list field and a description list field of the triggerable function, and the output parameters include at least a message reply content field and a function call field generated by the model; wherein the message list field is used to input the task request, the description list field of the triggerable function is used to input the function set, the function call field generated by the model is used to output a first type of reply, and the message reply content field is used to output a second type of reply.
[0183] In one implementation, request parameters are input in a target application program interface to obtain a task execution result, including: inputting request parameters in a target application program interface; an execution function of a task function corresponding to the application program interface processes the request parameters to generate a task form; and displaying the generated task form on a front end of a task processing system. In response to receiving a user confirmation message, the task form is submitted to generate a task execution result.
[0184] In one embodiment, the big model is a trained big model; the trained big model is trained in the following manner: obtaining training samples, the training samples at least include labeled general sample data and labeled business sample data; obtaining a pre-trained big model, and training the pre-trained big model using the labeled general sample data to obtain a general big model; training the general big model using the labeled general sample data and the labeled business sample data to obtain a trained big model.
[0185] In one embodiment, general sample data includes sample data with large model calling parameters and sample data without large model calling parameters, and business data includes business data supported by the large model for identification and business data not supported for identification; the amount of sample data corresponding to each type of business is determined based on the available resources for that type of business in the task processing system.
[0186] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0187] Fig. 9 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig. 9As shown, the electronic device 9 of this embodiment includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 901 executes the computer program 903, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0188] The electronic device 9 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will appreciate that Fig. 9 The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or different components.
[0189] The processor 901 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0190] The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 9. The memory 902 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
[0191] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0192] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0193] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A task processing method, characterized in that: The method is performed by a task processing system, and the method includes: Receiving a task request, and determining a function set corresponding to the task request, wherein the function set includes at least one tool function; Inputting the task request and the function set into a large model, so that the large model determines the reply content based on the task request and the function set; In response to receiving a first type of reply from the big model, obtaining a target tool function and request parameters recommended by the big model from the first type of reply; The target application program interface corresponding to the target tool function is called, the request parameters are input into the target application program interface, and the task execution result is obtained.
2. The method according to claim 1, characterized in that Each tool function in the function set corresponds to a task function in the task processing system; Each tool function includes at least the following fields: function description, parameter list, parameter type, parameter description and parameter list that must be returned, and the content of each field is determined according to the task function corresponding to the tool function in the task processing system.
3. The method according to claim 1, characterized in that: The large model determines the reply content based on the task request and the function set, including: The large model parses the task request to obtain a parsing result; In response to determining that the parsing result has a matching tool function in the function set, a first type of reply is obtained, the first type of reply comprising at least a target tool function matching the task request, and a request parameter input to the target tool function determined according to the parsing result; In response to determining that the parsing result has no matching tool function in the function set, a second type of reply is generated according to the parsing result, where the second type of reply is used to prompt that the task request has not been successfully identified.
4. The method according to claim 1, characterized in that The step of inputting the task request and the function set into the big model is to input the task request and the function set into the application program interface of the big model; The application programming interface of the large model includes input parameters and output parameters, wherein the input parameters include at least a dialog message list field and a description list field of a triggerable function, and the output parameters include at least a message reply content field and a function call field generated by the model; Among them, the message list field is used to input the task request, the description list field of the triggerable function is used to input the function set, the function call field generated by the model is used to output the first type of reply, and the message reply content field is used to output the second type of reply.
5. The method according to claim 4, characterized in that The step of inputting the request parameter into the target application program interface to obtain the task execution result includes: Inputting the request parameters into the target application program interface; The execution function of the task function corresponding to the application program interface processes the request parameters and generates a task form; The generated task form is displayed at the front end of the task processing system, and in response to receiving a user confirmation message, the task form is submitted to generate a task execution result.
6. The method according to claim 1, characterized in that The large model is a trained large model; The trained large model is trained in the following way: Acquire training samples, where the training samples include at least labeled general sample data and labeled business sample data; Obtain a pre-trained large model, and train the pre-trained large model using the labeled general sample data to obtain a general large model; The general large model is trained using the labeled general sample data and the labeled business sample data to obtain the trained large model.
7. The method according to claim 6, characterized in that The general sample data includes sample data with large model calling parameters and sample data without large model calling parameters, and the business data includes business data supported by the large model for identification and business data not supported for identification; The data volume of the sample data corresponding to each type of business is determined according to the available resources of the type of business in the task processing system.
8. A task processing device, characterized in that: include: A receiving module is configured to receive a task request and determine a function set corresponding to the task request, wherein the function set includes at least one tool function; A transmission module, configured to input the task request and the function set into a large model, so that the large model determines a reply content based on the task request and the function set; An acquisition module is configured to, in response to receiving a first type of reply from the large model, acquire from the first type of reply a target tool function and a request parameter recommended by the large model; The execution module is configured to call the target application program interface corresponding to the target tool function, input the request parameters into the target application program interface, and obtain the task execution result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program 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-based dialogue method, storage medium and computer equipment
CN118377886A
Method and device for pre-training models, method and device for generating text, electronic device, storage medium, and computer program
JP2022153441A
Cited By
Task flow generation method and device, electronic equipment and storage medium
CN120909715A