CN112817707A - Task execution method and device, computer equipment and storage medium - Google Patents

Task execution method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112817707A
CN112817707A CN202011629667.XA CN202011629667A CN112817707A CN 112817707 A CN112817707 A CN 112817707A CN 202011629667 A CN202011629667 A CN 202011629667A CN 112817707 A CN112817707 A CN 112817707A
Authority
CN
China
Prior art keywords
task
cooperation
target
information
cooperative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011629667.XA
Other languages
Chinese (zh)
Other versions
CN112817707B (en
Inventor
乔振兴
李海轮
苏汉钊
赵康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202011629667.XA priority Critical patent/CN112817707B/en
Publication of CN112817707A publication Critical patent/CN112817707A/en
Application granted granted Critical
Publication of CN112817707B publication Critical patent/CN112817707B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a task execution method, a task execution device, a computer device and a storage medium. The method comprises the following steps: when a task cooperation event is obtained, determining a task identifier corresponding to the task cooperation event; determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; sending cooperative task trigger information to a target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to a task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data; and acquiring a task information recording table for recording task information of the task cooperation event, and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task. According to the scheme, the task cooperation terminal can read corresponding data from the pre-subscribed data reading interface in time and execute the cooperation task, and the real-time performance of the cooperation task can be guaranteed.

Description

Task execution method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of information sharing technologies, and in particular, to a method and an apparatus for task execution, a computer device, and a storage medium.
Background
With the development of information sharing technology, there has appeared a technology for sharing data between computer devices to perform a specific task by cooperation of the computer devices. In performing the collaborative task, the computer device needs to acquire data generated by other computer devices.
In the conventional technology, a certain computer device periodically acquires data generated by other computer devices from a data table. However, the data method of this method is low in real-time performance, which results in inefficient cooperative execution of tasks.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
In view of the above, it is necessary to provide a task execution method, apparatus, computer device and storage medium for solving the above technical problems.
A method of task execution, the method comprising: when a task cooperation event is obtained, determining a task identifier corresponding to the task cooperation event; determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface; sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data; and acquiring a task information recording table for recording task information of the task cooperation event, and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
In an embodiment, the sending of the cooperative task trigger information to the target task cooperative terminal includes: and sending cooperative task trigger information carrying the task identifier to the target task cooperative terminal through a message queue so that the target task cooperative terminal generates a target cooperative task corresponding to the task identifier, reads the target data from the target data reading interface and executes the target cooperative task according to the target data.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: receiving a data template acquisition request sent by the target task cooperative terminal; and responding to the data template acquisition request, returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal splices the target data template and the target data and executes a corresponding cooperation task according to the spliced data.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: receiving triggering information receiving feedback returned by the target task cooperative terminal; and responding to the trigger information receiving feedback, and updating the information sending state item in the task information recording table.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: when the information sending state item is determined not to be updated in a preset time period, judging that data sending abnormity occurs; and triggering a compensation mechanism for abnormal data transmission so as to acquire backup cooperation task trigger information which is backed up in advance from a backup database and transmit the backup cooperation task trigger information to the target task cooperation terminal.
In an embodiment, before determining the target task cooperative terminal according to the interface subscription information corresponding to the task identifier, the method further includes: when receiving task issuing triggering information sent by a task generating terminal, responding to the task issuing triggering information, and acquiring a data reading interface opened by the task generating terminal; each data reading interface corresponds to a different data reading range; subscribing and publishing information according to the data reading interface publishing interface; receiving an interface subscription request sent by the task cooperation terminal responding to the interface subscription and release information; the interface subscription request is a subscription request for at least one of the data reading interfaces; and generating interface subscription information according to the interface subscription request.
In an embodiment, after determining a task identifier corresponding to a task collaboration event when the task collaboration event is obtained, the method further includes: acquiring task description information corresponding to the task cooperation event as the cooperation task trigger information; writing the collaboration task trigger information into an event description item of the task information recording table; the updating the task information record table according to the execution state of the target task cooperative terminal on the cooperative task comprises the following steps: and updating the task execution state item in the task information record table according to the execution state of the target task cooperative terminal on the cooperative task.
A task execution device, the device comprising: the task identification determining module is used for determining a task identification corresponding to a task cooperation event when the task cooperation event is obtained; the cooperative terminal determining module is used for determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface; the cooperative task execution module is used for sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data; and the state updating module is used for acquiring a task information recording table for recording task information of the task cooperation event and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: when a task cooperation event is obtained, determining a task identifier corresponding to the task cooperation event; determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface; sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data; and acquiring a task information recording table for recording task information of the task cooperation event, and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of: when a task cooperation event is obtained, determining a task identifier corresponding to the task cooperation event; determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface; sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data; and acquiring a task information recording table for recording task information of the task cooperation event, and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
According to the task execution method, the task execution device, the computer equipment and the storage medium, when the task cooperation event is obtained, the target task cooperation terminal is determined, the cooperation task trigger information is sent to the target task cooperation terminal, so that the target task cooperation terminal reads corresponding target data from a pre-subscribed target data reading interface and executes the corresponding cooperation task, and the task information recording list is updated according to the execution state of the cooperation task by the target task cooperation terminal. The task cooperation terminal can be triggered in real time when the task cooperation event is generated, the task cooperation terminal can read corresponding data from the pre-subscribed data reading interface in real time and execute the cooperation task, the real-time performance of the execution of the cooperation task can be guaranteed, the task cooperation terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all data, and the safety of the data can be effectively guaranteed.
Drawings
FIG. 1 is a diagram of an application environment of a task execution method in one embodiment;
FIG. 2 is a flowchart illustrating a task execution method according to an embodiment;
FIG. 3 is a diagram illustrating an exemplary interface display for a task information record table according to an embodiment;
FIG. 4 is a flowchart illustrating a task execution method according to another embodiment;
FIG. 5 is a diagram of an information distribution table in one embodiment;
FIG. 6 is a diagram of an interface subscription table in one embodiment;
FIG. 7 is a flowchart showing a task execution method according to still another embodiment;
FIG. 8 is a flowchart illustrating a task execution method according to another embodiment;
FIG. 9 is a diagram of an application scenario of a task execution method in one embodiment;
FIG. 10 is a diagram showing an application scenario of a task execution method according to another embodiment;
FIG. 11 is a block diagram showing the construction of a task execution device according to one embodiment;
FIG. 12 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The task execution method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a task generating terminal 101 (which may also be referred to as a task generator), a server 102, and a task cooperating terminal 102 (which may also be referred to as a task cooperator, and only one task cooperating terminal is shown in fig. 1, and in an actual application scenario, there may be more than one task cooperating terminal). The server 102 communicates with the task generation terminal 101 and the task cooperation terminal 102 via a network. The server sends the cooperative task triggering information to the task cooperative terminal when the task generating terminal generates a task cooperative event, and the task cooperative terminal reads data from the pre-subscribed data reading interface and executes the corresponding cooperative task under the triggering of the cooperative task triggering information. The task generation terminal 101 and the task cooperation terminal 102 may be implemented by terminal devices, and the terminal devices may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices; the server 102 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers. In some scenarios, the functions of the task generation terminal 101, the server 102 and the task cooperation terminal 102 may be recombined, for example, the function of the server may be implemented by one of the task generation terminal or the task cooperation terminal, that is, there may be no independent server; three functional modules may be configured in the server to realize the functions of the above three task generation terminals 101, the server 102, and the task cooperation terminal 102. In other application scenarios, the server may be replaced by a terminal device, and the task generation terminal or the task cooperation terminal may be replaced by a server.
In one embodiment, as shown in fig. 2, a task execution method is provided, and this embodiment is illustrated by applying the method to a server (the server may also be referred to as a central control platform, or simply referred to as a middlebox), and includes the following steps:
s201, when a task cooperation event is acquired, determining a task identifier corresponding to the task cooperation event.
The task refers to a task that can be executed by a computer device (including a terminal and a server) and can implement a specific function, and the task may also be referred to as a service in a specific service scenario. In one embodiment, a task may refer to data reading, numerical computation, information output, and the like. In a specific application scenario, the task may be calculating payroll, transferring money to a bank card, creating a wallet account, querying social security information, and the like.
Task collaboration events refer to events that require collaboration by other computer devices, such as: and generating an entry event of the enrollment information, wherein the event requires the task cooperation terminal to cooperate to complete the creation task of the wallet account so as to perform the transfer operation on the wallet account subsequently.
The task identification can be used for identifying the event. In one embodiment, in the task cooperation process, the data transmission among the task generation terminal, the server and the task cooperation terminal can carry the task identifier, so that the main body receiving the corresponding information can identify the corresponding task according to the task identifier and pertinently complete the task cooperation process. In some embodiments, the task identifier may also be replaced with an event identifier, that is, an event identifier corresponding to the task collaboration event is generated when the task collaboration event is acquired.
In an embodiment, before determining the task identifier corresponding to the task collaboration event when the task collaboration event is obtained, the method further includes: receiving a task registration request; and determining a task identifier corresponding to the task registration request, and recording the task identifier. Each task may correspond to at least one task collaboration event, such as: the task is to calculate payroll, and the task can correspond to N task collaboration events which are used for calculating the payroll of N (N is a natural number) objects. Specifically, the server receives a task registration request of a task of calculating salary sent by the task generation terminal, generates a task identifier corresponding to the task registration request, and records the CW if the task identifier is the CW. When a task cooperation event of calculating the salary of Zhang III is obtained, the corresponding task identifier is determined to be CW, a target task cooperation terminal for executing the salary calculation task is determined, and the target task cooperation terminal is triggered to read the bank card information according to the task identifier CW and execute the corresponding salary calculation task.
In one embodiment, the implementation process of determining the task identifier corresponding to the task collaboration event may be: determining a target task corresponding to a task cooperation event, acquiring a task identifier corresponding to the target task, and determining the task identifier as the task identifier corresponding to the task cooperation event.
In one embodiment, the implementation process of S201 may be: the server receives event generation information sent by the task generation terminal when the task cooperation event is generated, and determines a task identifier corresponding to the task cooperation event under the trigger of the event generation information.
S202, determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing the subscription information of the task cooperative terminal to the data reading interface.
The server can provide at least one data reading interface to provide the task cooperation terminal with the relevant data of the task cooperation event. The data reading Interface may also be referred to as an API (Application Programming Interface) for short. The data range of the data provided by different data reading interfaces may be different, for example: the bank card number provided by one data reading interface and the identity card number provided by the other data reading interface.
The task cooperation terminal is a terminal for the cooperation task generation terminal to execute the corresponding task. Different task cooperation terminals can be terminals in different business fields, taking a task generation terminal as a personnel field as an example, and the task cooperation terminals can be terminals in the fields of salary, attendance, performance, social security, finance, administration and the like.
The task cooperation terminal can subscribe the data reading interface as required to read the data of the corresponding data range from the corresponding data reading interface. In one embodiment, the task cooperative terminal may determine a target data range of data to be read according to a task to be executed by the task cooperative terminal, and further subscribe a data reading interface corresponding to the target data range, for example: the task cooperation terminal used in the financial field subscribes a data reading interface for providing a bank card number, the task cooperation terminal used in the attendance field subscribes a data reading interface for providing attendance time, and at the moment, the task cooperation terminal used in the attendance field cannot read the bank card number, so that the data security can be effectively ensured.
In one embodiment, the data reading interface is a reading interface of a data storage space such as a database, a data record table and the like. And the task cooperation terminal determines a target data reading interface in the data reading interfaces provided by the data storage space, and reads data from a database or a data record table through the target data reading interface to obtain target data.
In an embodiment, after the task cooperative terminal completes the subscription of the data reading interface, the server may generate interface subscription information according to the data reading interface subscribed by the task cooperative terminal and perform associated storage on the interface subscription information and the task identifier of the corresponding task.
Further, a subscription center is configured in the server. The subscription center can be a functional module in the server, or can be a computer device independent of the server. The subscription center is used for receiving subscription information sent by the business cooperation terminal and subscribing the data reading interface of the business cooperation terminal. The task cooperation terminal can subscribe the data reading interface by calling the subscription center, and can also send an interface subscription request to the server to subscribe the data reading interface. And the server triggers the subscription center to write the corresponding interface subscription information according to the subscription information of the data reading interface.
Further, the implementation process of S202 may be: after the task identification is determined, the server acquires corresponding interface subscription information according to the task identification, and determines a target task cooperative terminal subscribed to the corresponding task according to the acquired interface subscription information.
In one embodiment, the interface subscription information may not be subscribed to information other than the subscribed information characterizing the data reading interface of the task cooperative terminal, for example: and the task cooperative terminal with the corresponding authority does not subscribe the corresponding data reading interface. Therefore, when the server acquires the task cooperation event, the server acquires the interface subscription information corresponding to the task identifier, determines the subscribed task cooperation terminal which has subscribed the data reading interface and the unsubscribed task cooperation terminal which has not subscribed the data reading interface according to the interface subscription information, and sends the cooperation task trigger information to the subscribed task cooperation terminal or the unsubscribed task cooperation terminal. After the cooperative task trigger information is sent to the unsubscribed task cooperative terminal, the server can receive an interface subscription request sent by the unsubscribed task cooperative terminal, and accordingly updates the corresponding interface subscription information, and then the unsubscribed task cooperative terminal can call the target data reading interface and obtain the corresponding data.
S203, sending cooperative task trigger information to the target task cooperative terminal, so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data.
In S203, the server triggers the target task cooperative terminal to execute the corresponding cooperative task by sending the cooperative task trigger information to the target task cooperative terminal. And when the corresponding cooperation task is executed, the target task cooperation terminal reads the target data corresponding to the task cooperation event from the pre-subscribed target data reading interface and executes the corresponding cooperation task according to the target data. That is, the target task cooperation terminal reads the target data in the corresponding data range from the target data reading interface to execute the corresponding cooperation task. By limiting the data acquisition range of the task cooperation terminals, the data acquisition of each task cooperation terminal can be more targeted, the leakage of sensitive information caused by all the task cooperation terminals acquiring all the data is prevented, and the safety of the data can be effectively ensured.
In one embodiment, one task collaboration terminal may subscribe to at least one data reading interface to read data of different data ranges from different data reading interfaces. When executing the cooperative task, the target task cooperative terminal may read the target data from the at least one subscribed target data reading interface, and execute the corresponding cooperative task based on the target data.
In an embodiment, the server may send collaboration task trigger information to all task collaboration terminals having a network connection relationship, and the task collaboration terminals determine whether to perform task execution according to task identifiers carried in the collaboration task trigger information, and read target data corresponding to a task collaboration event from a pre-subscribed target data reading interface when the task execution is required, and execute a corresponding collaboration task according to the target data.
In one embodiment, the target task collaboration terminal may be at least one. When more than one target task cooperative terminal is provided, the server can send cooperative task trigger information to the target task cooperative terminals in a synchronous or asynchronous mode.
S204, a task information recording table used for recording task information of a task cooperation event is obtained, and the task information recording table is updated according to the execution state of the cooperation task by the target task cooperation terminal.
The task information of the task cooperation event refers to various information related to the task cooperation event, and may include cooperation task trigger information, a generation state of the cooperation task, an execution state of the cooperation task, a reception state of the cooperation task trigger information, and the like. After the task information of the task cooperation event is recorded into the task information recording table, the task information recording table can play a role of a message view, the server can acquire the related information of the task cooperation event through the task information recording table, and the purpose of completely tracing the task cooperation process can be achieved even if the number of the task cooperation terminals is large, so that the server can completely and reliably know the execution state of the task cooperation of all the task cooperation terminals.
In one embodiment, the implementation process of S204 may be: and the server acquires the task information recording list, and updates the task information recording list according to the execution state when receiving the execution state of the cooperation task sent by the target task cooperation terminal. Further, the task execution state item for recording the execution state in the task information recording table may be updated while the other information items may remain unchanged.
In the task execution method, the task cooperation terminal can read corresponding data from the pre-subscribed data reading interface and execute the cooperation task in time, so that not only can the real-time performance of the execution of the cooperation task be ensured, but also the task cooperation terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all data, and the safety of the data can be effectively ensured.
In an embodiment, the sending of the cooperative task trigger information to the target task cooperative terminal includes: and sending cooperative task trigger information carrying the task identifier to the target task cooperative terminal through a message queue so that the target task cooperative terminal generates a target cooperative task corresponding to the task identifier, reads the target data from the target data reading interface and executes the target cooperative task according to the target data.
Wherein, the message queue may refer to MQ (message queue). The message to be transmitted is placed in a queue, message transmission is realized by using a queue mechanism, and then the message is processed by a consumer (in the embodiment of the invention, the consumer refers to a task collaboration terminal), and the consumer can pull the message to the specified queue. The embodiment of the invention pushes the cooperation task trigger information to the task cooperation terminal in an MQ mode, and can utilize the advantages of the MQ to push the information to the target task cooperation terminal timely and accurately.
When receiving the cooperative task trigger information, the target task cooperative terminal identifies the task type to which the task cooperative event belongs according to the task identifier, and automatically generates a corresponding target cooperative task, for example: the task cooperation events are as follows: and if the third job is entered and the request is the third payroll, the target task cooperation terminal can generate a target cooperation task which is the third payroll. And corresponding information is needed to execute the target cooperation task, and the payroll is continuously issued by Zhang III as an example, the bank card number of Zhang III needs to be acquired, and the bank card number of Zhang III is stored in the data storage space, so that the target task cooperation terminal needs to read the bank card number of Zhang III from the data storage space through the target data reading interface and transfer corresponding payroll to the bank card number.
In one embodiment, as shown in FIG. 3, the task occurrence terminal provides three APIs, API-1, API-2, and API-3. And when a task cooperation event occurs, the server sends the cooperation task trigger information to the target task cooperation terminal through the MQ. And the target task cooperation terminal generates a target cooperation task according to the target task. For a certain task cooperation event, the target task cooperation terminal 1 generates a cooperation task 1, acquires corresponding target data through a pre-subscribed API-1 and executes the cooperation task 1; for another task cooperation event, the target task cooperation terminal 2 generates a cooperation task 2, acquires corresponding target data through the pre-subscribed API-3 and executes the cooperation task 2.
In the embodiment, the target task cooperation terminal is triggered to generate the cooperation task while the task cooperation event is generated in a message queue mode, and the target data is read from the target data reading interface and the corresponding cooperation task is executed. The method has the following beneficial effects: 1) the service generation terminal issues APIs with different data ranges, and the service cooperation terminal subscribes as required, so that the data range in which the service cooperation terminal can acquire service data is narrowed, excessive disclosure of information can be effectively prevented, and the safety of the data is guaranteed. 2) By using the advantages of the MQ, the service cooperation terminal can be guaranteed to accurately and timely receive the task data, the MQ is only focused on message transmission and does not carry data, and the pressure of the MQ in transmitting large data volume is relieved. 3) And a complete business cooperation summary view is ensured through the task information record table, and clear tracing and abnormal monitoring can be performed on the business cooperation process. 4) The target task cooperation terminal does not need to acquire data in a timing mode any more, but can acquire target data and execute the cooperation task in time under the triggering of the cooperation task triggering information, so that the cooperation efficiency of the task can be greatly improved, and resources are saved.
In order to reduce the pressure of data transmission, the base data and the change data may be stored separately, for example: the basic data is transmitted to the server in advance by the task generating terminal and stored in a storage space corresponding to the server, and the task generating terminal stores the changed data in the storage space corresponding to the task generating terminal after the changed data is generated. The basic data may refer to data commonly used for executing the collaboration task, may be a data template for filling in the change data, and may also be read indication data to indicate what data the task collaboration terminal needs to read from the data reading interface. The underlying data may be stored in a subscription center, in which case the underlying data may be referred to as subscription information. In some embodiments, the basic data may also be sent to the task cooperation terminal in advance and stored in a memory space of the task cooperation terminal. When the target task cooperative terminal needs to execute the cooperative task, the basic data is directly read from the memory, so that the data reading efficiency can be effectively saved.
The target data acquired by the target task cooperation terminal from the target data reading interface may be changed data. In order to execute the cooperative task, corresponding basic data also needs to be acquired, the change data and the basic data are combined to obtain complete task data capable of executing the cooperative task, and then the corresponding cooperative task is executed.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: receiving a data template acquisition request sent by the target task cooperative terminal; and responding to the data template acquisition request, returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal splices the target data template and the target data and executes a corresponding cooperation task according to the spliced data.
The data template refers to a template for filling in target data. After the target data template and the target data are spliced, the target task cooperation terminal can obtain complete task data accordingly. The following example of the concatenation of the target data template and the target data is as follows: assume the target data template is: AA late to CC hours in BB, the target data read are: zhang III, 20 days 10 and 2020, 1, the task data obtained after integration is: zusanli is delayed to 1 hour from 10/20/2020, and corresponding attendance wages are deducted based on the task data and the cooperative task of wage calculation is completed.
In one embodiment, the data templates may be stored in a subscription center. The server may obtain the corresponding target data template from the subscription center when receiving a data template obtaining request sent by the target task collaboration terminal.
In the embodiment, the task cooperation terminal acquires data from different data sources, completes the cooperation task based on the task data obtained by splicing, and does not need to read the data from the data reading interface every time the cooperation task is executed, so that the reading time of the task data can be effectively reduced, the pressure of data transmission can be reduced under the aim of ensuring the effective completion of the cooperation task, and the efficiency of executing the cooperation task can be improved.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: receiving triggering information receiving feedback returned by the target task cooperative terminal; and responding to the trigger information receiving feedback, and updating the information sending state item in the task information recording table.
And the target task cooperative terminal returns a trigger information receiving feedback to the server when receiving the cooperative task trigger information so as to prompt the server that the target task cooperative terminal has received the cooperative task trigger information. At this time, the server may update the information transmission status item in the task information record table. And the information sending state item in the task information recording table is used for recording the sending and receiving states of the cooperative task trigger information.
In one embodiment, the server may fill in the information transmission status item as transmitted after transmitting the collaboration task trigger information to the target task collaboration terminal. And when receiving the trigger information receiving feedback, updating the information sending state item to be received. By the method, the server can timely monitor the sending and receiving information of the cooperative task trigger information and timely process the information when abnormity occurs.
In one embodiment, when there are more than one target task cooperation terminals, the server may configure different information sending status items for each target task cooperation terminal in the task information recording table. When receiving the trigger information receiving feedback of a certain target task cooperation terminal, updating the information sending state item corresponding to the target task cooperation terminal, and keeping the information sending state items of other target task cooperation terminals unchanged.
In the above embodiment, the task information of the latest task collaboration event can be recorded in the task information record table by updating the specific record item in the task information record table, and accordingly, the server can monitor the processing state of the task collaboration event in time and respond in time when an exception occurs, so as to ensure the orderly execution of the collaboration task.
In one embodiment, the task information record table may further include an event description item and a task execution status item in addition to the information transmission status item. The server can update the event description item and the task execution state item according to the execution state of the task cooperation event. The event description item is used to record description information of the task collaboration event, may refer to information describing the task collaboration event, and may include: whether an event occurs, the time when the event occurs, the task type corresponding to the event, the task occurrence terminal where the event occurs, a description text describing the event, and the like. The task execution state item is used for recording the execution state of the collaborative task, such as: whether a collaborative task is generated, whether a collaborative task is executed, the result of the execution of the collaborative task, and the like.
In an embodiment, after determining a task identifier corresponding to a task collaboration event when the task collaboration event is obtained, the method further includes: acquiring task description information corresponding to the task cooperation event; and writing the task description information into an event description item of the task information recording table.
In the above embodiment, the task information record table can update the processing state of the task event in time by updating the event description item in the task information record table, so that it is possible to completely trace the multi-service collaboration message chain.
In one embodiment, the collaboration task trigger information may also refer to the task description information described above. And the target task cooperation terminal determines a task identifier when receiving the task description information, generates a target cooperation task according to the task identifier and executes the target cooperation task.
In an embodiment, the updating the task information record table according to the execution state of the target task cooperative terminal on the cooperative task includes: and updating the task execution state item in the task information record table according to the execution state of the target task cooperative terminal on the cooperative task.
In the above embodiment, by updating the task execution state item in the task information recording table, the task information recording table can update the execution state of the cooperative task in time, so that it is possible to completely trace the multi-service cooperative message chain.
In one embodiment, the server may generate and update the task information record table according to the task information of the task cooperation event. And the terminal can be controlled to display each state of the task information recording list on the interface so as to achieve the purpose of visually displaying the task information. In one embodiment, the process of updating the status of the task information record table may be as shown in fig. 4. The record items contained in the task information record table are a task generating terminal item, an event description item, a task cooperation terminal item, an information sending state item and a task execution state item.
And when the task cooperation event is acquired, the server generates a new task information record table, or adds a new record item in the existing task information record table. Taking the newly generated task information record table as an example, the generated new task information record table is as shown in 401 in fig. 4, and the server fills information related to the task collaboration event into the task occurrence terminal item and the event description item, where the field in which the task occurrence terminal written in the task occurrence terminal item is located is, for example: and the human resource field indicates that the task cooperation terminal generating the task cooperation event is a terminal used in the human resource field. In some embodiments, the task occurrence terminal item may also write a terminal identification of the task occurrence terminal. After determining the target task cooperative terminal, the server may fill the field in which the target task cooperative terminal is located into the task cooperative terminal item. After sending the collaboration task trigger information to the target task collaboration terminal, the server may fill information into the information sending status item, for example: information sent or information to be received. When receiving the trigger information receiving feedback sent by the target task cooperation terminal, the server may update the information sending status item to the received information, and at the same time, fill the task execution status item as an incomplete cooperation, as shown in 402 in fig. 4. When receiving the execution state of the cooperation task sent by the target task cooperation terminal, the server updates the task execution state item to be the completed cooperation, and the state that all target task cooperation terminals execute the cooperation task is shown as 403 in fig. 4.
In one embodiment, the server may configure a message center. The message center can be a functional module in the server or a computer device independent of the server. The message center processes the task information record table to realize the generation of the task information record table and the updating of the information. The message center can display the list view through the task message record table so as to completely trace the process of business cooperation and perform exception monitoring on the whole task cooperation process.
In one embodiment, a task generation status item may also be included in the task information record table. After the server sends the cooperative task triggering information to the target task cooperative terminal, the triggering message center fills the task to be generated in the task generation state item. And after receiving the task generation state sent by the target task cooperation terminal, the trigger message center updates the task generation state item to be 'a generated task'.
In the above embodiment, the recording of the task cooperation process is realized through the task information recording table, and the message chain of the multi-task cooperation can be completely traced. In addition, the multi-task cooperation process of each task cooperation terminal can be more intuitively presented through the display of the terminal interface on the task information recording table.
In an embodiment, after sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: when the information sending state item is determined not to be updated in a preset time period, judging that data sending abnormity occurs; and triggering a compensation mechanism for abnormal data transmission so as to acquire backup cooperation task trigger information which is backed up in advance from a backup database and transmit the backup cooperation task trigger information to the target task cooperation terminal.
The preset time period may be determined according to actual conditions, for example: 100ms, 500ms, etc.
When the task generating terminal generates a task cooperation event, the server may store the corresponding cooperation task trigger information in the backup database. The backup database can be a database configured by a server or a database configured by a task generation terminal.
And the target task cooperation terminal can generate and execute the target cooperation task when receiving the backup cooperation task trigger information.
The reason why the information sending state item is not updated within the preset time period may be that the target task cooperation terminal does not receive the cooperation task trigger information, and this may not trigger the target task cooperation terminal to execute the cooperation task. Therefore, the target task cooperative terminal needs to be triggered again to execute the cooperative task. In the embodiment, when the data transmission is judged to be abnormal, the compensation mechanism is triggered to re-send the cooperative task triggering information to the target task cooperative terminal and re-trigger the target task cooperative terminal to execute the cooperative task, so that the normal operation of the cooperative task can be effectively ensured, and the execution success rate of the cooperative task is improved.
In another embodiment, after the sending the cooperative task trigger information to the target task cooperative terminal, the method further includes: when the information sending state item is determined not to be updated in a preset time period, judging that data sending abnormity occurs; and triggering a compensation mechanism for the abnormal data transmission to acquire backup data of the task cooperation event backed up in advance from a backup database and transmit the backup data to the target task cooperation terminal.
When the task generating terminal generates the task cooperation event, the corresponding data can be stored in the backup database.
The reason why the information sending status item is not updated within the preset time period may be that the target task cooperative terminal cannot read the target data from the target data reading interface although receiving the cooperative task trigger information, and in this case, the target task cooperative terminal cannot execute the cooperative task. Therefore, the corresponding task data needs to be sent to the target task collaboration terminal. In the embodiment, when data transmission is abnormal, the backup data corresponding to the task cooperation event is directly transmitted to the target task cooperation terminal, so that the target task cooperation terminal executes the corresponding cooperation task in time without the target task cooperation terminal going to the data reading interface to read the data, the data acquisition efficiency can be effectively improved, and the execution efficiency of the cooperation task is further improved.
In an embodiment, before determining the target task cooperative terminal according to the interface subscription information corresponding to the task identifier, the method further includes: when receiving task issuing triggering information sent by a task generating terminal, responding to the task issuing triggering information, and acquiring a data reading interface opened by the task generating terminal; each data reading interface corresponds to a different data reading range; subscribing and publishing information according to the data reading interface publishing interface; receiving an interface subscription request sent by the task cooperation terminal responding to the interface subscription and release information; the interface subscription request is a subscription request for at least one of the data reading interfaces; and generating interface subscription information according to the interface subscription request.
The task release triggering information may refer to information for triggering task release. After receiving the task publishing trigger information, the server may subscribe the publishing information to the external publishing interface to indicate that the task cooperation terminal may subscribe the data reading interface as needed. In one embodiment, the server may publish the interface subscription publishing information of each data reading interface to the outside according to the data reading interfaces, so that the task collaboration terminals receiving the interface subscription publishing information can subscribe the data reading interfaces in a targeted manner. The interface subscription and publication information may also be referred to as task collaboration messages.
In one embodiment, a publication center may be configured in the server. The publishing center can be a functional module in the server or a computer device independent of the server. The issuing center is used for assisting the task generating terminal to issue the task cooperation message. After the task cooperation message is published, the API can be selectively subscribed by a task cooperation terminal in the task cooperation field. And when the task cooperation message is released, the release center can release the API which can be used by the task cooperation terminal.
The publishing center and the subscribing center can communicate with each other. The task generating terminal can send task issuing triggering information to the issuing center, the issuing center obtains the data reading interface opened by the task generating terminal, and the issuing center subscribes issuing information according to the data reading interface opened. Then, the task collaboration terminal may send an interface subscription request to the subscription center as needed to request subscription of the at least one data reading interface. And the subscription center generates and records interface subscription information according to the received interface subscription request.
In one embodiment, the publishing center may record interface subscription publishing information via an information publishing table. Fig. 5 shows an example of an information distribution table including a task occurrence terminal item, a distribution description item, an API item, and a distribution status item. And when the task cooperation event is acquired, the server generates a new information release table or adds a new record item in the existing information release table. When acquiring the task release trigger information, the server determines the corresponding task generation terminal, the task type and the opened API, and accordingly fills the information into the task generation terminal item, the release description item and the API item. After the publishing interface subscribes to the publishing information, the server may update the publishing status items according to the publishing status of the various APIs. The updated information distribution table is shown in fig. 5.
In one embodiment, the subscription center may record interface subscription information through an interface subscription table. One example of an interface subscription table is shown in fig. 6, which includes a subscription description item, a task collaboration terminal item, an API item, and a subscription status item. And when the task cooperation event is acquired, the server generates a new interface subscription table, or adds a new record item in the existing interface subscription table. After receiving the subscription request sent by the task cooperation terminal, the server may update the task cooperation terminal item, the API item, and the subscription status item according to the API subscribed by the task cooperation terminal. The updated interface subscription table is shown in fig. 6. As shown in FIG. 6, task collaboration terminals in the compensation domain subscribe to both API-1 and API-2.
In an embodiment, when the publishing interface subscribes to publish information, the server may publish the data reading interfaces to which each task cooperation terminal has authority to subscribe, so as to trigger the task cooperation terminal to subscribe to at least one data reading interface from the data reading interfaces to which the task cooperation terminal has authority to subscribe, so as to subsequently execute a cooperation task.
In the embodiment, through the cooperation of the publish message and the subscribe message, the server can publish the interface subscription publish information related to the specific task to the task cooperation terminal, and trigger the task cooperation terminal to subscribe the data reading interface, so that the task cooperation terminal can only read data from the subscribed data reading interface when executing the cooperation task, and the data security is effectively ensured.
In one embodiment, a task execution method is provided, as shown in fig. 7, and the implementation process is specifically as follows: assume that the server is connected with two sub-domain cooperative terminals 1 and 2 (the sub-domain cooperative terminals are the task cooperative terminals in the foregoing embodiment). When a new task occurs, the service issues interface subscription issuing information to the task cooperative terminal with the corresponding authority through the issuing center, receives an interface subscription request sent by the corresponding task cooperative terminal through the subscription center, and writes the corresponding interface subscription information into the subscription center according to the interface subscription request. When a task cooperation event is obtained, the server sends event description information to the message center, triggers the message center to generate a task information record table, and determines a target sub-field cooperation terminal for cooperation. Assuming that the sub-domain cooperative terminal 1 is a target sub-domain cooperative terminal, the server triggers the message center to write the related information of the sub-domain cooperative terminal 1 into the task information recording table. In addition, the server triggers the message center to update the task information recording table according to the sending and receiving states of the cooperative task triggering information. After receiving the collaboration task trigger information, the sub-domain collaboration terminal 1 generates a sub-domain task 1, acquires subscription information from a subscription center, acquires target data from a pre-subscribed API, generates corresponding task data by combining the subscription information and the target data, and executes the sub-domain collaboration task 1 based on the task data.
In one embodiment, as shown in fig. 8, a task execution method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
and S801, acquiring a data reading interface opened by the task generating terminal when receiving the task issuing triggering information sent by the task generating terminal.
And S802, triggering a publishing center publishing interface to subscribe the publishing information according to the data reading interface opened by the task generating terminal.
And S803, receiving an interface subscription request sent by the task cooperation terminal in response to the interface subscription and release information.
S804, determining a task identifier corresponding to the interface subscription request, and triggering the subscription center to generate interface subscription information according to the interface subscription request and the task identifier.
And S805, when the task cooperation event of the task generation terminal is acquired, determining a task identifier corresponding to the task cooperation event.
And S806, acquiring interface subscription information corresponding to the task identifier from the subscription center, and determining the target task cooperative terminal with the corresponding data reading authority according to the interface subscription information.
S807, task description information corresponding to the task cooperation event is acquired, and the task description is newly written into the event description item of the task information recording table.
And S808, sending the cooperative task trigger information carrying the task identifier to the target task cooperative terminal through the message queue so that the target task cooperative terminal generates a target cooperative task corresponding to the task identifier, and reading the target data from the target data reading interface.
And S809, updating the information sending state item in the task information recording table when receiving the trigger information receiving feedback returned by the target task cooperation terminal.
S810, when the information sending state item is not updated in the preset time period, judging that data sending abnormity occurs; and triggering a compensation mechanism for abnormal data transmission so as to acquire backup cooperation task trigger information which is backed up in advance from the backup database and transmit the backup cooperation task trigger information to the target task cooperation terminal.
S811, receiving a data template acquisition request sent by the target task cooperation terminal.
And S812, responding to the data template acquisition request, returning a target data template corresponding to the task identifier to the target task cooperation terminal, so that the target task cooperation terminal splices the target data template and the target data and executes a corresponding cooperation task according to the spliced data.
And S813, receiving the execution state of the cooperative task returned by the target task cooperative terminal, and updating the task execution state item in the task information recording table according to the execution state.
In the task execution method, the task cooperation terminal can read corresponding data from the pre-subscribed data reading interface and execute the cooperation task in time, so that not only can the real-time performance of the execution of the cooperation task be ensured, but also the task cooperation terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all data, and the safety of the data can be effectively ensured.
The application also provides an application scene, and the application scene applies the task execution method. Specifically, as shown in fig. 9, the application of the task execution method in the application scenario is as follows:
the system for executing the task execution method comprises a task generator, a middle station and a task collaborator.
Wherein, the data flow of the service generator is as follows:
and 1, judging that the cooperation mobilization is finished when a cooperation event occurs. And writing the cooperation message into a cooperation message record table. The collaboration message log provides a message tracing API.
2, preparing the called data. That is, when a cooperation event occurs, the change data is written into the change data providing table. The change data provisioning table provides a change data API.
And 3, pushing the message to the middle station.
A middle platform:
receiving a service generator message, sending to a publishing center/subscription center, and inquiring API through the publishing and subscription center to obtain the message publishing subscription and API information.
And 2, writing the cooperation message into the message center by calling a message center write API.
And 3, pushing the collaboration message to a message pushing inlet, namely to the MQ. And the MQ pushes the collaboration message to the corresponding business collaborator through the actual message API.
And 4, performing subsequent business cooperation monitoring and providing a business cooperation summary view.
And 5, monitoring information of the message center in real time, acquiring the cooperation message by calling a message tracing API and pushing the cooperation message to the service cooperation party through the MQ again when the abnormity is determined.
And (4) a business cooperative party:
and 1, subscribing API to the subscription center according to the published information.
And 2, receiving the push message of the middle station and acquiring subscription information from the subscription center.
And 3, writing a message receiving state into the message center when the collaboration message is received.
And 4, automatically generating the collaboration task according to the message type.
And 5, acquiring target data by calling a changed data API and performing cooperative task processing based on the target data.
And 6, after the cooperative task is completed, writing back the message center task processing state.
The application further provides an application scenario applying the task execution method. Specifically, as shown in fig. 10, the application of the task execution method in the application scenario is as follows:
the system for executing the task execution method comprises a task generator, a middle station and a task collaborator. Wherein, the task generator is a terminal used by a personnel department. The task collaborators comprise terminals used by the financial department and terminals used by the administrative department.
1) The basic data is synchronized. The service generator creates basic data of the cooperation service for the type of the activity needing cooperation, registers the basic data in the middle station, realizes the synchronization of the basic data, and is used for the subsequent machine identification of the cooperation activity by the service cooperation party to automatically generate a cooperation task.
2) Publish/subscribe. The service generator needs to send the information of the collaboration event to the publishing center. And the issuing center issues the information type of the cooperation and the provided API which can be used by the service cooperator according to the corresponding basic data. The service collaborators need to subscribe the service collaboration messages and the subscribed APIs of the center. In addition, the publishing and subscribing messages are pushed to the message center according to the publishing and subscribing states so as to trigger the message center to update the publishing and subscribing messages.
3) And (5) task cooperation flow. When a cooperation event for calculating salaries of Zhang III and Li IV is generated, the service generator pushes the cooperation message to the message center, and simultaneously writes the cooperation message into the fixed queue MQ. And the message center records the cooperation message through the task message recording table. And the MQ transmits the cooperation message to the service collaborator through the pre-established fixed channel. And after receiving the cooperation message, the business cooperation party writes a message receiving state into the message center, simultaneously automatically generates a cooperation task for calculating wages according to the activity type of the message, acquires a wage calculation formula from the subscription center, reads corresponding attendance information of Zhang III and Li IV from an API (application program interface) of the subscribed personnel field, settles the attendance wages based on the attendance information, and completes the calculation of the Zhang III and Li IV wages according to the wage calculation formula based on the settled attendance wages. And after the payroll calculation is completed, the service cooperative party feeds back the task processing state to the message center.
According to the embodiment, the service cooperation party can timely and reliably complete the service cooperation of the service generator through the cooperation among the service generator, the middle station and the service cooperation party. The method has the following beneficial effects:
(1) the accurate and timely transmission of the message is ensured by utilizing the characteristics of MQ cluster, persistence and the like.
(2) MQ only transmits messages and does not transmit data, and pressure of MQ is relieved.
(3) The data range can be well controlled, and the business cooperation party can fetch data according to the requirement, so that the safety of the data is ensured.
(4) The multi-service cooperation message chain can be completely traced, and the multi-service cooperation process is more visually presented.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the above-mentioned flowcharts may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or the stages is not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a part of the steps or the stages in other steps.
Based on the same idea as the task execution method in the above embodiment, the present invention also provides a task execution device that can be used to execute the above task execution method. For convenience of explanation, the structure of the embodiment of the task execution device is only shown in the schematic diagram, and those skilled in the art will understand that the structure shown in the figure does not constitute a limitation to the device, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
In one embodiment, as shown in fig. 11, there is provided a task execution apparatus 1100, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, and specifically includes: a task identifier determining module 1101, a collaboration terminal determining module 1102, a collaboration task executing module 1103, and a status updating module 1104, wherein:
the task identifier determining module 1101 is configured to determine a task identifier corresponding to a task collaboration event when the task collaboration event is acquired.
A cooperative terminal determining module 1102, configured to determine a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing the subscription information of the task cooperative terminal to the data reading interface.
A cooperative task executing module 1103, configured to send cooperative task trigger information to the target task cooperative terminal, so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data.
And the state updating module 1104 is configured to acquire a task information recording table used for recording task information of a task cooperation event, and update the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
In the task execution device, the task cooperation terminal can read corresponding data from the pre-subscribed data reading interface and execute the cooperation task in time, so that not only can the real-time performance of the execution of the cooperation task be ensured, but also the task cooperation terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all data, and the safety of the data can be effectively ensured.
In an embodiment, the cooperative task execution module is further configured to send cooperative task trigger information carrying the task identifier to the target task cooperative terminal through a message queue, so that the target task cooperative terminal generates a target cooperative task corresponding to the task identifier, reads the target data from the target data reading interface, and executes the target cooperative task according to the target data.
In one embodiment, the apparatus further comprises: the acquisition request receiving module is used for receiving a data template acquisition request sent by the target task cooperative terminal; and the data acquisition module is used for responding to the data template acquisition request, returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal splices the target data template and the target data and executes a corresponding cooperation task according to the spliced data.
In one embodiment, the apparatus further comprises: a receiving feedback receiving module, configured to receive a feedback of the trigger information returned by the target task cooperative terminal; and the state item updating module is used for responding to the triggering information receiving feedback and updating the information sending state item in the task information recording table.
In one embodiment, the apparatus further comprises: the abnormity determining module is used for determining that data transmission abnormity occurs when the information transmission state item is determined not to be updated in a preset time period; and the abnormity compensation module is used for triggering a compensation mechanism for sending abnormity to the data so as to acquire backup cooperation task trigger information which is backed up in advance from a backup database and send the backup cooperation task trigger information to the target task cooperation terminal.
In one embodiment, the apparatus further comprises: the device comprises a reading interface acquisition module, a task generation terminal and a task issuing triggering module, wherein the reading interface acquisition module is used for responding to task issuing triggering information when receiving the task issuing triggering information sent by the task generation terminal and acquiring a data reading interface opened by the task generation terminal; each data reading interface corresponds to a different data reading range; the open information publishing module is used for subscribing and publishing information according to the data reading interface publishing interface; a subscription request receiving module, configured to receive an interface subscription request sent by the task cooperative terminal in response to the interface subscription and publication information; the interface subscription request is a subscription request for at least one of the data reading interfaces; and the subscription information generating module is used for generating interface subscription information according to the interface subscription request.
In one embodiment, the apparatus further comprises: the description information acquisition module is used for acquiring task description information corresponding to the task cooperation event as the cooperation task trigger information; a trigger information writing module, configured to write the collaboration task trigger information into an event description item of the task information recording table; and the state updating module is also used for updating the task execution state item in the task information recording table according to the execution state of the target task cooperative terminal on the cooperative task.
For specific limitations of the task execution device, reference may be made to the above limitations of the task execution method, which are not described herein again. The respective modules in the task execution apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store xx data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of task execution.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of task execution, the method comprising:
when a task cooperation event is obtained, determining a task identifier corresponding to the task cooperation event;
determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface;
sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data;
and acquiring a task information recording table for recording task information of the task cooperation event, and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
2. The method according to claim 1, wherein the sending of the cooperative task trigger information to the target task cooperative terminal includes:
and sending cooperative task trigger information carrying the task identifier to the target task cooperative terminal through a message queue so that the target task cooperative terminal generates a target cooperative task corresponding to the task identifier, reads the target data from the target data reading interface and executes the target cooperative task according to the target data.
3. The method according to claim 1, wherein after sending the cooperative task trigger information to the target task cooperative terminal, the method further comprises:
receiving a data template acquisition request sent by the target task cooperative terminal;
and responding to the data template acquisition request, returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal splices the target data template and the target data and executes a corresponding cooperation task according to the spliced data.
4. The method according to claim 1, wherein after sending the cooperative task trigger information to the target task cooperative terminal, the method further comprises:
receiving triggering information receiving feedback returned by the target task cooperative terminal;
and responding to the trigger information receiving feedback, and updating the information sending state item in the task information recording table.
5. The method according to claim 4, wherein after sending the cooperative task trigger information to the target task cooperative terminal, the method further comprises:
when the information sending state item is determined not to be updated in a preset time period, judging that data sending abnormity occurs;
and triggering a compensation mechanism for abnormal data transmission so as to acquire backup cooperation task trigger information which is backed up in advance from a backup database and transmit the backup cooperation task trigger information to the target task cooperation terminal.
6. The method according to claim 1, wherein before determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier, the method further comprises:
when receiving task issuing triggering information sent by a task generating terminal, responding to the task issuing triggering information, and acquiring a data reading interface opened by the task generating terminal; each data reading interface corresponds to a different data reading range;
subscribing and publishing information according to the data reading interface publishing interface;
receiving an interface subscription request sent by the task cooperation terminal responding to the interface subscription and release information; the interface subscription request is a subscription request for at least one of the data reading interfaces;
and generating interface subscription information according to the interface subscription request.
7. The method according to claim 1, wherein after determining the task identifier corresponding to the task collaboration event when the task collaboration event is obtained, the method further comprises:
acquiring task description information corresponding to the task cooperation event as the cooperation task trigger information;
writing the collaboration task trigger information into an event description item of the task information recording table;
the updating the task information record table according to the execution state of the target task cooperative terminal on the cooperative task comprises the following steps:
and updating the task execution state item in the task information record table according to the execution state of the target task cooperative terminal on the cooperative task.
8. A task execution apparatus, characterized in that the apparatus comprises:
the task identification determining module is used for determining a task identification corresponding to a task cooperation event when the task cooperation event is obtained;
the cooperative terminal determining module is used for determining a target task cooperative terminal according to the interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task cooperative terminal to the data reading interface;
the cooperative task execution module is used for sending cooperative task trigger information to the target task cooperative terminal so that the target task cooperative terminal reads target data corresponding to the task cooperative event from a pre-subscribed target data reading interface and executes a corresponding cooperative task according to the target data;
and the state updating module is used for acquiring a task information recording table for recording task information of the task cooperation event and updating the task information recording table according to the execution state of the target task cooperation terminal on the cooperation task.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202011629667.XA 2020-12-30 2020-12-30 Task execution method, device, computer equipment and storage medium Active CN112817707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011629667.XA CN112817707B (en) 2020-12-30 2020-12-30 Task execution method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011629667.XA CN112817707B (en) 2020-12-30 2020-12-30 Task execution method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112817707A true CN112817707A (en) 2021-05-18
CN112817707B CN112817707B (en) 2024-02-20

Family

ID=75855072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011629667.XA Active CN112817707B (en) 2020-12-30 2020-12-30 Task execution method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112817707B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113782168A (en) * 2021-08-25 2021-12-10 北京金山云网络技术有限公司 Regional public medical cooperative processing method and device, electronic equipment and storage medium
CN114202318A (en) * 2022-02-18 2022-03-18 北京明略软件***有限公司 Method and device for processing collaboration task, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174331A1 (en) * 2006-01-06 2007-07-26 Wolf Robert P System and method for extending the business data associated with a network-based user collaboration tool to include spatial reference information for collaborative visualization
EP2012261A1 (en) * 2007-06-13 2009-01-07 Sap Ag Processing and exchanging data of collaborative tasks
JP2015153255A (en) * 2014-02-17 2015-08-24 Kddi株式会社 Cooperation system, management server, cooperation method, and cooperation program
CN104967652A (en) * 2015-03-10 2015-10-07 腾讯科技(深圳)有限公司 Event subscription method, apparatus and system
US20160357778A1 (en) * 2015-06-02 2016-12-08 David MacKenzie System for handling event messages for file collaboration
CN110084467A (en) * 2019-03-13 2019-08-02 中国平安财产保险股份有限公司 Mobile standard inspection method, apparatus, computer equipment and storage medium
CN110430121A (en) * 2019-06-26 2019-11-08 口碑(上海)信息技术有限公司 Message informing method and device
CN111859132A (en) * 2020-07-21 2020-10-30 腾讯科技(深圳)有限公司 Data processing method and device, intelligent equipment and storage medium
CN111866191A (en) * 2020-09-24 2020-10-30 深圳市易博天下科技有限公司 Message event distribution method, distribution platform, system and server
CN112070585A (en) * 2020-09-09 2020-12-11 苏宁云计算有限公司 Order state unified management method and device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174331A1 (en) * 2006-01-06 2007-07-26 Wolf Robert P System and method for extending the business data associated with a network-based user collaboration tool to include spatial reference information for collaborative visualization
EP2012261A1 (en) * 2007-06-13 2009-01-07 Sap Ag Processing and exchanging data of collaborative tasks
JP2015153255A (en) * 2014-02-17 2015-08-24 Kddi株式会社 Cooperation system, management server, cooperation method, and cooperation program
CN104967652A (en) * 2015-03-10 2015-10-07 腾讯科技(深圳)有限公司 Event subscription method, apparatus and system
US20160357778A1 (en) * 2015-06-02 2016-12-08 David MacKenzie System for handling event messages for file collaboration
CN110084467A (en) * 2019-03-13 2019-08-02 中国平安财产保险股份有限公司 Mobile standard inspection method, apparatus, computer equipment and storage medium
CN110430121A (en) * 2019-06-26 2019-11-08 口碑(上海)信息技术有限公司 Message informing method and device
CN111859132A (en) * 2020-07-21 2020-10-30 腾讯科技(深圳)有限公司 Data processing method and device, intelligent equipment and storage medium
CN112070585A (en) * 2020-09-09 2020-12-11 苏宁云计算有限公司 Order state unified management method and device, computer equipment and storage medium
CN111866191A (en) * 2020-09-24 2020-10-30 深圳市易博天下科技有限公司 Message event distribution method, distribution platform, system and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
乔秀全;章洋;吴步丹;程渤;赵帅;马华东;***;: "事件驱动、面向服务的物联网服务提供方法", 中国科学:信息科学, no. 10 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113782168A (en) * 2021-08-25 2021-12-10 北京金山云网络技术有限公司 Regional public medical cooperative processing method and device, electronic equipment and storage medium
CN114202318A (en) * 2022-02-18 2022-03-18 北京明略软件***有限公司 Method and device for processing collaboration task, electronic equipment and readable storage medium
CN114202318B (en) * 2022-02-18 2022-05-17 北京明略软件***有限公司 Method and device for processing collaboration task, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112817707B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
US10833858B2 (en) Secure cryptlet tunnel
EP3685294B1 (en) Cryptlet binding key graph
KR102121159B1 (en) Event-driven blockchain workflow processing
CN102456185B (en) Distributed workflow processing method and distributed workflow engine system
US11521202B2 (en) Distributed computing and storage network implementing high integrity, high bandwidth, low latency, secure processing
US20180330079A1 (en) Enclave pool management
CN110162470B (en) Block chain testing method and device
CN109766253B (en) Performance data sending method and device, computer equipment and storage medium
US10664591B2 (en) Enclave pools
US20180331821A1 (en) Cryptlet identity
US20180330078A1 (en) Enclave pool shared key
CN112817707B (en) Task execution method, device, computer equipment and storage medium
CN108845866B (en) Method and apparatus for processing distributed transactions
US20190378069A1 (en) Maximizing retention of transaction results for blockchain block creation
CN112200571A (en) Resource distribution method and device based on block chain and electronic equipment
CN111062796A (en) Block chain-based payroll distribution method and device and electronic equipment
CN110908812B (en) Service data processing method, device, readable storage medium and computer equipment
CN111784318B (en) Data processing method, device, electronic equipment and storage medium
WO2020238250A1 (en) Capital chain information tracing method and system, and server and readable storage medium
CN112200567A (en) Resource management method and device based on block chain and electronic equipment
CN111813868B (en) Data synchronization method and device
CN113391901A (en) RPA robot management method, device, equipment and storage medium
CN112100588A (en) Block chain-based digital seal application method and device and electronic equipment
CN112291321B (en) Service processing method, device and system
US9639593B2 (en) Sequence engine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant