Task processing method and device
By establishing a task creation API interface on the user side and obtaining task process nodes, responding to user side interaction requests to determine interactive data, the complexity and efficiency of task automatic generation in the existing technology is solved, and efficient automatic creation of tasks is achieved.
Patent Information
- Application Number
- CN202411586490.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the process of automatic task generation for a large number of users, it is difficult for the existing technology to realize complex resource deployment and design, resulting in the inability to meet task processing efficiency and diversified task generation requirements.
By obtaining task automatic creation requests on the user side, establishing a task creation API interface, and obtaining the task process nodes corresponding to the task, responding to the user side's interaction requests to determine the interactive data, and finally sending interactive data to the user side through the API interface to realize automatic task create.
It improves the efficiency of automatic task creation, reduces technical investment on the user side, and realizes controllable automatic task creation.
Smart Images

Figure CN119127353B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing technology, and in particular to a task processing method and device. Background Art
[0002] In the process of automatically generating tasks for a large number of users, such as generating PPT based on AI, it is usually necessary to make more complex resource deployment and design on the user side to achieve it. If the automatic generation of different types of services for a large number of users is required, the above solution will become very complicated and difficult to implement. For users, neither the task processing efficiency nor the diversified task generation needs can meet good expectations. Summary of the invention
[0003] The main purpose of the present invention is to provide a task processing method and device to solve the technical problems existing in the related art.
[0004] In order to achieve the above-mentioned purpose, according to the first aspect of the present disclosure, a task processing method is provided, including: obtaining a task automatic creation request from a user end, creating an API interface for the task, and obtaining a task flow node corresponding to the task; in response to receiving an interaction request sent by the user end through the API interface during the task processing process, determining interaction data based on the task flow node indicated by the interaction request; and sending the interaction data to the user end through the API interface so that the user end can automatically create a task.
[0005] Optionally, before obtaining the task flow node corresponding to the task, the method includes: constructing flow nodes for different types of tasks: splitting each type of task into task flow nodes according to business functions, and mapping identifiers for each task flow node so that each task flow node corresponds to a unique identifier; mapping a unique subject for the interaction link contained in each task flow node; determining the interaction data based on the task flow node indicated by the interaction request includes: parsing the interaction request to determine the target identifier of the business flow node indicated by the interaction request, and the target subject of the interaction link currently to be executed by the task flow node; determining the interaction data based on the target identifier and the target subject.
[0006] Optionally, the method further includes: constructing a resource package for each interactive link in each business process node; constructing each resource package into a resource chain in a specified order, wherein the resource packages are linked based on state identifiers.
[0007] Optionally, determining the interaction data based on the task flow node indicated by the interaction request includes: calling a corresponding resource chain based on the target identifier, and determining a target resource package in the resource chain based on a target subject indicated by the interaction request.
[0008] Optionally, after sending the interaction data to the user terminal through the API interface, the method also includes obtaining a status identifier from the user terminal, wherein the status identifier is used to identify execution status information of the current interaction link; if the execution status information indicates that the execution is completed, calling the next resource linked to the target resource package; sending the next resource to the user terminal through the API interface; and / or, if the execution status information indicates that the execution is not completed, obtaining the status identifier from the user terminal after a specified time.
[0009] Optionally, the method further includes: if the execution status information indicates that the execution fails, obtaining process data of the interaction link from the user end.
[0010] According to a second aspect of the present disclosure, a task processing device is provided, including: an API interface creation unit, used to obtain a task automatic creation request from a user end, create an API interface for the task, and obtain a task flow node corresponding to the task; an interaction data determination unit, used to respond to receiving an interaction request sent by the user end through the API interface during task processing, and determine interaction data based on the task flow node indicated by the interaction request; an interaction data feedback unit, used to send the interaction data to the user end through the API interface so that the user end can automatically create a task.
[0011] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method described in any one of the implementation modes of the first aspect.
[0012] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one implementation of the first aspect.
[0013] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the method described in any one of the implementation modes of the first aspect when executed by a processor.
[0014] The task processing method and device of this embodiment include obtaining a task automatic creation request from a user end, creating an API interface for the task, and obtaining a task flow node corresponding to the task; in response to receiving an interaction request sent by the user end through the API interface during task processing, determining interaction data based on the task flow node indicated by the interaction request; and sending the interaction data to the user end through the API interface for the user end to automatically create a task. Automatically creating tasks by establishing an API based on tasks can assist the user end in automatically creating tasks in a controllable manner, improve the efficiency of automatic task creation, and avoid excessive and high-cost technical investment by the user end. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 is a flowchart of a task processing method according to an embodiment of the present disclosure;
[0017] Figure 2 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] According to an embodiment of the present disclosure, a task processing method is provided. The execution subject of the method can be referred to as the Business end, which can provide automatic generation of tasks for the C end through the B end. Figure 1 As shown, it includes the following steps 101 to 103:
[0022] Step 101: Obtain a task automatic creation request from a user, create an API interface for the task, and obtain a task flow node corresponding to the task.
[0023] In this step, the user terminal can initiate a request for automatically creating a task. Automatically created tasks not only include generation, but any tasks that can be automatically implemented, such as tasks based on AI to generate PPT, tasks based on automatic downloading of PPT, etc., are all automatically created tasks. There is no limitation here. Each automatically created task can be abstracted into at least one business process node, and each business process node contains at least one interactive link. Taking the task of generating PPT based on AI as an example, it can include theme generation process nodes, template style generation process nodes, content generation process nodes, etc. Different tasks contain different task process nodes, and these nodes can be abstracted in advance.
[0024] Different user ends can send automatic task creation requests to end B. End B creates an API interface based on the request, thereby establishing a mapping between tasks and interfaces. By interacting through the API interface, automatic task creation can be achieved in a controllable manner.
[0025] As an optional implementation method of this embodiment, in obtaining the task flow node corresponding to the task, the method includes: constructing flow nodes for different types of tasks: splitting each type of task into task flow nodes according to business functions, and mapping identifiers for each task flow node so that each task flow node corresponds to a unique identifier; mapping a unique subject for the interaction link contained in each task flow node; determining the interaction data based on the task flow node indicated by the interaction request includes: parsing the interaction request to determine the target identifier of the business flow node indicated by the interaction request, and the target subject of the interaction link currently to be executed by the task flow node; determining the interaction data based on the target identifier and the target subject.
[0026] In this optional implementation, tasks may include multiple types, different business process nodes for different types of tasks may be different, and different business process nodes in the same task may have different interaction links. Business process nodes can be abstracted according to the business functions of the task. Taking AI generating PPT as an example, during the automatic generation process, the business functions that need to be completed include theme generation function, template style generation function, content generation function, etc., and then based on these functions, theme generation process nodes, template style generation process nodes, content generation process nodes, etc. can be abstracted. Each business process node may contain multiple interaction links, and the interaction link is a link that requires the user end and the B end to interact in order to complete the automatic creation of the task. For example, in the theme generation process node, the interaction link in this node can be abstracted as an interaction link for generating a theme style, an interaction link for generating theme content, and so on.
[0027] Furthermore, each business process node is mapped with a unique identifier, and each business link has a unique theme, such as PPT theme generation, template style generation, etc. The resource for creating a task can be uniquely determined through the unique identifier.
[0028] As an optional implementation of this embodiment, the method further includes: constructing a resource package for each interactive link in each business process node; constructing each of the resource packages into a resource chain in a specified order, wherein the resource chain is linked based on a state identifier.
[0029] In this optional implementation, the interactive data required by the interactive link can be packaged in real time, or the interactive data required by the interactive link can be packaged in advance to construct a resource package. There is an execution priority between the interactive links, and the priority is determined according to the execution order in the automatic task creation process. Therefore, each resource package can be linked based on the priority to construct a resource chain, and the resource packages between the resource chains are linked by a state identifier, which is the execution state of the interactive link obtained from the user end.
[0030] Step 102: In response to receiving an interaction request sent by the user end through the API interface during task processing, determining interaction data based on the task flow node indicated by the interaction request.
[0031] As an optional implementation of this embodiment, determining the interaction data based on the task flow node indicated by the interaction request includes: calling the corresponding resource chain based on the target identifier, and determining the target resource package in the resource chain based on the target subject indicated by the interaction request.
[0032] In this optional implementation, after obtaining the interaction request from the user side, the target identifier of the current business process node is determined, and the resource chain can be determined based on the target identifier; after determining the resource chain, the corresponding target resource package can be determined from the resource chain based on the target theme of the current interaction link indicated by the interaction request.
[0033] Step 103: Send the interaction data to the user terminal through the API interface so that the user terminal can automatically create a task.
[0034] In this step, after the target resource package is determined, the target resource package is sent to the user end through the API interface so that the user end can automatically create a task.
[0035] As an optional implementation method of this embodiment, after sending the interaction data to the user terminal through the API interface, the method also includes obtaining a status identifier from the user terminal, wherein the status identifier is used to identify execution status information of the current interaction link; if the execution status information indicates that the execution is completed, calling the next resource linked to the target resource package; sending the next resource to the user terminal through the API interface; and / or, if the execution status information indicates that the execution is not completed, obtaining the status identifier from the user terminal after a specified time.
[0036] In this optional implementation, an execution status identifier can be obtained from the user end. If the status identifier indicates that the execution is successful and completed, the next resource package of the current resource package is determined based on the resource chain, and the next resource package is fed back to the user end. Furthermore, a node chain is established between each business process node in the order of execution. If the resource package in the resource chain of a business process node is called, the next business process node of the current business process node is entered based on the node chain, and the resource package of the first interactive link therein is called. It should be understood that the next node will be triggered only after the previous node is executed. If the previous node is not completed but triggers the next node, the execution is interrupted.
[0037] If the execution status information indicates that the execution is not completed, the execution status information is obtained from the user end at regular intervals.
[0038] As an optional implementation manner of this embodiment, if the execution status information indicates that the execution fails, the process data of the interaction link is obtained from the user end.
[0039] In this optional implementation, if the execution fails, the data generated in the interaction link can be obtained from the user end to determine the cause of the exception based on the data.
[0040] This embodiment realizes controllable creation of automatically created tasks based on the task creation API interface, thereby improving the efficiency of task creation.
[0041] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] According to an embodiment of the present disclosure, a task processing device is also provided, including an API interface creation unit, which is used to obtain a task automatic creation request from a user end, create an API interface for the task, and obtain a task flow node corresponding to the task; an interaction data determination unit, which is used to respond to an interaction request sent by the user end through the API interface during task processing, and determine interaction data based on the task flow node indicated by the interaction request; and an interaction data feedback unit, which is used to send the interaction data to the user end through the API interface so that the user end can automatically create a task.
[0043] Optionally, before obtaining the task flow node corresponding to the task, the method includes: constructing flow nodes for different types of tasks: splitting each type of task into task flow nodes according to business functions, and mapping identifiers for each task flow node so that each task flow node corresponds to a unique identifier; mapping a unique subject for the interaction link contained in each task flow node; determining the interaction data based on the task flow node indicated by the interaction request includes: parsing the interaction request to determine the target identifier of the business flow node indicated by the interaction request, and the target subject of the interaction link currently to be executed by the task flow node; determining the interaction data based on the target identifier and the target subject.
[0044] Optionally, the device also constructs process nodes for different types of tasks: splits each type of task into task process nodes according to business functions, and maps identifiers for each task process node so that each task process node corresponds to a unique identifier; maps a unique subject for the interaction link contained in each task process node; determines the interaction data based on the task process node indicated by the interaction request, including: parsing the interaction request to determine the target identifier of the business process node indicated by the interaction request, and the target subject of the interaction link currently to be executed by the task process node; determines the interaction data based on the target identifier and the target subject.
[0045] Optionally, determining the interaction data based on the task flow node indicated by the interaction request includes: calling a corresponding resource chain based on the target identifier, and determining a target resource package in the resource chain based on a target subject indicated by the interaction request.
[0046] Optionally, after sending the interaction data to the user terminal through the API interface, the method also includes obtaining a status identifier from the user terminal, wherein the status identifier is used to identify execution status information of the current interaction link; if the execution status information indicates that the execution is completed, calling the next resource linked to the target resource package; sending the next resource to the user terminal through the API interface; and / or, if the execution status information indicates that the execution is not completed, obtaining the status identifier from the user terminal after a specified time.
[0047] Optionally, the device also includes obtaining process data of the interaction link from the user end if the execution status information indicates that the execution fails.
[0048] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the method described in any of the above embodiments when executing.
[0049] According to an embodiment of the present invention, the present invention further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the method described in any of the above embodiments when executed.
[0050] According to an embodiment of the present invention, the present invention further provides a computer program product, which can implement the method described in any of the above embodiments when executed by a processor.
[0051] Figure 2 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
[0052] like Figure 2As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0053] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0054] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed.
[0055] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0056] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0057] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Claims
1. A task processing method, characterized in that: include: Obtain a task automatic creation request from a user end, create an API interface for the task, and obtain a task flow node corresponding to the task, wherein, before obtaining the task flow node corresponding to the task, the method includes: constructing flow nodes for different types of tasks: splitting each type of task into task flow nodes according to business functions, and performing identification mapping on each task flow node so that each task flow node corresponds to a unique identification; mapping a unique subject for the interaction link included in each task flow node; determining interaction data based on the task flow node indicated by the interaction request includes: parsing the interaction request to determine the target identification of the business flow node indicated by the interaction request, and the target subject of the interaction link currently to be executed by the task flow node; determining the interaction data based on the target identification and the target subject; In response to receiving an interaction request sent by the user end through the API interface during task processing, determining interaction data based on a task flow node indicated by the interaction request; The interaction data is sent to the user terminal through the API interface so that the user terminal can automatically create a task; the method also includes: constructing a resource package for each interaction link in each business process node; constructing each resource package into a resource chain in a specified order, wherein the resource packages are linked based on state identifiers; determining the interaction data based on the task process node indicated by the interaction request includes: calling the corresponding resource chain based on the target identifier, and determining the target resource package in the resource chain based on the target subject indicated by the interaction request.
2. The task processing method according to claim 1, characterized in that: After sending the interaction data to the user terminal through the API interface, the method further includes obtaining a state identifier from the user terminal, wherein the state identifier is used to identify execution state information of the current interaction link; If the execution status information indicates that the execution is completed, calling the next resource linked to the target resource bundle; Sending the next resource to the user terminal through an API interface; And / or, if the execution status information indicates that the execution is not completed, obtaining a status identifier from the user terminal after a specified time.
3. The task processing method according to claim 2, characterized in that: The method also includes: If the execution status information indicates that the execution fails, the process data of the interaction link is obtained from the user end.
4. A task processing device, characterized in that: include: An API interface creation unit, used to obtain a task automatic creation request from a user end, create an API interface for the task, and obtain a task flow node corresponding to the task; An interactive data determination unit is used to determine the interactive data based on the task flow node indicated by the interactive request in response to receiving the interactive request sent by the user end through the API interface during the task processing, wherein before obtaining the task flow node corresponding to the task, the method includes: constructing flow nodes for different types of tasks: splitting each type of task into task flow nodes according to business functions, and performing identification mapping on each task flow node so that each task flow node corresponds to a unique identification; mapping a unique subject for the interactive link contained in each task flow node; determining the interactive data based on the task flow node indicated by the interactive request includes: parsing the interactive request to determine the target identifier of the business flow node indicated by the interactive request, and the target subject of the interactive link currently to be executed by the task flow node; determining the interactive data based on the target identifier and the target subject; An interactive data feedback unit, used to send the interactive data to the user terminal through the API interface, so that the user terminal can automatically create a task; The device also constructs a resource package for each interactive link in each business process node; constructs each resource package into a resource chain in a specified order, wherein the resource packages are linked based on state identifiers; and determines the interaction data based on the task process node indicated by the interaction request, including: calling the corresponding resource chain based on the target identifier, and determining the target resource package in the resource chain based on the target subject indicated by the interaction request.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 3.
6. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1 to 3.
7. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
GPU task allocation method and device, equipment and medium
CN115794370A
Business processing method and device, electronic equipment and storage medium
CN116166390A