CN117453372B - Task planning method and device, electronic equipment and storage medium - Google Patents
Task planning method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117453372B CN117453372B CN202311575311.6A CN202311575311A CN117453372B CN 117453372 B CN117453372 B CN 117453372B CN 202311575311 A CN202311575311 A CN 202311575311A CN 117453372 B CN117453372 B CN 117453372B
- Authority
- CN
- China
- Prior art keywords
- task
- expression data
- content
- cognitive model
- requirement expression
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000001149 cognitive effect Effects 0.000 claims abstract description 71
- 238000012545 processing Methods 0.000 claims abstract description 65
- 230000008569 process Effects 0.000 claims abstract description 21
- 230000011218 segmentation Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012549 training Methods 0.000 claims description 5
- 238000004891 communication Methods 0.000 claims description 4
- 230000003993 interaction Effects 0.000 abstract description 29
- 230000010485 coping Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 2
- 230000008451 emotion Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 235000012054 meals Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure provides a task planning method, a task planning device, electronic equipment and a storage medium, wherein task content corresponding to requirement expression data is determined by acquiring the requirement expression data of a user; determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data; if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result; if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model. The flexibility of the task planning mode of the intelligent man-machine interaction equipment can be improved, and the capability of the intelligent man-machine interaction equipment for coping with complex task demands of users is improved.
Description
Technical Field
The disclosure relates to the technical field of man-machine interaction, in particular to a task planning method, a task planning device, electronic equipment and a storage medium.
Background
Under the current technical environment, the artificial intelligence field has been developed, intelligent man-machine interaction devices such as intelligent robots and intelligent voice assistants have become popular, and the intelligent man-machine interaction devices can receive instructions input by users in voice or text form, and according to the requirements described in the instructions, realize conversations with the users or complete tasks indicated by the users, so that the intelligent man-machine interaction devices are greatly convenient for daily life of people.
At present, after the intelligent human-computer interaction equipment leaves a factory, a planning scheme for dealing with various tasks is often built in, after a user instruction is acquired, task planning for realizing the current task is called for execution so as to complete one-time human-computer interaction, however, when the user instruction is more complex or the user needs to complete one-time complex interaction comprising multiple tasks, the intelligent human-computer interaction equipment often has the condition of 'answering questions', and meanwhile, in the current intelligent human-computer interaction equipment, the task planning mode is relatively fixed, and the requirement of the complex tasks cannot be met flexibly.
Disclosure of Invention
The embodiment of the disclosure at least provides a task planning method, a device, an electronic device and a storage medium, which can improve the flexibility of a task planning mode of intelligent man-machine interaction equipment and the capability of the intelligent man-machine interaction equipment to cope with complex task demands of users.
The embodiment of the disclosure provides a task planning method, which comprises the following steps:
acquiring requirement expression data of a user, and determining task content corresponding to the requirement expression data;
determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data;
if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result;
if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model.
In an alternative embodiment, the cognitive model is trained based on the following steps:
acquiring sample requirement expression data corresponding to a plurality of task contents;
constructing a task processing format comprising a task content indicator, a tool list indicator, an input indicator and an output indicator for each sample requirement expression data;
constructing a data output format comprising input content, target tools selected for use in the tool list and output content corresponding to the target tools for each sample requirement expression data;
and the sample requirement expression data is input into the cognitive model as a sample data set, and the cognitive model is sequentially processed according to the task processing format so as to train the task planning capacity of the cognitive model according to the task content.
In an optional implementation manner, the inputting the requirement expression data into a pre-trained cognitive model, and outputting a corresponding feedback result by the cognitive model specifically includes:
the cognitive model determines the target tool corresponding to the task content according to the task content;
taking the requirement expression data as the input content, and outputting model output content comprising output content corresponding to the target tool according to the data output format;
and feeding back the output content corresponding to the target tool to the user as the feedback result.
In an alternative embodiment, the task processing rules are generated based on the following steps:
determining a task target corresponding to the task content and constraint conditions aiming at the task content with constraint conditions;
constructing a corresponding task processing rule according to the task target and the constraint condition;
storing the task processing rules into a preset rule database;
and generating a regular expression according to the keywords corresponding to the task content, and configuring the regular expression as an index identifier corresponding to each task processing rule.
In an alternative embodiment, it is determined whether the task content hits a preset task processing rule based on the following steps:
converting the requirement expression data into corresponding text data;
performing word segmentation on the text data, and accessing the rule database by the text data carrying the word segmentation;
determining whether the regular expression matched with the text data after word segmentation exists in the rule database;
if yes, the task content hits the task processing rule; if not, the task content does not hit the task processing rule.
In an optional implementation manner, the outputting, by the cognitive model, a corresponding feedback result specifically further includes:
according to the task content, sequentially dividing the task corresponding to the requirement expression data into a plurality of subtasks;
sequentially inputting the subtasks to the cognitive model, and determining a task planning scheme for executing the corresponding subtasks by the cognitive model;
and sequentially executing the task planning schemes, and stopping executing when the number of execution rounds of the task planning schemes is greater than a preset round number threshold value.
The embodiment of the disclosure also provides a task planning device, which comprises:
the acquisition module is used for acquiring the requirement expression data of the user and determining task content corresponding to the requirement expression data;
the ordered planning judging module is used for determining whether the task content corresponds to a fixed business flow, if so, sequentially calling tools corresponding to each executing step according to executing steps corresponding to the fixed business flow, and outputting feedback results corresponding to the requirement expression data;
the rule type planning judging module is used for determining whether the task content hits a preset task processing rule or not if not, executing a task corresponding to the requirement expression data according to the task processing rule if yes, and outputting a feedback result;
and the cognitive model planning module is used for inputting the requirement expression data into a pre-trained cognitive model if the requirement expression data is not hit, and outputting a corresponding feedback result by the cognitive model.
In an alternative embodiment, the apparatus further comprises a cognitive model training module for:
acquiring sample requirement expression data corresponding to a plurality of task contents;
constructing a task processing format comprising a task content indicator, a tool list indicator, an input indicator and an output indicator for each sample requirement expression data;
constructing a data output format comprising input content, target tools selected for use in the tool list and output content corresponding to the target tools for each sample requirement expression data;
and the sample requirement expression data is input into the cognitive model as a sample data set, and the cognitive model is sequentially processed according to the task processing format so as to train the task planning capacity of the cognitive model according to the task content.
The embodiment of the disclosure also provides an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the task planning method described above, or steps in any one of the possible embodiments of the task planning method described above.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the above-described task planning method, or steps in any one of the possible implementations of the above-described task planning method.
The disclosed embodiments also provide a computer program product comprising a computer program/instructions which, when executed by a processor, implement the above-described task planning method, or steps in any one of the possible implementation manners of the above-described task planning method.
According to the task planning method, the task planning device, the electronic equipment and the storage medium, task content corresponding to requirement expression data is determined by acquiring the requirement expression data of a user; determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data; if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result; if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model. The flexibility of the task planning mode of the intelligent man-machine interaction equipment can be improved, and the capability of the intelligent man-machine interaction equipment for coping with complex task demands of users is improved.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
FIG. 1 illustrates a flow chart of a task planning method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a method of training a cognitive model provided by an embodiment of the present disclosure;
FIG. 3 illustrates a schematic diagram of a mission planning apparatus provided by an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The term "and/or" is used herein to describe only one relationship, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
According to research, at present, a planning scheme for dealing with various tasks is often built in the intelligent human-computer interaction equipment after leaving a factory, after a user instruction is acquired, task planning for realizing the current task is called for execution so as to complete one-time human-computer interaction, however, when the user instruction is more complex or the user needs to complete one-time complex interaction comprising multiple tasks, the intelligent human-computer interaction equipment often has the condition of answering questions, and meanwhile, in the current intelligent human-computer interaction equipment, the task planning mode is relatively fixed, so that the requirement of the complex task cannot be met flexibly.
Based on the above study, the disclosure provides a task planning method, a device, an electronic device and a storage medium, which determine task content corresponding to requirement expression data by acquiring the requirement expression data of a user; determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data; if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result; if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model. The flexibility of the task planning mode of the intelligent man-machine interaction equipment can be improved, and the capability of the intelligent man-machine interaction equipment for coping with complex task demands of users is improved.
For the sake of understanding the present embodiment, first, a detailed description will be given of a task planning method disclosed in an embodiment of the present disclosure, where an execution subject of the task planning method provided in the embodiment of the present disclosure is generally a computer device with a certain computing capability, where the computer device includes, for example: the terminal device, or server or other processing device, may be a User Equipment (UE), mobile device, user terminal, cellular telephone, cordless telephone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle mounted device, wearable device, etc. In some possible implementations, the task planning method may be implemented by way of a processor invoking computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a task planning method according to an embodiment of the present disclosure is shown, where the method includes steps S101 to S104, where:
s101, acquiring requirement expression data of a user, and determining task content corresponding to the requirement expression data.
In specific implementation, the embodiment of the application can be applied to intelligent man-machine interaction equipment such as intelligent robots, intelligent voice assistants and the like, acquire requirement expression data containing user requirements, analyze the requirement expression data and determine task content contained in the requirement expression data.
Here, the requirement expression data may be voice data or text data, and in implementation, the requirement expression data may be selected according to actual needs, and it should be noted that when the requirement expression data is voice data, the voice data needs to be converted into text data, so as to facilitate subsequent processing.
The method comprises the steps of processing word segmentation and other modes aiming at text contents corresponding to the requirement expression data, marking word parts corresponding to each word, extracting verbs and nouns contained in the word parts, and determining task contents corresponding to the requirement expression data according to the extracted verbs and nouns.
Exemplary: the requirement expression data input by the user can be ' query weather today ' and help me to order lunch ', and the corresponding task content is ' query weather ' and ' order lunch '.
S102, determining whether the task content corresponds to a fixed business flow, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business flow, and outputting a feedback result corresponding to the requirement expression data.
In a specific implementation, after receiving requirement expression data of a user and determining corresponding task content, firstly determining whether the task is a task with a fixed business process according to the task content, if the task is a task with a fixed process, determining the fixed business process corresponding to the task, and executing steps corresponding to each business process, determining a capability tool required for executing the executing steps according to each executing step, and taking output of the capability tool as a feedback result for feeding back requirement expression of the user.
Here, the task of determining whether to be a fixed flow may depend on business analysis, with tasks having fixed flows generally having explicit starts and ends, and fixed execution steps.
The form of the sequential chain of task execution steps may be: each step has a single input/output and the output of one step is the input of the next step. The more general sequential chain form allows multiple inputs/outputs, providing a richer application scenario for complex tasks.
As a possible implementation manner, whether the current task is preconfigured with the corresponding task processing flow or not can be checked in the service configuration database by accessing a preset service configuration database, and if yes, the task processing flow is executed according to the configuration.
Here, the configuration may be performed in the service configuration database by an administrator through a background management system in which the administrator may define or modify a corresponding planning method for each task.
The bank transfer task is a fixed flow, and the corresponding configuration mode may be that the operation and decision logic of each step are preset according to the bank transfer task flow chart, and then the configuration is performed in the system.
S103, if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result;
in the step, if the current task has no fixed business flow or no corresponding execution step flow is queried in a business configuration database, determining whether the task content hits a preset rule in a rule planning mode, and if the task content hits, feeding back an output result by the rule planning, thereby completing man-machine interaction.
Here, the user request may be matched according to predefined rules and templates. If the requested content meets the criteria of a certain rule or template, then the user request is deemed hit.
For example, for an order system, the rules may include: "when the total price of the meal exceeds 20 yuan, free distribution is provided".
Specifically, the task processing rule may be generated by the following steps 1 to 4:
step 1, determining a task target corresponding to task content and constraint conditions aiming at the task content with the constraint conditions;
step 2, constructing a corresponding task processing rule according to the task target and the constraint condition;
step 3, storing the task processing rule into a preset rule database;
and 4, generating a regular expression according to the keywords corresponding to the task content, and configuring the regular expression as an index identifier corresponding to each task processing rule.
In a specific implementation, the business requirements need to be analyzed first, and the targets and constraints of the tasks are defined. Then, a series of rules are formulated based on these conditions.
Here, by formulating the rule conditions and the planning results of the task, the corresponding planning results can be directly given out after the rule conditions are hit, so that the execution efficiency and accuracy of the task are improved.
As a possible implementation manner, determining whether the task content hits the preset task processing rule may be implemented by the following steps 1-4:
step 1, converting the requirement expression data into corresponding text data;
step 2, word segmentation is carried out on the text data, and the text data carrying the word segmentation accesses the rule database;
step 3, determining whether the regular expression matched with the text data after word segmentation exists in the rule database;
step 4, if yes, the task content hits the task processing rule; if not, the task content does not hit the task processing rule.
For example, taking "query tomorrow weather" as an example, when a user submits a request, the system first performs word segmentation and part-of-speech tagging on the requested content. The requested content is then matched using a predefined regular expression ("query. Weather"). If the matching is successful, the user request is considered to hit, and the user request is processed according to the corresponding rule.
And S104, if the data does not hit, inputting the requirement expression data into a pre-trained cognitive model, and outputting a corresponding feedback result by the cognitive model.
In a specific implementation, if the task content requested by the user does not meet the condition of a certain rule or template, a corresponding planning scheme is dynamically provided through a pre-trained cognitive model.
Here, according to the task content, the task corresponding to the requirement expression data is sequentially divided into a plurality of subtasks; sequentially inputting the subtasks into a cognitive model, and determining a task planning scheme for executing the corresponding subtasks by the cognitive model; and sequentially executing the task planning schemes, and stopping executing when the number of execution rounds of the task planning schemes is greater than a preset round number threshold value.
Specifically, the planning scheme obtained through training of the cognitive model mainly comprises two kinds of cognitive planning and routing planning.
Here, for the cognitive planning approach, the final objective is achieved by performing a series of subtasks on the task to be performed. The method can decompose complex tasks into simpler and easier-to-process subtasks, thereby improving the execution efficiency and the task completion rate of the system.
The cognitive model is used for generating a planning scheme, the requirement expression data are converted into an input text, a user request, a context, related knowledge, an available capacity list and the like are assembled in the input text, the input text is output as instructions to be executed, the instructions to be executed are output in json number, and the execution planning and parameters of the capacity are represented.
Further, for the routing type planning, the next calling planning can be dynamically selected, and different processing paths are selected according to different characteristics of input data, so that various task demands can be more intelligently met.
Here, the routed planning makes decisions using pre-trained decision trees or neural network models, mainly by analyzing feature vectors of the input data. For example, the system may select a particular processing path when certain characteristic values in the input data exceed a predetermined threshold. In addition, the more accurate path selection can be performed by combining business logic such as historical behavior, time, place and other factors of the user. In contrast to cognitive planning, routing planning is a plan that generates one execution per step.
It should be noted that, the cognitive planning and the routing planning need to select one of them to be configured according to a service scenario, and the selection planning mode is generally based on complexity, variability and user requirements of the service. The cognitive rule is that all plans of a user are generated at one time, the routing rule is that each time a plan to be executed next is generated, the next plan is regenerated after the execution is finished, and the cycle is repeated until the completion. The rule type programming is used for configuring and realizing according to the established requirements of the service.
As a possible implementation manner, referring to fig. 2, a flowchart of a method for training a cognitive model according to an embodiment of the present disclosure is provided, where the method includes steps S201 to S204, where:
s201, sample requirement expression data corresponding to a plurality of task contents are obtained.
S202, constructing a task processing format comprising a task content indication item, a tool list indication item, an input indication item and an output indication item for each sample requirement expression data.
S203, constructing a data output format comprising input content, target tools selected to be used in the tool list and output content corresponding to the target tools for each sample requirement expression data.
S204, inputting the sample requirement expression data as a sample data set to the cognitive model, and sequentially processing the sample requirement expression data by the cognitive model according to the task processing format so as to train the task planning capacity of the cognitive model according to the task content.
In a specific implementation, the model data processing format of the cognitive model is organized as: task content indication items, tool list indication items, input indication items, and output indication items; the model data output format organization of the cognitive model is as follows: the input content, the target tools selected to be used in the tool list and the output content corresponding to the target tools.
Here, the task content indication item is used to indicate the current task content; the tool list indication item is used for indicating which tools are needed to complete the task; the task content indicator is used for determining the input of the model; the input indication item is used to specify what to take as input; the output instruction item is used to instruct why it is output.
Illustratively, when the user says: when our mind is bad today, the corresponding data processing format is: task content indicator-questions need to be answered; the tool list indicates items-which tool (enumerate tool names, tool names need to be specified) needs to be used to answer this question; inputting an instruction item-taking the original question of the user as an input of a tool; output indicator-the original output of the tool as an answer.
Further, the cognitive model sequentially performs reasoning according to the model data processing format until the output of a certain tool is used as a feedback result for feedback to the user.
Illustratively, when the user says: when the mind is bad today, the corresponding data output format is: input content-I are bad in mind today; target tools selected for use in the tools list-need to use emotion analysis tools to analyze the emotion of the user; what is the output content to which the target tool corresponds-is because you are not happy today? Is willing to share with me? I accompany you here.
According to the task planning method provided by the embodiment of the disclosure, task content corresponding to requirement expression data is determined by acquiring the requirement expression data of a user; determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data; if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result; if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model. The flexibility of the task planning mode of the intelligent man-machine interaction equipment can be improved, and the capability of the intelligent man-machine interaction equipment for coping with complex task demands of users is improved.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, the embodiments of the present disclosure further provide a task planning device corresponding to the task planning method, and since the principle of the device in the embodiments of the present disclosure for solving the problem is similar to that of the task planning method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, fig. 3 is a schematic diagram of a task planning apparatus according to an embodiment of the disclosure. As shown in fig. 3, a mission plan 300 provided by an embodiment of the present disclosure includes:
the obtaining module 310 is configured to obtain requirement expression data of a user, and determine task content corresponding to the requirement expression data.
And the ordered planning judging module 320 is configured to determine whether the task content corresponds to a fixed business flow, if yes, sequentially call a tool corresponding to each execution step according to an execution step corresponding to the fixed business flow, and output a feedback result corresponding to the requirement expression data.
A rule type planning decision module 330, configured to determine whether the task content hits a preset task processing rule, if yes, execute a task corresponding to the requirement expression data according to the task processing rule, and output a feedback result;
and the cognitive model planning module 340 is configured to input the requirement expression data to a pre-trained cognitive model if the requirement expression data does not hit, and output a corresponding feedback result by the cognitive model.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
According to the task planning device provided by the embodiment of the disclosure, task content corresponding to requirement expression data is determined by acquiring the requirement expression data of a user; determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data; if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result; if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model. The flexibility of the task planning mode of the intelligent man-machine interaction equipment can be improved, and the capability of the intelligent man-machine interaction equipment for coping with complex task demands of users is improved.
Corresponding to the task planning method in fig. 1, the embodiment of the present disclosure further provides an electronic device 400, as shown in fig. 4, which is a schematic structural diagram of the electronic device 400 provided in the embodiment of the present disclosure, including:
a processor 41, a memory 42, and a bus 43; memory 42 is used to store execution instructions, including memory 421 and external memory 422; the memory 421 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 41 and data exchanged with the external memory 422 such as a hard disk, and the processor 41 exchanges data with the external memory 422 through the memory 421, and when the electronic device 400 is operated, the processor 41 and the memory 42 communicate with each other through the bus 43, so that the processor 41 performs the steps of the task planning method in fig. 1.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the task planning method described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The embodiments of the present disclosure further provide a computer program product, where the computer program product includes computer instructions, where the computer instructions, when executed by a processor, may perform the steps of the task planning method described in the foregoing method embodiments, and specifically, reference the foregoing method embodiments will not be described herein.
Wherein the above-mentioned computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, but the present disclosure is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, it is not limited to the disclosure: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (10)
1. A method of mission planning, comprising:
acquiring requirement expression data of a user, and determining task content corresponding to the requirement expression data;
determining whether the task content corresponds to a fixed business process, if so, sequentially calling tools corresponding to each execution step according to the execution step corresponding to the fixed business process, and outputting a feedback result corresponding to the requirement expression data;
if not, determining whether the task content hits a preset task processing rule, if yes, executing a task corresponding to the requirement expression data according to the task processing rule, and outputting a feedback result;
if the feedback result is not hit, the requirement expression data are input to a pre-trained cognitive model, and the corresponding feedback result is output by the cognitive model.
2. The method of claim 1, wherein the cognitive model is trained based on the steps of:
acquiring sample requirement expression data corresponding to a plurality of task contents;
constructing a task processing format comprising a task content indicator, a tool list indicator, an input indicator and an output indicator for each sample requirement expression data;
constructing a data output format comprising input content, target tools selected for use in the tool list and output content corresponding to the target tools for each sample requirement expression data;
and the sample requirement expression data is input into the cognitive model as a sample data set, and the cognitive model is sequentially processed according to the task processing format so as to train the task planning capacity of the cognitive model according to the task content.
3. The method according to claim 2, wherein the inputting the requirement expression data into a pre-trained cognitive model, and outputting the corresponding feedback result by the cognitive model, specifically includes:
the cognitive model determines the target tool corresponding to the task content according to the task content;
taking the requirement expression data as the input content, and outputting model output content comprising output content corresponding to the target tool according to the data output format;
and feeding back the output content corresponding to the target tool to the user as the feedback result.
4. The method of claim 1, wherein the task processing rules are generated based on:
determining a task target corresponding to the task content and constraint conditions aiming at the task content with constraint conditions;
constructing a corresponding task processing rule according to the task target and the constraint condition;
storing the task processing rules into a preset rule database;
and generating a regular expression according to the keywords corresponding to the task content, and configuring the regular expression as an index identifier corresponding to each task processing rule.
5. The method of claim 4, wherein determining whether the task content hits a preset task processing rule is based on:
converting the requirement expression data into corresponding text data;
performing word segmentation on the text data, and accessing the rule database by the text data carrying the word segmentation;
determining whether the regular expression matched with the text data after word segmentation exists in the rule database;
if yes, the task content hits the task processing rule; if not, the task content does not hit the task processing rule.
6. The method of claim 1, wherein the outputting, by the cognitive model, the corresponding feedback result, in particular further comprises:
according to the task content, sequentially dividing the task corresponding to the requirement expression data into a plurality of subtasks;
sequentially inputting the subtasks to the cognitive model, and determining a task planning scheme for executing the corresponding subtasks by the cognitive model;
and sequentially executing the task planning schemes, and stopping executing when the number of execution rounds of the task planning schemes is greater than a preset round number threshold value.
7. A mission planning apparatus, comprising:
the acquisition module is used for acquiring the requirement expression data of the user and determining task content corresponding to the requirement expression data;
the ordered planning judging module is used for determining whether the task content corresponds to a fixed business flow, if so, sequentially calling tools corresponding to each executing step according to executing steps corresponding to the fixed business flow, and outputting feedback results corresponding to the requirement expression data;
the rule type planning judging module is used for determining whether the task content hits a preset task processing rule or not if not, executing a task corresponding to the requirement expression data according to the task processing rule if yes, and outputting a feedback result;
and the cognitive model planning module is used for inputting the requirement expression data into a pre-trained cognitive model if the requirement expression data is not hit, and outputting a corresponding feedback result by the cognitive model.
8. The apparatus of claim 7, further comprising a cognitive model training module to:
acquiring sample requirement expression data corresponding to a plurality of task contents;
constructing a task processing format comprising a task content indicator, a tool list indicator, an input indicator and an output indicator for each sample requirement expression data;
constructing a data output format comprising input content, target tools selected for use in the tool list and output content corresponding to the target tools for each sample requirement expression data;
and the sample requirement expression data is input into the cognitive model as a sample data set, and the cognitive model is sequentially processed according to the task processing format so as to train the task planning capacity of the cognitive model according to the task content.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the task planning method of any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the task planning method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575311.6A CN117453372B (en) | 2023-11-23 | 2023-11-23 | Task planning method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575311.6A CN117453372B (en) | 2023-11-23 | 2023-11-23 | Task planning method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117453372A CN117453372A (en) | 2024-01-26 |
CN117453372B true CN117453372B (en) | 2024-04-09 |
Family
ID=89581816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311575311.6A Active CN117453372B (en) | 2023-11-23 | 2023-11-23 | Task planning method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117453372B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597318A (en) * | 2020-05-21 | 2020-08-28 | 普信恒业科技发展(北京)有限公司 | Method, device and system for executing business task |
CN115033816A (en) * | 2022-06-27 | 2022-09-09 | 中国平安人寿保险股份有限公司 | Business processing method and device based on rule engine, computer equipment and medium |
CN115983804A (en) * | 2023-01-30 | 2023-04-18 | 网易(杭州)网络有限公司 | Man-machine cooperation task processing method and device, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111782674A (en) * | 2019-11-06 | 2020-10-16 | 北京京东尚科信息技术有限公司 | Task query method and device |
-
2023
- 2023-11-23 CN CN202311575311.6A patent/CN117453372B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597318A (en) * | 2020-05-21 | 2020-08-28 | 普信恒业科技发展(北京)有限公司 | Method, device and system for executing business task |
CN115033816A (en) * | 2022-06-27 | 2022-09-09 | 中国平安人寿保险股份有限公司 | Business processing method and device based on rule engine, computer equipment and medium |
CN115983804A (en) * | 2023-01-30 | 2023-04-18 | 网易(杭州)网络有限公司 | Man-machine cooperation task processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117453372A (en) | 2024-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11551007B2 (en) | Determining intent from a historical vector of a to-be-analyzed statement | |
CN109299344A (en) | The generation method of order models, the sort method of search result, device and equipment | |
CN108153876A (en) | Intelligent answer method and system | |
CN111222305A (en) | Information structuring method and device | |
CN110874401B (en) | Information processing method, model training method, device, terminal and computing equipment | |
CN112434501B (en) | Method, device, electronic equipment and medium for intelligent generation of worksheet | |
CN107885842A (en) | Method, apparatus, server and the storage medium of intelligent answer | |
CN109635080A (en) | Acknowledgment strategy generation method and device | |
CN110971460A (en) | Off-network prediction method, device, server and storage medium | |
CN111506719A (en) | Associated question recommending method, device and equipment and readable storage medium | |
CN109710732A (en) | Information query method, device, storage medium and electronic equipment | |
CN113469353A (en) | Neural network model optimization method, data processing method and device | |
CN111753063A (en) | Response method, response device, server and storage medium | |
CN110113501A (en) | Mission dispatching method, apparatus, computer equipment and storage medium | |
CN111400465A (en) | Generation method and device of customer service robot, electronic equipment and medium | |
CN110209768B (en) | Question processing method and device for automatic question answering | |
CN117453372B (en) | Task planning method and device, electronic equipment and storage medium | |
CN117332065A (en) | Consultation method, system and terminal based on association word association of large language model | |
CN117271084A (en) | Workflow generation method and device, electronic equipment and storage medium | |
CN117314139A (en) | Modeling method and device for business process, terminal equipment and storage medium | |
CN109656952B (en) | Query processing method and device and electronic equipment | |
CN110413750A (en) | The method and apparatus for recalling standard question sentence according to user's question sentence | |
CN113886554A (en) | Legal consultation question-answering method and device | |
CN113609268A (en) | Intelligent psychological knowledge question-answering method and device based on knowledge graph | |
CN110019709B (en) | Automatic question and answer method for robot and automatic question and answer system for robot |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |