Task dispatching method, storage medium and program product

By receiving task distribution application messages from the business party, generating task instances and storing them in structured, the shortcomings of task distribution automation and flexibility in the existing technology are solved, and refined operation and fast access of the business system are realized.

CN113850466BActive Publication Date: 2025-03-18北京理房通支付科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110921207.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-11
Publication Date
2025-03-18
Estimated Expiration
2041-08-11

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve refined operation of business systems, especially the lack of automation and flexibility in task distribution, resulting in increased operating costs and inefficient operational efficiency.

Method used

Provide a task distribution method, which can obtain task templates by receiving task distribution application messages from business parties, generate task instance information, and perform structured storage, and finally distribute tasks according to task instances. This method supports ordinary tasks and task group distribution, and includes judgment logic and custom information processing.

Benefits of technology

It realizes precise matching and distribution of tasks, reduces system complexity and development costs, and supports fast access and fine operation of business systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850466B_ABST
    Figure CN113850466B_ABST
Patent Text Reader

Abstract

The present invention provides a task dispatching method, storage medium and program product, the method comprising: receiving a task dispatching application message sent by a business party, the task dispatching application message comprising a task execution subject ID and a task template ID; obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, storing the task instance information in a structured manner in a task information table to generate a task instance, and dispatching a task according to the task instance. The task dispatching method, storage medium and program product provided by the present invention realize accurate and flexibly customizable task matching and dispatching by generating a task instance according to the task dispatching application message and the task template after receiving a task dispatching application message comprising a task execution subject ID and a task template ID from a business party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a task dispatching method, a storage medium and a program product. Background Art

[0002] With the continuous iteration of various business systems and the continuous improvement of their functions, each business system has accumulated a large amount of business data. At the same time, with the addition of a large number of users, the joining of external manufacturers, and the expansion of cities, the operating costs of business systems at all levels have risen sharply. In order to reduce operating costs, improve operating efficiency, and support refined operations, it has become an urgent problem that each business system needs to solve. Establishing a unified operating platform and achieving rapid access to business systems is a fast and low-cost effective solution to achieve refined operations of various business systems.

[0003] Task dispatch is an important part of refined operations, so it is urgent to realize task dispatch that supports automated refined operations. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a task dispatching method, a storage medium and a program product.

[0005] The present invention provides a task dispatching method, comprising: receiving a task dispatching application message sent by a business party, wherein the task dispatching application message includes a task execution subject ID and a task template ID; obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, performing structured storage of the task instance information in a task information table to generate a task instance, and dispatching a task according to the task instance.

[0006] According to a task dispatching method provided by the present invention, the task dispatching application message further includes an associated condition, which corresponds to the task template ID and is used to limit the value of an event that needs to be achieved by the task corresponding to the task template ID.

[0007] According to a task dispatching method provided by the present invention, the generating of task instance information according to the task dispatching application message and the task template specifically includes: extracting field information in the task dispatching application message and the task template, and generating the task instance information according to the field information; wherein, if the task dispatching application message and the task template assign a value to the same field, the task dispatching application message shall prevail.

[0008] According to a task dispatching method provided by the present invention, before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template, the method also includes: judging whether the task template ID is unique; if the task template ID is unique, the task dispatching type corresponding to the task dispatching application message is ordinary task dispatching, and if the task template ID is not unique, the task dispatching type is task group dispatching; when the task dispatching type is the ordinary task dispatching, the task template ID is the task template ID of the ordinary task to be dispatched, and the association condition is the ordinary task association condition corresponding to the ordinary task.

[0009] According to a task dispatching method provided by the present invention, if the task dispatching type is the task group dispatching, then the task template corresponding to the task template ID is obtained, and task instance information is generated according to the task dispatching application message and the task template, specifically including: obtaining the main task template ID and the subtask template ID in the task template ID, obtaining the main task template according to the main task template ID, and obtaining the subtask template according to the subtask template ID; obtaining the subtask association condition corresponding to the subtask template ID in the association condition; generating the main task instance information according to the task execution subject ID and the main task template, and generating the subtask instance information according to the task execution subject ID, the subtask template and the subtask association condition; splicing the main task instance information and the subtask instance information to obtain the task instance information.

[0010] According to a task dispatching method provided by the present invention, before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template, the method also includes: determining whether the task to be collected corresponding to the task dispatching application message has been dispatched; if it has been dispatched, ending; if it has not been dispatched, executing the step of obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template.

[0011] According to a task dispatching method provided by the present invention, the determination of whether the task to be collected corresponding to the task dispatching application message has been dispatched specifically includes: querying whether the task information table in progress contains a preset field in the task dispatching application message; if so, it indicates that the task to be collected has been dispatched; if not, further querying whether the historical task information table contains the preset field in the task dispatching application message; if not, further determining whether the task to be collected is a one-time task; if so, it indicates that the task to be collected has been dispatched; if not, further determining whether the task to be collected is a periodic task; if not, it indicates that the task to be collected has been dispatched; if so, further determining whether the recording time of the preset field is within the current period; if so, it indicates that the task to be collected has been dispatched; if not, it indicates that the task to be collected has not been dispatched.

[0012] According to a task dispatching method provided by the present invention, the task dispatching application message also includes at least one of an expiration time after the task is dispatched, a number of occurrences of an event that the task needs to achieve, and display content of the task when it is displayed on a page.

[0013] According to a task dispatching method provided by the present invention, the task dispatching application message includes a regular information field and a custom information field.

[0014] According to a task dispatching method provided by the present invention, before acquiring the task template corresponding to the task template ID, the method further comprises: parsing and formatting the task dispatching application message.

[0015] The present invention also provides a task dispatching device, including: a task dispatching application message receiving module, used to: receive a task dispatching application message sent by a business party, the task dispatching application message including a task execution subject ID and a task template ID; a task dispatching module, used to: obtain a task template corresponding to the task template ID, generate task instance information according to the task dispatching application message and the task template, perform structured storage of the task instance information in a task information table to generate a task instance, and dispatch tasks according to the task instance.

[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned task dispatching methods are implemented.

[0017] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned task dispatching methods are implemented.

[0018] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above-mentioned task dispatching methods when executed by a processor.

[0019] The task dispatching method, storage medium and program product provided by the present invention, after receiving the task dispatching application message including the task execution subject ID and the task template ID from the business party, generate a task instance according to the task dispatching application message and the task template, can accurately match the task executor and the task according to the task execution subject ID, and highly customize the task content according to the task template, thereby realizing accurate and flexibly customizable task matching and dispatching; and, the task matching and dispatching logic are separated from the business logic of the business system itself, and a unified model is established, thereby reducing the system complexity, reducing the development cost, and realizing the purpose of rapid access and refined operation of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 This is one of the flowcharts of the task dispatching method provided by the present invention;

[0022] Figure 2 It is a data structure diagram of a task dispatch application message in the task dispatch method provided by the present invention;

[0023] Figure 3 It is a schematic diagram of a task receiving / dispatching model of the task dispatching method provided by the present invention;

[0024] Figure 4 It is a task collection / dispatching timing diagram of the task dispatching method provided by the present invention;

[0025] Figure 5 is a flow chart of another task dispatching method provided by the present invention;

[0026] Figure 6 yes Figure 5 The logic flow chart of duplicate detection in the provided task dispatching method;

[0027] Figure 7 yes Figure 5 The flowchart of common task dispatching in the provided task dispatching method;

[0028] Figure 8 yes Figure 5 The flowchart of task group dispatching in the provided task dispatching method;

[0029] Fig. 9 It is a structural schematic diagram of the task dispatching device provided by the present invention;

[0030] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] Combine the following Figure 1-Figure 10 The task dispatching method, storage medium and program product of the present invention are described.

[0033] Figure 1 This is one of the flow charts of the task dispatching method provided by the present invention. Figure 1 As shown, the method includes:

[0034] Step 101: Receive a task dispatch application message sent by a business party, wherein the task dispatch application message includes a task execution subject ID and a task template ID.

[0035] The task dispatching method provided by the present invention can be implemented in a server for task dispatching. The task dispatching process of the task dispatching method provided by the present invention is implemented by the task dispatching server and the business party in cooperation. The business party can be, for example, a platform for various business systems to implement different business functions. Task templates for different tasks are stored in the task dispatching server, and the task templates can define, for example, events to be completed to implement a certain task. After receiving the task dispatching application message sent by the business party, the server can generate and dispatch the tasks required by the business party in a targeted manner according to the task dispatching requirements of the task dispatching application message.

[0036] Therefore, when implementing task dispatch, the task dispatch server first receives the task dispatch application message sent by the business party, which includes the task execution subject ID and the task template ID. Among them, the task execution subject ID is the number of the executor of the task to be dispatched. For example, in the real estate transaction system, the task execution subject ID can be the code of the broker, business district manager, store owner, etc. The task template ID is the unique identifier of the task template. The task dispatch server can obtain the corresponding task template according to the task template ID.

[0037] Step 102: Obtain the task template corresponding to the task template ID, generate task instance information according to the task dispatch application message and the task template, store the task instance information in a structured manner in a task information table to generate a task instance, and dispatch tasks according to the task instance.

[0038] After receiving the task dispatch application message including the task execution subject ID and the task template ID, the task dispatch server obtains the task template corresponding to the task template ID, generates task instance information according to the task dispatch application message and the task template, such as integrating the task execution subject ID and the information in the task template to obtain the task instance information, and then stores the obtained task instance information in a structured task information table to achieve structured storage and encapsulation, thereby instantiating the task corresponding to the task template, that is, generating a task instance. The task dispatch server dispatches the task corresponding to the task execution subject ID and / or the business party according to the task instance. The task dispatch server can associate the business party ID, the task execution subject ID and the corresponding task instance, and display the corresponding task information on the task viewing interface of the business party and / or the task execution subject ID according to the task template and other settings about the task, thereby achieving task dispatch.

[0039] In actual use, the client of the business party and the task executor corresponding to the task execution subject ID can be used as the client of the task dispatch server, set the corresponding client interface (can display the task viewing interface), and display the corresponding task prompt information by continuously polling its own task dispatch results. The trigger button of the corresponding task can be displayed in the task prompt information, for example, the jump link of the corresponding task can be set, which can be flexibly set according to needs.

[0040] The task dispatching method provided by the present invention generates a task instance according to the task dispatching application message and the task template after receiving the task dispatching application message including the task execution subject ID and the task template ID from the business party. It can accurately match the task executor and the task according to the task execution subject ID, and highly customize the task content according to the task template, thereby realizing accurate and flexibly customizable task matching and dispatching; and, the task matching and dispatching logic is separated from the business logic of the business system itself, and a unified model is established to reduce the system complexity, reduce the development cost, and realize the purpose of rapid access and fine operation of the business system.

[0041] According to a task dispatching method provided by the present invention, the task dispatching application message further includes an associated condition, which corresponds to the task template ID and is used to limit the value of an event that needs to be achieved by the task corresponding to the task template ID.

[0042] The task dispatch application message may also include associated conditions, which correspond to the task template ID and are used to limit the value of the event that needs to be achieved for the task corresponding to the task template ID. For example, if a task template is a viewing task, the task template ID corresponding to the viewing task in the task dispatch application message may set associated conditions such as the specific viewing house number, and the viewing of the corresponding house number is completed only when the viewing is completed.

[0043] Since there is not necessarily only one task template ID carried in the task dispatch application message, when there are multiple task template IDs, that is, when requesting the dispatch of a task group, if an associated condition is set, the associated condition needs to be set corresponding to the task template ID. Depending on the situation of different task template IDs, the associated condition can be set or not.

[0044] The task dispatching method provided by the present invention can add the information of the current specific task requirement to the task instance by including the association condition corresponding to the task template ID in the task dispatching application message, thereby improving the flexibility and pertinence of the task dispatching.

[0045] According to a task dispatching method provided by the present invention, the generating of task instance information according to the task dispatching application message and the task template specifically includes: extracting field information in the task dispatching application message and the task template, and generating the task instance information according to the field information; wherein, if the task dispatching application message and the task template assign a value to the same field, the task dispatching application message shall prevail.

[0046] When generating task instance information based on the task dispatch application message and the task template, the field information in the task dispatch application message and the task template is extracted, and the task instance information is generated based on the field information. When generating task instance information, the task dispatch application message is given priority. If the task dispatch application message and the task template assign a value to the same field, the task dispatch application message is given priority.

[0047] For example, the task template can set an expiration time after the task is dispatched. If the expiration time of the task in the task template is set to 12 hours after the task is dispatched, but the expiration time of the task in the task dispatch application message is set to 24 hours after the task is dispatched, the task instance information will be generated based on the task expiration time set in the task dispatch application message.

[0048] The task dispatching method provided by the present invention generates task instance information by extracting field information, thereby improving the speed of task instance information generation; by giving priority to task dispatching application messages when generating task instance information, it is helpful to meet the different needs of business parties and further improve the flexibility of task dispatching.

[0049] According to a task dispatching method provided by the present invention, before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template, the method also includes: judging whether the task template ID is unique; if the task template ID is unique, the task dispatching type corresponding to the task dispatching application message is ordinary task dispatching, and if the task template ID is not unique, the task dispatching type is task group dispatching; when the task dispatching type is the ordinary task dispatching, the task template ID is the task template ID of the ordinary task to be dispatched, and the association condition is the ordinary task association condition corresponding to the ordinary task.

[0050] Before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatch application message and the task template, first determine whether the task dispatch type corresponding to the task dispatch application message belongs to ordinary task dispatch or task group dispatch, which can be determined specifically according to the number of task template IDs in the task dispatch application message. If the task template ID is unique, it means that there is only one task to be dispatched, and the task dispatch type is ordinary task dispatch. If the task template ID is not unique, it means that there is a task group to be dispatched, and the task group includes a main task and at least one subtask, and the task dispatch type is task group dispatch.

[0051] If the task dispatch type is ordinary task dispatch, the task template ID is the task template ID of the ordinary task to be dispatched, and the associated condition is the ordinary task associated condition corresponding to the ordinary task. The corresponding task template can be obtained according to the task template ID, and the task instance information is generated according to the task execution subject ID, the associated condition and the task template, and then the task instance is generated, and the task is dispatched according to the task instance.

[0052] The task dispatching method provided by the present invention obtains the task template corresponding to the task template ID, and before generating task instance information according to the task dispatching application message and the task template, first determines whether the task dispatching type is ordinary task dispatching or task group dispatching, thereby providing a prerequisite for flexible generation of task instance information.

[0053] According to a task dispatching method provided by the present invention, if the task dispatching type is the task group dispatching, then the task template corresponding to the task template ID is obtained, and task instance information is generated according to the task dispatching application message and the task template, specifically including: obtaining the main task template ID and the subtask template ID in the task template ID, obtaining the main task template according to the main task template ID, and obtaining the subtask template according to the subtask template ID; obtaining the subtask association condition corresponding to the subtask template ID in the association condition; generating the main task instance information according to the task execution subject ID and the main task template, and generating the subtask instance information according to the task execution subject ID, the subtask template and the subtask association condition; splicing the main task instance information and the subtask instance information to obtain the task instance information.

[0054] If the task dispatch type is task group dispatch, the task dispatch application message includes a task template ID corresponding to a main task and a task template ID corresponding to at least one subtask. The main task information and subtask information can be distinguished through the data structure and fields of the task dispatch application message.

[0055] If the task dispatch type is task group dispatch, when obtaining the task template corresponding to the task template ID and generating the task instance information according to the task dispatch application message and the task template, obtain the main task template ID and the subtask template ID in the task template ID, and obtain the main task template according to the main task template ID, and obtain the subtask template according to the subtask template ID. When there are subtasks, completing each subtask means completing the corresponding main task. Therefore, when the task group is dispatched, the associated conditions corresponding to the main task will become invalid, and the associated conditions of the subtask will prevail when executing the task. Therefore, the subtask associated conditions corresponding to the subtask template ID in the associated conditions included in the task dispatch application message are obtained.

[0056] Generate the main task instance information according to the task execution subject ID and the main task template, and generate the subtask instance information according to the task execution subject ID, the subtask template and the subtask association conditions. When generating the subtask instance information, if there are multiple subtasks, generate the subtask instance information corresponding to each subtask respectively. Then, splice the main task instance information and each subtask instance information to obtain the task instance information.

[0057] The task dispatching method provided by the present invention generates main task instance information according to the task execution subject ID and the main task template when the task dispatching type is task group dispatching, generates subtask instance information according to the task execution subject ID, the subtask template and the subtask association conditions, and splices the main task instance information and the subtask instance information to obtain the task instance information, thereby effectively ensuring the dispatching of the task group.

[0058] According to a task dispatching method provided by the present invention, before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template, the method also includes: determining whether the task to be collected corresponding to the task dispatching application message has been dispatched; if it has been dispatched, ending; if it has not been dispatched, executing the step of obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template.

[0059] Before performing task dispatching, such as obtaining the task template corresponding to the task template ID, generating task instance information according to the task dispatch application message and the task template, or determining whether the task template ID is unique, you can first execute the duplicate detection logic, that is, determine whether the task corresponding to the task dispatch application message has been dispatched to prevent repeated task dispatching. If it is determined that the task corresponding to the task dispatch application message has been dispatched, then the task is terminated and no longer dispatched; if it is determined that the task corresponding to the task dispatch application message has not been dispatched, then the task dispatch is executed again, such as executing the steps of obtaining the task template corresponding to the task template ID, generating task instance information according to the task dispatch application message and the task template, or determining whether the task template ID is unique.

[0060] The task dispatching method provided by the present invention executes duplicate detection logic, and when the task to be collected corresponding to the task dispatching application message has been dispatched, duplicate dispatching is not performed, thereby improving the reliability of task dispatching.

[0061] According to a task dispatching method provided by the present invention, the determination of whether the task to be collected corresponding to the task dispatching application message has been dispatched specifically includes: querying whether the task information table in progress contains a preset field in the task dispatching application message; if so, it indicates that the task to be collected has been dispatched; if not, further querying whether the historical task information table contains the preset field in the task dispatching application message; if not, further determining whether the task to be collected is a one-time task; if so, it indicates that the task to be collected has been dispatched; if not, further determining whether the task to be collected is a periodic task; if not, it indicates that the task to be collected has been dispatched; if so, further determining whether the recording time of the preset field is within the current period; if so, it indicates that the task to be collected has been dispatched; if not, it indicates that the task to be collected has not been dispatched.

[0062] The task information table is used to perform structured storage of task instance information. The task information table includes a current activity table and a history table. The task information table of completed task dispatch or abnormally terminated task dispatch can be regularly stored as a historical task information table.

[0063] After receiving the task dispatch application message sent by the business party, the task dispatch server can first query the ongoing task information table (the currently active task information table) to check whether the ongoing task information table contains the preset fields in the task dispatch application message. For example, when the task dispatch application message includes the task execution subject ID and the task template ID, the preset fields can be the task execution subject ID and the task template ID. When the task dispatch application message includes the task execution subject ID, the task template ID and the associated conditions, the preset fields can be the task execution subject ID, the task template ID and the associated conditions.

[0064] If the ongoing task information table contains the preset fields in the task dispatch application message, it means that the task that needs to be collected corresponding to the task dispatch application message has been distributed and will not be distributed again. If the ongoing task information table does not contain the preset fields in the task dispatch application message, it means that the task instance information corresponding to the task dispatch application message has not been generated and stored in the current task information table. Further query the historical task information table to see if there are the preset fields in the task dispatch application message. If the historical task information table does not have the preset fields in the task dispatch application message either, it means that the task that needs to be collected has not been distributed and the task can be distributed. If the historical task information table has the preset fields in the task dispatch application message, it means that the same task has been distributed before. At this time, further determine whether the task that needs to be collected is a one-time task, and you can query the task template to obtain information on whether the task that needs to be collected is a one-time task.

[0065] If the task to be collected is a one-time task, it means that the corresponding task only needs to be distributed once. Since it has been distributed, it does not need to be distributed repeatedly. If the task to be collected is not a one-time task, it is further determined whether the task to be collected is a periodic task. Similarly, the information of whether the task to be collected is a periodic task can be obtained by querying the task template. If the task to be collected is not a periodic task, for non-periodic tasks, since they have been distributed, they will not be distributed again. If the task to be collected is a periodic task, it is further determined whether the recording time of the preset field in the task distribution application message in the historical task information table is within the current cycle. The period situation can be set through the task template. If the recording time of the preset field in the task distribution application message in the historical task information table is within the current cycle, it means that the task to be collected has been distributed in the current cycle and will not be distributed repeatedly. If the recording time of the preset field in the task distribution application message in the historical task information table is not within the current cycle, it means that the current cycle has not been distributed yet, and the corresponding task can be distributed.

[0066] The task dispatching method provided by the present invention improves the reliability of task dispatching and duplication judgment and avoids waste of resources by querying the records in the task information table and performing task dispatching and duplication judgment according to the task type.

[0067] According to a task dispatching method provided by the present invention, the task dispatching application message also includes at least one of an expiration time after the task is dispatched, a number of occurrences of an event that the task needs to achieve, and display content of the task when it is displayed on a page.

[0068] The task dispatch application message also includes at least one of the expiration time after the task is issued, the number of occurrences of the event that the task needs to achieve, and the display content of the task when it is displayed on the page. Among them, the expiration time after the task is issued is used to control the execution time after the task is issued. The number of occurrences of the event that the task needs to achieve is used to further refine the requirements based on the event that the task needs to achieve, set the number of occurrences of the event, and the task can be completed only when the corresponding number of occurrences of the event is met. The display content of the task when it is displayed on the page can be flexibly set, such as including the task name, task description, reward copy, jump link, etc.

[0069] As mentioned above, the task instance information is generated based on the task dispatch application message and the task template. If the task dispatch application message includes the task execution subject ID, the task template ID, the associated conditions, the expiration time after the task is issued, the number of occurrences of the event that the task needs to achieve, and the display content of the task when it is displayed on the page, the task instance information will be generated based on the information contained in the task dispatch application message and the task template.

[0070] The task dispatching method provided by the present invention, by setting the task dispatching application message to also include at least one of the expiration time after the task is issued, the number of occurrences of the event that the task needs to be achieved, and the display content of the task when displayed on the page, can customize and flexibly set the expiration time after the task is issued, the number of occurrences of the event that the task needs to be achieved, and the display content of the task when displayed on the page according to different needs, thereby further improving the flexibility of task dispatching.

[0071] According to a task dispatching method provided by the present invention, the task dispatching application message includes a regular information field and a custom information field.

[0072] The task dispatch application message includes general information fields and optional custom information fields. Among them, the general information fields are the fields that any task dispatch application message should contain, such as the business party ID, task execution subject ID, task template ID, etc. The custom information fields are optional fields that can be set as needed, such as subtask related fields, expiration time after the task is issued, the number of occurrences of the event that the task needs to achieve, and the display content of the task when it is displayed on the page.

[0073] When generating a task instance, general information fields and fields extracted from the task template can be stored in the task details table, and custom information fields can be stored in the custom information table.

[0074] The task dispatching method provided by the present invention further improves the flexibility of task dispatching by setting the task dispatching application message to include a general information field and a custom information field, writing general task information according to the general field and writing individual demand task information according to the custom field.

[0075] According to a task dispatching method provided by the present invention, before acquiring the task template corresponding to the task template ID, the method further comprises: parsing and formatting the task dispatching application message.

[0076] After receiving the task dispatch application message sent by the business party, the task dispatch server may first parse and convert the task dispatch application message, such as converting the task execution subject ID into the same format to facilitate subsequent processing.

[0077] The task dispatching method provided by the present invention facilitates subsequent information processing by parsing and converting the format of the task dispatching application message.

[0078] The process of the task dispatching method provided by the present invention is further explained below through specific examples.

[0079] Figure 2 Schematic diagram of the data structure of the task dispatch application message in the task dispatch method provided by the present invention. Figure 2 The data structure shown is used to define the business party to receive / distribute tasks. Taking the real estate brokerage business as an example, the source of the message can be generated when the broker reaches a certain business condition, completes a specific business action, reaches a certain indicator, or clicks a certain page button.

[0080] The data can specify a common task / main task, as well as the collection / dispatch of multiple subtasks. Figure 2 The fields are explained as follows:

[0081] msgId: unique ID of the business party message.

[0082] source: business party name.

[0083] time: The time when the message was generated.

[0084] Proposer: The subject corresponding to the message, such as the code of the broker / circle manager / store owner, etc.

[0085] endDate: [Custom content] The expiration date after the task is issued.

[0086] jobId: ID of the task template.

[0087] completeEventTimes: [Custom content] Specifies the number of times an event needs to occur to complete the task.

[0088] data: additional information of the business party, where extraId is a reserved attribute, indicating that the subsequent completion event of the business party must meet the value condition corresponding to extraId to be completed (such as the number of the house to be shown).

[0089] showInfo: [Custom content], the content required when the task is displayed on the page, including the task name, description, rights and interests text, and jump link.

[0090] subItems: [Custom content] specifies the information of the subtasks in the task template that needs to be collected; one or more subtasks can be collected at one time, or multiple times through multiple messages. Subtasks collected multiple times will be automatically added to the task group collected for the first time.

[0091] Through the above protocols, the business party can actively control when to receive tasks, how many tasks to receive at a time, when the received tasks end, what content each task displays, and how many specific events each person must complete to complete the task. With the unified page-based task template configuration, the business party can quickly access and achieve refined operations.

[0092] Figure 3Schematic diagram of the task receiving / dispatching model of the task dispatching method provided by the present invention. Figure 3 As shown, the business party can send a task dispatch application message to the message adapter module of the task dispatch server through MQ messages or API interfaces (such as RPC, HTTP). The message adapter module matches the task template according to the task template ID, and finally the task instance module generates the task instance.

[0093] Figure 4 : is a task collection / dispatching timing diagram of the task dispatching method provided by the present invention. Figure 4 As shown, the business access party (business party) defines personalized task content when the task dispatching conditions are met, and pushes the task dispatch application message to the MQ queue for receiving / dispatching task messages. The message adaptation module of the task dispatch server pulls the task dispatch application message from the MQ queue for receiving / dispatching task messages, and performs message parsing and conversion. The data persistence layer module stores the task dispatch application message. The message adaptation module matches the task template, obtains the task template information, generates the task instance information based on the template, and the task instance module generates the task instance through structured storage. The data persistence layer module saves the task instance. The message adaptation module pushes the receipt message generated by the task instance to the dispatch receipt MQ message queue. The business access party pulls the generated receipt message from the dispatch receipt MQ message queue to obtain information about the completion of the task dispatch.

[0094] The business access scenario layer is used to connect to the request processing of different business parties. The request method can be HTTP, MQ, etc. The task collection message will be uniformly processed by the message adapter module for parsing, conversion, task template matching, message persistence, etc. The task instance module is responsible for the specific distribution of tasks: including the distribution process of ordinary tasks / task groups, the deduplication logic of tasks, the implementation of custom information of the business party, and the message receipt content after the distribution is completed.

[0095] Figure 5 is another task dispatching method flow chart provided by the present invention. Figure 5 As shown, the method includes: starting to dispatch a task, determining whether it has been dispatched before (duplicate detection logic); if it has not been dispatched before, determining whether it is a task group dispatch; if it is not a task group dispatch, then it is an ordinary task dispatch, and ordinary task dispatch is performed; if it is a task group dispatch, then the task group dispatch is performed, and the dispatch is completed.

[0096] Figure 6 yes Figure 5 The logic flow chart of duplicate detection in the task dispatching method provided. Figure 6As shown, query the ongoing table according to ucId and jobid to determine whether there is a record. If so, further determine whether the associated condition [extraId] is the same. If so, it means that it already exists and will not be distributed. If there is no record in the ongoing table or there is a record but the associated condition [extraId] is different, query the completion record of the history table according to ucId and jobid to determine whether there is a corresponding record in the history table. If not, the task has not been distributed and can be distributed. If it exists, further determine whether the associated conditions are the same. If not, it means that the task has not been distributed and can be distributed. If the associated conditions are the same, further determine whether it is a one-time task. If so, it means that it has been distributed and completed and will not be distributed. If not, further determine whether it is a periodic task. If not, it will not be distributed. If it is a periodic task, determine whether the completed record is the current period of the task template. If so, the current period has been completed and will not be distributed. If not, it means that there is no record in the current period and it can be distributed again.

[0097] Figure 7 yes Figure 5 The flowchart of common task dispatching in the provided task dispatching method. Figure 7 As shown, for ordinary task dispatch, first generate a task instance object (an object used to describe task instance information), where the task information (field information used to represent the task) is based on the task dispatch application message. If the relevant fields are not assigned in the task dispatch application message, the task template is used. Then insert the task details (the regular fields in the task dispatch application message and the fields in the task template) into the task details table, insert the custom information (the custom fields in the task dispatch application message) into the custom information table, and generate a task instance for the ordinary task.

[0098] Figure 8 yes Figure 5 The flowchart of task group dispatching in the task dispatching method provided. Figure 8 As shown, the task group dispatching starts, extracting the main task and subtask list to be dispatched in the message, and judging whether the subtask belongs to the task group. The task group can be associated and queried through the task template. If the subtask does not belong to the task group, the task group information is printed, and an alarm message of the task group and subtask matching error is sent. If the subtask belongs to the task group, it is judged whether the subtask has been dispatched. Figure 6 In the duplicate checking logic, duplicate checking is performed based on ucId and jobId, that is, the task execution subject ID and the task template ID. Figure 6 The ucId and jobId in the task dispatch application message are the outermost ucId and jobId in the data structure of the task dispatch application message, that is, the ucId and jobId of the common task, or the ucId and jobId of the main task in the task group. Figure 6 The duplicate detection logic shown further determines whether the subtasks in the subtask list have been dispatched. If so, the process ends and no more dispatches are performed. If not, task instance objects (objects used to describe task instance information) are generated for the main task and subtask respectively. The task instance information is based on the task dispatch application message. If the relevant fields are not assigned values ​​in the task dispatch application message (including the task dispatch application message not including relevant fields at all), the task template shall prevail. The task instance information of the main task and subtask are assembled, and then the task details of the main task and subtask are inserted into the task details table (the regular fields in the task dispatch application message and the fields in the task template), and the custom information (the custom fields in the task dispatch application message) are inserted into the custom information table to generate the task instance of the task group.

[0099] The task dispatching method provided by the present invention provides a set of universal, quickly accessible, and highly customizable task dispatching solutions for business systems. It abstracts the task matching and dispatching logic, provides accurate task matching for business parties, prevents duplicate task dispatching, and customizes task content and can automatically retry when task dispatching fails. The present invention separates the matching and dispatching logic of the task system from the business logic of the business system itself, establishes a unified model, reduces system complexity, reduces development costs, and achieves the purpose of rapid access and fine operation of the business system.

[0100] The task dispatching device provided by the present invention is described below. The task dispatching device described below and the task dispatching method described above can be referred to each other.

[0101] Fig. 9 Schematic diagram of the structure of the task dispatching device provided by the present invention. Fig. 9 As shown, the device includes a task dispatch application message receiving module 10 and a task dispatch module 20, wherein: the task dispatch application message receiving module 10 is used to: receive a task dispatch application message sent by a business party, the task dispatch application message includes a task execution subject ID and a task template ID; the task dispatch module 20 is used to: obtain a task template corresponding to the task template ID, generate task instance information according to the task dispatch application message and the task template, perform structured storage of the task instance information in a task information table to generate a task instance, and dispatch tasks according to the task instance.

[0102] The task dispatching device provided by the present invention generates a task instance according to the task dispatching application message and the task template after receiving the task dispatching application message including the task execution subject ID and the task template ID from the business party. It can accurately match the task executor and the task according to the task execution subject ID, and highly customize the task content according to the task template, thereby realizing accurate and flexibly customizable task matching and dispatching; and, the task matching and dispatching logic is separated from the business logic of the business system itself, and a unified model is established to reduce the system complexity, reduce the development cost, and realize the purpose of rapid access and fine operation of the business system.

[0103] According to a task dispatching device provided by the present invention, the task dispatching application message further includes an associated condition, which corresponds to the task template ID and is used to limit the value of an event that needs to be achieved by the task corresponding to the task template ID.

[0104] The task dispatching device provided by the present invention can add the information of the current specific task requirement to the task instance by including the association condition corresponding to the task template ID in the task dispatching application message, thereby improving the flexibility and pertinence of the task dispatching.

[0105] According to a task dispatching device provided by the present invention, when the task dispatching module 20 is used to generate task instance information according to the task dispatching application message and the task template, it is specifically used to: extract the field information in the task dispatching application message and the task template, and generate the task instance information according to the field information; wherein, if the task dispatching application message and the task template assign a value to the same field, the task dispatching application message shall prevail.

[0106] The task dispatching device provided by the present invention generates task instance information by extracting field information, thereby improving the speed of task instance information generation; by giving priority to task dispatching application messages when generating task instance information, it is helpful to meet the different needs of business parties and further improve the flexibility of task dispatching.

[0107] According to a task dispatching device provided by the present invention, the task dispatching module 20 is used to obtain the task template corresponding to the task template ID, and before generating task instance information according to the task dispatching application message and the task template, it is also used to: determine whether the task template ID is unique; if the task template ID is unique, the task dispatching type corresponding to the task dispatching application message is ordinary task dispatching, if the task template ID is not unique, then the task dispatching type is task group dispatching; when the task dispatching type is the ordinary task dispatching, the task template ID is the task template ID of the ordinary task to be dispatched, and the association condition is the ordinary task association condition corresponding to the ordinary task.

[0108] The task dispatching device provided by the present invention obtains the task template corresponding to the task template ID and generates task instance information according to the task dispatching application message and the task template. It first determines whether the task dispatching type is ordinary task dispatching or task group dispatching, thereby providing a prerequisite for flexible generation of task instance information.

[0109] According to a task dispatching device provided by the present invention, if the task dispatching type is the task group dispatching, the task dispatching module 20 is used to obtain the task template corresponding to the task template ID, and generate task instance information according to the task dispatching application message and the task template. It is specifically used to: obtain the main task template ID and the subtask template ID in the task template ID, obtain the main task template according to the main task template ID, and obtain the subtask template according to the subtask template ID; obtain the subtask association condition corresponding to the subtask template ID in the association condition; generate the main task instance information according to the task execution subject ID and the main task template, and generate the subtask instance information according to the task execution subject ID, the subtask template and the subtask association condition; splice the main task instance information and the subtask instance information to obtain the task instance information.

[0110] The task dispatching device provided by the present invention generates main task instance information according to the task execution subject ID and the main task template when the task dispatching type is task group dispatching, generates subtask instance information according to the task execution subject ID, the subtask template and the subtask association conditions, and splices the main task instance information and the subtask instance information to obtain the task instance information, thereby effectively ensuring the dispatching of the task group.

[0111] According to a task dispatching device provided by the present invention, the task dispatching module 20 is used to obtain the task template corresponding to the task template ID and generate task instance information according to the task dispatching application message and the task template. It is also used to: determine whether the task to be collected corresponding to the task dispatching application message has been dispatched; if it has been dispatched, end; if it has not been dispatched, execute the steps of obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatching application message and the task template.

[0112] The task dispatching device provided by the present invention executes duplicate detection logic, and when the task to be collected corresponding to the task dispatching application message has been dispatched, it will not be dispatched repeatedly, thereby improving the reliability of task dispatching.

[0113] According to a task dispatching device provided by the present invention, when the task dispatching module 20 is used to determine whether the task to be collected corresponding to the task dispatching application message has been dispatched, it is specifically used to: query whether the ongoing task information table contains a preset field in the task dispatching application message; if so, it means that the task to be collected has been dispatched; if not, further query whether the historical task information table contains the preset field in the task dispatching application message; if not, further query whether the historical task information table contains the preset field in the task dispatching application message; if not, it means that the task to be collected has not been dispatched; if so, further determine whether the task to be collected is a one-time task; if so, it means that the task to be collected has been dispatched; if not, further determine whether the task to be collected is a periodic task; if not, it means that the task to be collected has been dispatched; if so, further determine whether the recording time of the preset field is within the current period; if so, it means that the task to be collected has been dispatched; if not, it means that the task to be collected has not been dispatched.

[0114] The task dispatching device provided by the present invention improves the reliability of task dispatching and duplication judgment and avoids waste of resources by querying the records in the task information table and performing task dispatching and duplication judgment according to the task type.

[0115] According to a task dispatching device provided by the present invention, the task dispatching application message also includes at least one of an expiration time after the task is dispatched, a number of occurrences of an event that the task needs to achieve, and display content of the task when it is displayed on a page.

[0116] The task dispatching device provided by the present invention, by setting the task dispatching application message to also include at least one of the expiration time after the task is issued, the number of occurrences of the event that the task needs to be achieved, and the display content of the task when displayed on the page, can customize and flexibly set the expiration time after the task is issued, the number of occurrences of the event that the task needs to be achieved, and the display content of the task when displayed on the page according to different needs, thereby further improving the flexibility of task dispatching.

[0117] According to a task dispatching device provided by the present invention, the task dispatching application message includes a regular information field and a custom information field.

[0118] The task dispatching device provided by the present invention further improves the flexibility of task dispatching by setting the task dispatching application message to include a conventional information field and a custom information field.

[0119] According to a task dispatching device provided by the present invention, the task dispatching module 20 is further used to parse and convert the format of the task dispatching application message before obtaining the task template corresponding to the task template ID.

[0120] The task dispatching device provided by the present invention facilitates subsequent information processing by parsing and converting the format of the task dispatching application message.

[0121] Fig.10 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 complete mutual communication through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the task dispatching method, which includes: receiving a task dispatching application message sent by a business party, wherein the task dispatching application message includes a task execution subject ID and a task template ID; obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, performing structured storage of the task instance information in a task information table to generate a task instance, and dispatching a task according to the task instance.

[0122] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0123] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the task dispatching method provided by the above-mentioned methods, and the method includes: receiving a task dispatching application message sent by a business party, and the task dispatching application message includes a task execution subject ID and a task template ID; obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, storing the task instance information in a structured manner in a task information table to generate a task instance, and dispatching tasks according to the task instance.

[0124] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the above-mentioned task dispatching methods, the method comprising: receiving a task dispatching application message sent by a business party, the task dispatching application message comprising a task execution subject ID and a task template ID; obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, storing the task instance information in a structured manner in a task information table to generate a task instance, and dispatching tasks according to the task instance.

[0125] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A task dispatching method, characterized in that: include: Receive a task dispatch application message sent by a business party, wherein the task dispatch application message includes a task execution subject ID and a task template ID; Obtaining a task template corresponding to the task template ID, generating task instance information according to the task dispatching application message and the task template, storing the task instance information in a structured manner in a task information table to generate a task instance, and dispatching tasks according to the task instance; Before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatch application message and the task template, the method further includes: Determine whether the task template ID is unique; If the task template ID is unique, the task dispatch type corresponding to the task dispatch application message is ordinary task dispatch; if the task template ID is not unique, the task dispatch type is task group dispatch, and the task group includes a main task and at least one subtask.

2. The task dispatching method according to claim 1, characterized in that: The task dispatch application message further includes an associated condition, which corresponds to the task template ID and is used to limit the value of an event that needs to be achieved by the task corresponding to the task template ID.

3. The task dispatching method according to claim 1, characterized in that: The generating of the task instance information according to the task dispatch application message and the task template specifically includes: extracting field information in the task dispatch application message and the task template, and generating the task instance information according to the field information; If the task dispatch application message and the task template assign a value to the same field, the task dispatch application message shall prevail.

4. The task dispatching method according to claim 2, characterized in that: When the task dispatching type is the common task dispatching, the task template ID is the task template ID of the common task to be dispatched, and the association condition is the common task association condition corresponding to the common task.

5. The task dispatching method according to claim 4, characterized in that: If the task dispatch type is the task group dispatch, then the task template corresponding to the task template ID is obtained, and task instance information is generated according to the task dispatch application message and the task template, specifically including: Obtain a main task template ID and a subtask template ID from the task template ID, obtain a main task template according to the main task template ID, and obtain a subtask template according to the subtask template ID; Obtain the subtask association condition corresponding to the subtask template ID in the association condition; Generate main task instance information according to the task execution subject ID and the main task template, and generate subtask instance information according to the task execution subject ID, the subtask template and the subtask association condition; The main task instance information and the subtask instance information are concatenated to obtain the task instance information.

6. The task dispatching method according to claim 1, characterized in that: Before obtaining the task template corresponding to the task template ID and generating task instance information according to the task dispatch application message and the task template, the method further includes: Determine whether the task that needs to be collected corresponding to the task dispatch application message has been dispatched; if it has been dispatched, end; if it has not been dispatched, execute the step of obtaining the task template corresponding to the task template ID, and generating task instance information according to the task dispatch application message and the task template.

7. The task dispatching method according to claim 6, characterized in that: The determining whether the task to be collected corresponding to the task dispatch application message has been dispatched specifically includes: Query whether the task information table in progress contains the preset fields in the task dispatch application message. If so, it means that the task to be collected has been dispatched. If not, further query whether the historical task information table contains the preset fields in the task dispatch application message. If it does not exist, it means that the task to be collected has not been distributed. If it does exist, it is further determined whether the task to be collected is a one-time task; If yes, it means that the task to be collected has been distributed. If no, it is further determined whether the task to be collected is a periodic task. If not, it means that the task to be collected has been distributed. If so, it is further determined whether the recording time of the preset field is within the current period; If so, it means that the task to be collected has been distributed, if not, it means that the task to be collected has not been distributed.

8. The task dispatching method according to claim 1, characterized in that: The task dispatch application message also includes at least one of an expiration time after the task is dispatched, the number of occurrences of an event that the task needs to achieve, and display content of the task when it is displayed on a page.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the task dispatching method according to any one of claims 1 to 8 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the task dispatching method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Task information processing method, device and system

    CN111507674A