[go: up one dir, main page]

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

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

Info

Publication number
CN112817707B
CN112817707B CN202011629667.XA CN202011629667A CN112817707B CN 112817707 B CN112817707 B CN 112817707B CN 202011629667 A CN202011629667 A CN 202011629667A CN 112817707 B CN112817707 B CN 112817707B
Authority
CN
China
Prior art keywords
task
target
terminal
cooperative
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011629667.XA
Other languages
Chinese (zh)
Other versions
CN112817707A (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

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, computer equipment and a storage medium. The method comprises the following steps: when a task collaboration event is acquired, determining a task identifier corresponding to the task collaboration 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data; and acquiring a task information record table for recording task information of the task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task. The task cooperation terminal can timely read corresponding data from the pre-subscribed data reading interface and execute the cooperation task, and real-time performance of the cooperation task execution can be ensured.

Description

Task execution method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of information sharing technologies, and in particular, to a task execution method, a task execution device, a computer device, and a storage medium.
Background
With the development of information sharing technology, there has been a technology of performing data sharing between computer devices to perform a specific task by means of cooperation of the computer devices. In performing collaborative tasks, computer devices need to obtain data generated by other computer devices.
In the conventional technology, a certain computer device periodically gets data generated by other computer devices from a data table. However, the real-time performance of the data mode of the current mode is low, so that the collaborative execution efficiency of the tasks is low.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a task execution method, apparatus, computer device, and storage medium.
A method of task execution, the method comprising: when a task collaboration event is acquired, determining a task identifier corresponding to the task collaboration 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 collaboration terminal on 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data; and acquiring a task information record table for recording task information of a task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
In one embodiment, the sending the collaborative task trigger information to the target task collaborative 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, reading the target data from the target data reading interface and executing the target cooperative task according to the target data.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative 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, and returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal can splice the target data template and the target data and execute a corresponding cooperation task according to the spliced data.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative terminal, the method further includes: receiving trigger 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 record table.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative terminal, the method further includes: when the information sending state item is not updated in a preset time period, judging that the data sending abnormality occurs; triggering a compensation mechanism for the abnormal data transmission so as to acquire backup cooperation task trigger information backed up in advance from a backup database and transmit the backup cooperation task trigger information to the target task cooperation terminal.
In one embodiment, before the determining the target task cooperative terminal according to the interface subscription information corresponding to the task identifier, the method further includes: when task release trigger information sent by a task generating terminal is received, responding to the task release trigger information, and acquiring an open data reading interface of the task generating terminal; each data reading interface corresponds to different data reading ranges; subscribing the publishing information according to the data reading interface publishing interface; receiving an interface subscription request sent by the task collaboration terminal in response to the interface subscription 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 one embodiment, when the task collaboration event is acquired, after determining the task identifier corresponding to the task collaboration event, the method further includes: acquiring task description information corresponding to the task cooperation event as the cooperation task trigger information; writing the collaborative task trigger information into an event description item of the task information record table; the task information record table is updated according to the execution state of the target task cooperation terminal to the cooperation task, and the task information record table comprises the following steps: and updating task execution state items in the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
A task execution device, the device comprising: the task identification determining module is used for determining a task identification corresponding to the task collaboration event when the task collaboration event is acquired; 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 collaboration terminal on 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data; the state updating module is used for acquiring a task information recording table for recording task information of the task collaboration event and updating the task information recording table according to the execution state of the target task collaboration terminal on the collaboration task.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of: when a task collaboration event is acquired, determining a task identifier corresponding to the task collaboration 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 collaboration terminal on 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data; and acquiring a task information record table for recording task information of a task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: when a task collaboration event is acquired, determining a task identifier corresponding to the task collaboration 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 collaboration terminal on 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data; and acquiring a task information record table for recording task information of a task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
According to the task executing method, the device, the computer equipment and the storage medium, when the task cooperation event is acquired, the target task cooperation terminal is determined, 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 target data reading interface subscribed in advance and executes the corresponding cooperation task, and the task information record table is updated according to the execution state of the target task cooperation terminal on the cooperation task. The task collaboration terminal can be triggered in real time when the task collaboration event is generated, and can timely read corresponding data from the pre-subscribed data reading interface and execute the collaboration task, so that the real-time performance of the collaboration task execution can be ensured, the task collaboration terminal can only read specific data from the pre-subscribed data reading interface, but not acquire all the data, and the safety of the data can be effectively ensured.
Drawings
FIG. 1 is an application environment diagram of a task execution method in one embodiment;
FIG. 2 is a flow diagram of a method of task execution in one embodiment;
FIG. 3 is a diagram illustrating an interface display of a task information record table according to one embodiment;
FIG. 4 is a flow chart of a task execution method according to another embodiment;
FIG. 5 is a schematic diagram of an information distribution table in one embodiment;
FIG. 6 is a schematic diagram of an interface subscription table in one embodiment;
FIG. 7 is a flow chart of a method of task execution in yet another embodiment;
FIG. 8 is a flow chart of a task execution method according to yet another embodiment;
FIG. 9 is an application scenario diagram of a task execution method in one embodiment;
FIG. 10 is an application scenario diagram of a task execution method according to another embodiment;
FIG. 11 is a block diagram of a task performing device in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The task execution method provided by the application can be applied to an application environment shown in fig. 1. The application environment includes a task generating terminal 101 (may also be referred to as a task generating party), a server 102, and a task cooperative terminal 102 (may also be referred to as a task cooperative party, only one task cooperative terminal is shown in fig. 1, and in an actual application scenario, the task cooperative terminal may be more than one task cooperative terminal. The server 102 communicates with the task generating terminal 101 and the task cooperative terminal 102 via a network, respectively. When a task occurs at the task occurrence terminal, the server sends the task cooperation terminal with cooperation task trigger information, and the task cooperation terminal reads data from a pre-subscribed data reading interface and executes a corresponding cooperation task under the triggering of the task cooperation trigger information. The task generating terminal 101 and the task cooperating terminal 102 may be implemented by terminal devices, which 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 of multiple servers. In some scenarios, the functions between the task generating terminal 101, the server 102 and the task cooperative terminal 102 may be reorganized, for example, the functions of the server may be implemented by one of the task generating terminal or the task cooperative 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 of the task generating terminal 101, the server 102, and the task cooperative terminal 102. In other application scenarios, the server may be replaced by a terminal device, and the task generating terminal or the task collaboration 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 applied to a server (the server may also be called a central control platform, or simply called a middle platform) for illustration, and includes the following steps:
s201, when a task cooperation event is acquired, determining a task identifier corresponding to the task cooperation event.
The tasks refer to tasks that can be executed by a computer device (including a terminal and a server) and that can implement specific functions, and in a specific service scenario, the tasks may also be referred to as services. In one embodiment, tasks may refer to data reading, numerical computation, information output, and so forth. In a specific application scenario, the task may be calculating payroll, transferring to a bank card, creating a wallet account, querying social security information, and so on.
Task collaboration events refer to events that require collaboration by other computer devices, such as: and generating an entry event of the job-entering information, wherein the event requires the task cooperation terminal to cooperate to complete the creation task of the wallet account so as to carry out the transfer operation to the wallet account subsequently.
Task identification is the ability to identify events. In one embodiment, in the task collaboration processing process, the task generating terminal, the server and the data transmission between the task collaboration terminals can all carry task identifiers, so that the main body receiving the corresponding information can identify the corresponding task according to the task identifiers and can specifically complete the task collaboration processing process. In some embodiments, the task identifier may be replaced by an event identifier, that is, an event identifier corresponding to the task collaboration event is generated when the task collaboration event is acquired.
In one embodiment, when the task collaboration event is acquired, before determining the task identifier corresponding to the task collaboration event, 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 a computational payroll, which may correspond to N task collaboration events that calculate payroll for N (N is a natural number) objects. Specifically, the server receives a task registration request of a task, i.e., a calculation payroll, sent by the task generating terminal, generates a task identifier corresponding to the task registration request, and records the CW if the task identifier is CW. When a task cooperation event of wages of the third calculation sheet is acquired, determining that the corresponding task identifier is CW, determining a target task cooperation terminal for executing the wage calculation task, triggering the target task cooperation terminal to read bank card information according to the task identifier CW and executing the corresponding wage 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 collaboration event, acquiring a task identifier corresponding to the target task, and determining the task identifier as a task identifier corresponding to the task collaboration event.
In one embodiment, the implementation procedure of S201 may be: the server receives event generation information sent by the task generating terminal when the task cooperation event is generated, and determines a task identifier corresponding to the task cooperation event under the triggering of the event generation information.
S202, determining a target task cooperative terminal according to interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task collaboration terminal on the data reading interface.
The server may provide at least one data reading interface to provide data related to the task collaboration event to the task collaboration terminal. The data read interface may also be referred to simply as an API (Application Programming Interface, application program interface). The data ranges of the data provided by the 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 executing a corresponding task by the cooperation task generation terminal. The different task collaboration terminals can be terminals in different business fields, taking the task generation terminal as a personal field as an example, and the task collaboration terminals can be terminals in the fields of compensation, attendance, performance, social security, finance, administrative and the like.
The task collaboration terminal can subscribe the data reading interface according to the requirement so as to read the data of the corresponding data range from the corresponding data reading interface. In one embodiment, the task collaboration terminal may determine a target data range of the data to be read according to the task to be executed by itself, and subscribe to a data reading interface corresponding to the target data range, for example: the task collaboration terminal used in the financial field subscribes to the data reading interface for providing the bank card number, and the task collaboration terminal used in the attendance field subscribes to the data reading interface for providing the attendance time, so that the task collaboration terminal used in the attendance field cannot read the bank card number, and the safety of data can be effectively ensured.
In one embodiment, the data read interface is a read 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 the database or the data record table through the target data reading interface to obtain target data.
In one embodiment, after the task collaboration 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 collaboration terminal and store the interface subscription information in association with the task identifier of the corresponding task.
Further, a subscription center is configured in the server. The subscription center may be a functional module in the server or may be a computer device independent of the server. The subscription center is used for receiving subscription information of the service cooperation terminal, which is subscribed to the data reading interface of the service cooperation terminal. The task collaboration 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 triggering the corresponding interface subscription information to be written in the subscription center by the server according to the subscription information of the data reading interface.
Further, the implementation process of S202 may be: after determining the task identifier, the server acquires corresponding interface subscription information according to the task identifier, and determines a target task collaboration 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 subscribed information characterizing the task collaboration terminal to the data reading interface, such as: the task cooperative terminal with corresponding authority is not subscribed to the corresponding data reading interface. Therefore, when the server acquires the task collaboration event, the server acquires the interface subscription information corresponding to the task identifier, determines the subscribed task collaboration terminal with the subscribed data reading interface and the unsubscribed task collaboration terminal with the unsubscribed data reading interface according to the interface subscription information, and sends the collaboration task trigger information to the subscribed task collaboration terminal or the unsubscribed task collaboration terminal. After the collaborative task trigger information is sent to the unsubscribed task collaborative terminal, the server can receive an interface subscription request sent by the unsubscribed task collaborative terminal, so that corresponding interface subscription information is updated, and the unsubscribed task collaborative terminal can call a target data reading interface and acquire 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data.
In S203, the server triggers the target task collaboration terminal to execute the corresponding collaboration task by sending the collaboration task trigger information to the target task collaboration terminal. When executing the corresponding collaboration task, the target task collaboration terminal reads target data corresponding to the task collaboration event from a target data reading interface subscribed in advance and executes the corresponding collaboration task according to the target data. Namely, the target task cooperative terminal reads target data in a corresponding data range from the target data reading interface so as to execute the corresponding cooperative task. By limiting the data acquisition range of the task collaboration terminals, the data acquisition of each task collaboration terminal can be more targeted, sensitive information leakage caused by the fact that all task collaboration terminals acquire all data is prevented, and the safety of the data can be effectively guaranteed.
In one embodiment, one task orchestration 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 collaborative task, the target task collaborative terminal may respectively read target data from the subscribed at least one target data reading interface, and execute the corresponding collaborative task based on the target data.
In one embodiment, the server may send the collaborative task trigger information to all task collaborative terminals having a network connection relationship, and the task collaborative terminal determines whether task execution is required according to a task identifier carried in the collaborative task trigger information, reads target data corresponding to a task collaborative event from a target data reading interface subscribed in advance when task execution is required, and executes a corresponding collaborative task according to the target data.
In one embodiment, the target task cooperative terminal may be at least one. When the target task cooperative terminals are more than one, the server can send the cooperative task trigger information to the target task cooperative terminals in a synchronous or asynchronous mode.
S204, acquiring a task information record table for recording task information of a task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
The task information of the task collaboration event refers to various information related to the task collaboration event, and may include collaboration task trigger information, a generation state of the collaboration task, an execution state of the collaboration task, a reception state of the collaboration task trigger information, and the like. After the task information of the task collaboration event is recorded in the task information recording table, the task information recording table can play a role of a message view, and the server can acquire the related information of the task collaboration event through the task information recording table, so that the purpose of completely tracing the task collaboration process can be achieved even if the number of the task collaboration terminals is numerous, and the server can completely and reliably acquire the execution state of all the task collaboration terminals on task collaboration.
In one embodiment, the implementation procedure of S204 may be: the server acquires the task information record table, and updates the task information record table according to the execution state when receiving the execution state of the cooperative task sent by the target task cooperative terminal. Further, the task execution state item for recording the execution state in the task information recording table may be updated while other information items may remain unchanged.
In the task execution method, the task collaboration terminal can timely read the corresponding data from the pre-subscribed data reading interface and execute the collaboration task, so that the real-time performance of the collaboration task execution can be ensured, the task collaboration terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all the data, and the safety of the data can be effectively ensured.
In one embodiment, the sending the collaborative task trigger information to the target task collaborative 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, reading the target data from the target data reading interface and executing the target cooperative task according to the target data.
Where the message queue may refer to MQ (Message Queue). The message to be transmitted is placed in a queue, messaging is implemented using a queuing mechanism, and then processed by a consumer (in the embodiment of the present invention, the consumer refers to a task collaboration terminal) who can pull the message to a specified queue. According to the method and the device for pushing the collaborative task trigger information to the task collaborative terminal, the collaborative task trigger information is pushed to the task collaborative terminal in a MQ mode, and the information can be timely and accurately pushed to the target task collaborative terminal by utilizing the advantages of the MQ.
When receiving the collaborative task trigger information, the target task collaborative terminal identifies the task type to which the task collaborative event belongs according to the task identifier, and automatically generates a corresponding target collaborative task, for example: the task collaboration event is: and (3) entering into the job for the third time, requesting to send out wages for the third time, and generating a target cooperation task for wages for the third time by the target task cooperation terminal. And when the target cooperative task is to be executed, corresponding information is needed, taking three wages as an example, three bank card numbers are needed to be acquired, and the three bank card numbers are stored in the data storage space, so that the target task cooperative terminal needs to read the three bank card numbers from the data storage space through the target data reading interface, and transfer the corresponding wages into the bank card numbers.
In one embodiment, as shown in FIG. 3, the task generating terminal provides three APIs, API-1, API-2, and API-3. When a task cooperation event occurs, the server sends 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 cooperation terminal. For a certain task collaboration event, the target task collaboration terminal 1 generates a collaboration task 1, acquires corresponding target data through a pre-subscribed API-1 and executes the collaboration task 1; for another task collaboration event, the target task collaboration terminal 2 generates a collaboration task 2, acquires corresponding target data through the pre-subscribed API-3, and executes the collaboration task 2.
In the above embodiment, the task collaboration event is generated in a message queue manner, and the target task collaboration terminal is triggered to generate a collaboration task, and the target data is read from the target data reading interface and the corresponding collaboration task is executed. Has at least the following beneficial effects: 1) The service generating terminal publishes APIs with different data ranges, and the service cooperating terminal subscribes according to the needs, so that the data range of the service data which can be obtained by the service cooperating terminal is reduced, the excessive disclosure of information can be effectively prevented, and the safety of the data is ensured. 2) The advantage of using MQ, guarantee that business cooperation terminal can receive task data accurately and timely, let MQ focus on message transmission only again, not carry data, lighten MQ and transmit the pressure of the large data bulk. 3) The complete business collaboration list view is ensured through the task information record table, and the business collaboration flow can be clearly traced and abnormal monitored. 4) The target task cooperation terminal does not need to acquire data in a timing mode any more, but can acquire target data and timely execute the cooperation task 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.
To reduce the pressure of data transmission, the base data and the change data may be stored separately, for example: the basic data is sent 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 change data in the storage space corresponding to the task generating terminal after the change data is generated. The basic data may refer to data common to executing the collaboration task, may be a data template for filling in the change data, or may be reading instruction data to instruct the task collaboration terminal what data needs to be read from the data reading interface. The underlying data may be stored in a subscription center, at which point the underlying data may be referred to as subscription information. In some embodiments, the basic data may also be sent to the task collaboration terminal in advance and stored in the memory space of the task collaboration terminal. The target task cooperation terminal can directly read the basic data from the memory when the cooperation task is required to be executed, and the data reading efficiency can be effectively saved.
The target data acquired by the target task cooperative terminal from the target data reading interface can be change data. In order to execute the collaboration task, corresponding basic data are also required to be acquired, and the change data and the basic data are combined to obtain complete task data capable of executing the collaboration task, so that the corresponding collaboration task is executed.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative 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, and returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal can splice the target data template and the target data and execute a corresponding cooperation task according to the spliced data.
Wherein 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 cooperative terminal can obtain complete task data according to the target task data template and the target data. The following concatenation of target data templates and target data is exemplified as follows: assume that the target data templates are: AA is delayed to CC hours after BB, and the read target data are: zhang three, 10 months and 20 days in 2020, 1, task data are obtained after integration: and Zhang Sanyu, 10 and 20 days in 2020 are delayed to 1 hour, and corresponding attendance payroll is deducted based on the task data and the cooperative task of payroll calculation is completed.
In one embodiment, the data templates may be stored in a subscription center. The server can acquire the corresponding target data template from the subscription center when receiving the data template acquisition request sent by the target task cooperative terminal.
In the above embodiment, the task collaboration terminal acquires data from different data sources, completes collaboration tasks based on the task data obtained by splicing, does not need to read the data from the data reading interface when the collaboration tasks are executed each time, can effectively reduce the reading time of the task data, can reduce the pressure of data transmission under the aim of ensuring the effective completion of the collaboration tasks, and simultaneously improves the execution efficiency of the collaboration tasks.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative terminal, the method further includes: receiving trigger 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 record table.
And the target task cooperative terminal returns 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. The server may update the information transmission status item in the task information record table at this time. The information sending state item in the task information recording table is used for recording the sending and receiving states of the collaborative task trigger information.
In one embodiment, the server may fill in the information transmission status item as transmitted after transmitting the cooperation task trigger information to the target task cooperation terminal. When receiving the trigger information receiving feedback, the information sending state item is updated to be received. By the mode, the server can timely monitor the sending and receiving information of the collaborative task trigger information and timely process the collaborative task trigger information when abnormality occurs.
In one embodiment, when the target task cooperative terminal is more than one, the server may configure different information sending status items for each target task cooperative terminal in the task information record table. When receiving trigger information receiving feedback of a certain target task cooperative terminal, updating information sending state items corresponding to the target task cooperative terminal while information sending state items of other target task cooperative terminals remain unchanged.
In the above embodiment, by updating the specific record item in the task information record table, the task information record table can record the task information of the latest task collaboration event, so that the server can timely monitor the task collaboration event processing state and timely respond when an abnormality occurs, so as to ensure 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 may update the event description item and the task execution state item according to the execution state of the task collaboration event. The 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, the description text describing the event, etc., taking the task collaboration event of sending wages for example, the task description information may be "sending wages". The task execution status item is used to record the execution status of the collaborative task, for example: whether a collaborative task is generated, whether a collaborative task is executed, the result of collaborative task execution, etc.
In one embodiment, when the task collaboration event is acquired, after determining the task identifier corresponding to the task collaboration event, the method further includes: acquiring task description information corresponding to the task collaboration event; and writing the task description information into an event description item of the task information record 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 complete tracing of the multi-service collaboration message chain is possible.
In one embodiment, the collaborative 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 one embodiment, the updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task includes: and updating task execution state items in the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
In the above embodiment, by updating the task execution status item in the task information record table, the task information record table can update the execution status of the collaboration task in time, so that it is possible to trace back the multi-service collaboration message chain completely.
In one embodiment, the server may generate and update a task information record table according to task information of the task collaboration event. And the terminal can be controlled to display each state of the task information record table on the interface so as to achieve the purpose of visual display of the task information. In one embodiment, the process of status updating 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 occurrence terminal item, an event description item, a task cooperation terminal item, an information transmission state item and a task execution state item.
When a task collaboration event is acquired, the server generates a new task information record table, or adds a new record item to the existing task information record table. Taking a new task information record table as an example, the generated new task information record table is shown as 401 in fig. 4, and the server fills information related to a task occurrence terminal item and an event description item in the new task information record table, wherein the field where the task occurrence terminal written in the task occurrence terminal item is located, for example: the personnel field indicates that a task cooperation terminal generating a task cooperation event is a terminal in use in the personnel 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 task cooperative terminal item with the domain in which the target task cooperative terminal is located. After transmitting the cooperation task trigger information to the target task cooperation terminal, the server may fill information into the information transmission state item, for example: the information is sent or to be received. Upon receiving the trigger information reception feedback transmitted by the target task cooperative terminal, the server may update the information transmission status item to the received information while filling in the task execution status item as incomplete cooperation, as shown at 402 in fig. 4. When receiving the execution state of the collaboration task sent by the target task collaboration terminal, the server updates the task execution state item to be completed collaboration, and the state that all target task collaboration terminals execute the collaboration task is shown as 403 in fig. 4.
In one embodiment, the server may configure a message center. The message center may be a functional module in the server or may be 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 update of the information. The message center can display a list view through the task message record table to completely trace back the business collaboration process and monitor the abnormality of the whole task collaboration process.
In one embodiment, a task generation status item may also be included in the task information record table. The server can fill in the task to be generated task in the task generation status item by the trigger message center after sending the cooperative task trigger information to the target task cooperative terminal. The target task cooperative terminal writes back the task generation state to the server after generating the target cooperative task, and triggers the message center to update the task generation state item into a generated task after receiving the task generation state sent by the target task cooperative terminal.
In the above embodiment, the task information record table is used to record the task collaboration process, so that the message chain of the multi-task collaboration can be completely traced. In addition, the task information record table is displayed through the terminal interface, so that the multi-task cooperation process of each task cooperation terminal can be more intuitively presented.
In one embodiment, after the sending of the collaborative task trigger information to the target task collaborative terminal, the method further includes: when the information sending state item is not updated in a preset time period, judging that the data sending abnormality occurs; triggering a compensation mechanism for the abnormal data transmission so as to acquire backup cooperation task trigger information 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 practical situations, for example: 100ms, 500ms, etc.
When the task generating terminal generates a task cooperation event, the server can store corresponding cooperation task trigger information into the backup database. The backup database can be a database configured by a server or a database configured by a task generating terminal.
And the target task cooperative terminal can generate and execute the target cooperative task when receiving the backup cooperative task trigger information.
The information sending state item is not updated within the preset time period possibly because the target task cooperative terminal does not receive the cooperative task trigger information, and the situation cannot trigger the target task cooperative terminal to execute the cooperative task. And therefore, the target task cooperative terminal needs to be triggered again to execute the cooperative task. In the above embodiment, when the data transmission abnormality is determined, the compensation mechanism is triggered to re-send the cooperative task trigger information to the target task cooperative terminal, and the target task cooperative terminal is re-triggered to execute the cooperative task, so that normal progress 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 collaborative task trigger information to the target task collaboration terminal, the method further includes: when the information sending state item is not updated in a preset time period, judging that the data sending abnormality occurs; triggering a compensation mechanism for the abnormal data transmission so as to acquire backup data of the task collaboration event backed up in advance from a backup database and transmit the backup data to the target task collaboration terminal.
When the task generating terminal generates a task cooperation event, the corresponding data can be stored in the backup database.
The information sending status item is not updated within the preset time period, possibly because the target task cooperative terminal cannot read the target data from the target data reading interface although the target task cooperative terminal receives the cooperative task trigger information, and in this case, the target task cooperative terminal cannot execute the cooperative task. And thus it is necessary to transmit corresponding task data to the target task cooperative terminal. In the above embodiment, when the data transmission abnormality occurs, the backup data corresponding to the task collaboration event is directly transmitted to the target task collaboration terminal, so that the target task collaboration terminal executes the corresponding collaboration task in time, and the target task collaboration terminal does not need to go to the data reading interface to read the data, thereby effectively improving the data acquisition efficiency and further improving the execution efficiency of the collaboration task.
In one embodiment, before the determining the target task cooperative terminal according to the interface subscription information corresponding to the task identifier, the method further includes: when task release trigger information sent by a task generating terminal is received, responding to the task release trigger information, and acquiring an open data reading interface of the task generating terminal; each data reading interface corresponds to different data reading ranges; subscribing the publishing information according to the data reading interface publishing interface; receiving an interface subscription request sent by the task collaboration terminal in response to the interface subscription 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 release trigger information, the server can subscribe the release information to the external release interface so as to indicate the task cooperation terminal to subscribe the data reading interface as required. 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 terminal that receives the interface subscription publishing information can subscribe to the data reading interfaces in a targeted manner. Wherein the interface subscription publishing information may also be referred to as a task collaboration message.
In one embodiment, a distribution center may be configured in the server. The distribution center may be a functional module in the server or may be 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 collaboration message is published, the API can be selectively subscribed by a task collaboration terminal in the task collaboration field. The issuing center may issue an API usable by the task cooperative terminal while issuing the task cooperative message.
The distribution center and the subscription center are capable of communicating with each other. The task generating terminal can send the task release trigger information to the release center, and the release center acquires the data reading interface opened by the task generating terminal and subscribes to release information according to the opened data reading interface release interface. The task orchestration terminal may then send an interface subscription request to the subscription center as needed to request subscription to at least one data reading interface. And the subscription center generates interface subscription information according to the received interface subscription request and records the interface subscription information.
In one embodiment, the publishing center may record the interface subscription publishing information through an information publishing table. One example of an information distribution table including a task occurrence terminal item, a distribution description item, an API item, and a distribution state item is shown in fig. 5. When a task collaboration event is acquired, the server generates a new information release table, or adds a new record item to the existing information release table. When acquiring the task release triggering information, the server determines the corresponding task generating terminal, task type and open API, and accordingly fills the information into the task generating terminal item, release description item and API item. After the publishing interface subscribes to the publishing information, the server may update the publishing state entries according to the publishing state of each API. 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 containing subscription description items, task collaboration terminal items, API items, and subscription status items is shown in fig. 6. When a task collaboration event is acquired, the server generates a new interface subscription table, or adds a new record item to the existing interface subscription table. After receiving the subscription request sent by the task collaboration terminal, the server may update the task collaboration terminal item, the API item, and the subscription status item according to the API subscribed by the task collaboration terminal. The updated interface subscription table is shown in fig. 6. As shown in FIG. 6, the task collaboration terminal in the salary domain subscribes to both APIs, API-1 and API-2.
In one embodiment, when the publishing interface subscribes to publish information, the server may publish the data reading interface to which each task cooperative terminal has authority to subscribe, so as to trigger the task cooperative terminal to subscribe at least one data reading interface from the data reading interfaces to which the task cooperative terminal has authority to subscribe, so as to execute the cooperative task subsequently.
In the embodiment, the server can publish the interface subscription release information related to the specific task to the task cooperative terminal through the cooperation of the release message and the subscription message, and trigger the task cooperative terminal to subscribe the data reading interface, so that the task cooperative terminal can only read data from the subscribed data reading interface when executing the cooperative task, and the safety of the data 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: it is assumed that the server has two sub-domain cooperative terminals 1 and 2 connected (the sub-domain cooperative terminals are the task cooperative terminals in the foregoing embodiment). When a new task occurs, the service publishes interface subscription publishing information to the task cooperative terminal with the corresponding authority through the publishing center, receives an interface subscription request sent by the corresponding task cooperative terminal through the subscribing center, and writes the corresponding interface subscription information in the subscribing center according to the interface subscription request. When a task cooperation event is acquired, the server sends event description information to the message center, and triggers the message center to generate a task information record table, and a target sub-domain cooperation terminal for cooperation is determined. Assuming that the sub-domain cooperative terminal 1 is a target sub-domain cooperative terminal, the server triggers the message center to write the relevant information of the sub-domain cooperative terminal 1 into the task information record table. In addition, the server triggers the message center to update the task information record table according to the sending and receiving states of the cooperative task trigger information. The sub-domain collaboration terminal 1 generates a sub-domain task 1 after receiving the collaboration task trigger information, acquires subscription information from a subscription center, acquires target data from an API subscribed in advance, 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, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s801, when task release trigger information sent by a task generating terminal is received, a data reading interface opened by the task generating terminal is obtained.
S802, triggering a publishing center to publish an interface to subscribe to publish information according to the data reading interface opened by the task generating terminal.
S803, receiving an interface subscription request sent by the task collaboration terminal in response to the interface subscription publishing information.
S804, determining a task identifier corresponding to the interface subscription request, and triggering a subscription center to generate interface subscription information according to the interface subscription request and the task identifier.
S805, when a task cooperation event of the task occurrence terminal is acquired, determining a task identifier corresponding to the task cooperation event.
S806, acquiring interface subscription information corresponding to the task identifier from the subscription center, and determining a target task cooperation terminal with corresponding data reading permission according to the interface subscription information.
S807, task description information corresponding to the task collaboration event is acquired, and the task description is newly written into an event description item of the task information record table.
S808, sending the collaborative task trigger information carrying the task identifier to the target task collaborative terminal through the message queue, so that the target task collaborative terminal generates a target collaborative task corresponding to the task identifier, and reading target data from the target data reading interface.
S809, when receiving trigger information receiving feedback returned by the target task cooperative terminal, updating the information sending state item in the task information record table.
S810, when it is determined that the information transmission state item is not updated within a preset time period, judging that data transmission abnormality occurs; triggering a compensation mechanism for abnormal data transmission so as to acquire backup cooperation task triggering information backed up in advance from a backup database and send the backup cooperation task triggering information to a target task cooperation terminal.
S811, receiving a data template acquisition request sent by the target task cooperative terminal.
S812, responding to the data template acquisition request, and returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal can splice the target data template and the target data and execute the corresponding cooperation task according to the spliced data.
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 record table according to the execution state.
In the task execution method, the task collaboration terminal can timely read the corresponding data from the pre-subscribed data reading interface and execute the collaboration task, so that the real-time performance of the collaboration task execution can be ensured, the task collaboration terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all the data, and the safety of the data can be effectively ensured.
The application scenario also provides an application scenario, and the application scenario 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 generating party, a middle platform and a task collaborating party.
Wherein, the data flow of the service generator is as follows:
1, when a collaboration event occurs, judging that collaboration mobilization is completed. And writing the collaboration message into a collaboration message record table. The collaboration message record table provides a message trace back API.
2, preparing the called data. That is, when a collaboration event occurs, the change data is written into the change data providing table. The change data providing table provides a change data API.
And 3, pushing the message to the middle station.
Middle stage:
and 1, receiving a message of a service generator, going to a publishing center/subscribing center, and acquiring the message publishing subscription and API information through a provided publishing & subscribing center query API.
And 2, writing the collaboration message into the message center by calling the message center writing API.
And 3, pushing the collaboration message to a message pushing inlet, namely pushing the collaboration message to the MQ. The MQ pushes the collaboration message to the corresponding business collaboration party through the actual message API.
And 4, executing subsequent business cooperation monitoring and providing a business cooperation list view.
And 5, monitoring information of the message center in real time, and when the occurrence of the abnormality is determined, acquiring the collaboration message by calling a message tracing API and pushing the collaboration message to the business collaboration party again through the MQ.
Business collaborators:
and 1, subscribing the API to the subscription center according to the release information.
And 2, receiving the middle push message and acquiring subscription information from the subscription center.
And 3, writing a message receiving state into a message center when the collaboration message is received.
And 4, automatically generating a collaboration task according to the message type.
And 5, acquiring target data by calling a change data API and carrying out cooperative task processing based on the target data.
And 6, after the cooperation task is completed, writing back the task processing state of the message center.
The application further provides an application scene, and the application scene applies 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 generating party, a middle platform and a task collaborating party. The task generating party is a terminal used by a personnel department. The task collaborators comprise terminals used by financial departments and terminals used by administrative departments.
1) And synchronizing the basic data. The business generating party creates cooperation business basic data for the type of the activities needing cooperation, registers in the middle platform, realizes the synchronization of the basic data, is used for carrying out machine identification on the cooperation activities by the business cooperating party subsequently, and automatically generates cooperation tasks.
2) Publish/subscribe. The service generator needs to go to the publishing center to publish the collaboration event information. The publishing center publishes the collaborative message type and the provided API for the business collaborative party according to the corresponding basic data. Business collaborators need to go to a subscription center to subscribe to business collaboration messages and subscribed APIs. In addition, the publishing and subscribing information is pushed to the information center according to the publishing and subscribing state, so that the information center is triggered to update the publishing and subscribing information.
3) Task collaboration flow. When generating collaboration events to calculate wages of Zhang III and Li IV, the business generator pushes collaboration messages to the message center, and writes the collaboration messages into the fixed queue MQ. The message center records the collaboration message through a task message record table. The MQ transmits the collaboration message to the business collaboration party through a pre-built fixed way. After receiving the collaboration message, the business collaboration party writes in a message receiving state, automatically generates a collaboration task for calculating wages according to the activity type of the message, acquires a wage calculation formula from a subscription center, reads corresponding attendance information of Zhang III and Li IV from an API in the subscribed personnel field, settles the attendance based on the attendance information, and completes calculation of Zhang III and Li IV wages according to the wage calculation formula based on the settled attendance. And after the wage calculation is completed, the business collaboration party feeds back the task processing state to the message center.
According to the embodiment, the business cooperation party can timely and reliably complete business cooperation of the business generation party through cooperation among the business generation party, the middle platform and the business cooperation party. Has at least the following beneficial effects:
(1) By utilizing the characteristics of MQ cluster, persistence and the like, accurate and timely transfer of the message is ensured.
(2) The MQ only transmits the information, does not transmit data, and relieves the pressure of the MQ.
(3) The data range can be well controlled, and the business cooperators can access the data according to the requirement, so that the safety of the data is ensured.
(4) The multi-service collaboration message chain can be completely traced, and the multi-service collaboration process is more visual.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described above may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed in turn or alternately with at least a part of other steps or stages.
Based on the same ideas as the task execution method in the above embodiments, the present invention also provides a task execution device that can be used to execute the task execution method described above. For ease of illustration, only those portions of the task performing device embodiments are shown in the structural schematic diagrams that relate to the embodiments of the present invention, and those skilled in the art will appreciate that the illustrated structures do not constitute limitations of the device and may include more or fewer components than illustrated, or may combine certain components, or may be arranged in different components.
In one embodiment, as shown in fig. 11, a task execution apparatus 1100 is provided, which may employ a software module or a hardware module, or a combination of both, as part of a computer device, and specifically includes: a task identity determination module 1101, a cooperative terminal determination module 1102, a cooperative task execution module 1103, and a state update module 1104, wherein:
the task identification determining module 1101 is configured to determine, when a task collaboration event is acquired, a task identification corresponding to the task collaboration event.
The collaboration terminal determining module 1102 is configured to determine a target task collaboration terminal according to interface subscription information corresponding to the task identifier; the interface subscription information is used for representing subscription information of the task collaboration terminal on the data reading interface.
And the collaborative task execution module 1103 is configured to send collaborative task trigger information to the target task collaborative terminal, so that the target task collaborative terminal reads target data corresponding to the task collaborative event from a target data reading interface subscribed in advance and executes a corresponding collaborative task according to the target data.
The state updating module 1104 is configured to obtain a task information record table for recording task information of a task collaboration event, and update the task information record table according to an execution state of the task collaboration by the target task collaboration terminal.
In the task execution device, the task cooperation terminal can timely read the corresponding data from the pre-subscribed data reading interface and execute the cooperation task, so that the real-time performance of the cooperation task execution can be ensured, the task cooperation terminal can only read specific data from the pre-subscribed data reading interface instead of acquiring all the data, and the safety of the data can be effectively ensured.
In one 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 can splice the target data template and the target data and execute a corresponding cooperation task according to the spliced data.
In one embodiment, the apparatus further comprises: the receiving feedback receiving module is used for receiving triggering information receiving feedback returned by the target task cooperative terminal; and the state item updating module is used for responding to the trigger information receiving feedback and updating the information sending state item in the task information record table.
In one embodiment, the apparatus further comprises: the abnormality judging module is used for judging that the data transmission abnormality occurs when the information transmission state item is not updated in a preset time period; and the anomaly compensation module is used for triggering a compensation mechanism for transmitting anomalies to the data so as to acquire backup cooperative task trigger information backed up in advance from a backup database and transmit the backup cooperative task trigger information to the target task cooperative terminal.
In one embodiment, the apparatus further comprises: the reading interface acquisition module is used for responding to the task release trigger information when receiving the task release trigger information sent by the task generation terminal, and acquiring an open data reading interface of the task generation terminal; each data reading interface corresponds to different data reading ranges; the open information publishing module is used for subscribing the publishing information according to the data reading interface publishing interface; the subscription request receiving module is used for receiving an interface subscription request sent by the task cooperative terminal in response to the interface subscription release information; the interface subscription request is a subscription request for at least one of the data reading interfaces; and the subscription information generation 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 and taking the task description information as the cooperation task trigger information; the trigger information writing module is used for writing the trigger information of the collaborative task into an event description item of the task information record table; and the state updating module is also used for updating task execution state items in the task information record table according to the execution state of the target task cooperation terminal on the cooperation task.
For specific limitations of the task execution device, reference may be made to the above limitations of the task execution method, and no further description is given here. Each of the modules in the task performing device may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which 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 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing 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 task execution method.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of task execution, the method comprising:
when a task collaboration event is acquired, determining a task identifier corresponding to the task collaboration 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 collaboration terminal on 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data, wherein the target data is change data, and the change data is generated by a task generating terminal and comprises the following steps: the target task cooperative terminal is enabled to combine the change data with basic data to obtain task data for executing the cooperative task, the corresponding cooperative task is executed based on the task data, the basic data are data which are common to executing the cooperative task, and the basic data are read from a memory by the target task cooperative terminal;
And acquiring a task information record table for recording task information of a task collaboration event, and updating the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
2. The method according to claim 1, wherein the sending 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, reading the target data from the target data reading interface and executing the target cooperative task according to the target data.
3. The method according to claim 1, further comprising, after the sending of the cooperative task trigger information to the target task cooperative terminal:
receiving a data template acquisition request sent by the target task cooperative terminal;
and responding to the data template acquisition request, and returning a target data template corresponding to the task identifier to the target task cooperation terminal so that the target task cooperation terminal can splice the target data template and the target data and execute a corresponding cooperation task according to the spliced data.
4. The method according to claim 1, further comprising, after the sending of the cooperative task trigger information to the target task cooperative terminal:
receiving trigger 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 record table.
5. The method according to claim 4, further comprising, after the sending of the cooperative task trigger information to the target task cooperative terminal:
when the information sending state item is not updated in a preset time period, judging that the data sending abnormality occurs;
triggering a compensation mechanism for the abnormal data transmission so as to acquire backup cooperation task trigger information 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 the target task cooperative terminal according to the interface subscription information corresponding to the task identity, further comprises:
when task release trigger information sent by a task generating terminal is received, responding to the task release trigger information, and acquiring an open data reading interface of the task generating terminal; each data reading interface corresponds to different data reading ranges;
Subscribing the publishing information according to the data reading interface publishing interface;
receiving an interface subscription request sent by the task collaboration terminal in response to the interface subscription 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 when the task collaboration event is acquired, after determining the task identifier corresponding to the task collaboration event, the method further includes:
acquiring task description information corresponding to the task cooperation event as the cooperation task trigger information;
writing the collaborative task trigger information into an event description item of the task information record table;
the task information record table is updated according to the execution state of the target task cooperation terminal to the cooperation task, and the task information record table comprises the following steps:
and updating task execution state items in the task information record table according to the execution state of the target task collaboration terminal on the collaboration task.
8. A task execution device, the device comprising:
the task identification determining module is used for determining a task identification corresponding to the task collaboration event when the task collaboration event is acquired;
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 collaboration terminal on the data reading interface;
the cooperative task execution module is 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 target data reading interface subscribed in advance and executes a corresponding cooperative task according to the target data, where the target data is change data, and the change data is generated by a task generating terminal, and includes: the target task cooperative terminal is enabled to combine the change data with basic data to obtain task data for executing the cooperative task, the corresponding cooperative task is executed based on the task data, the basic data are data which are common to executing the cooperative task, and the basic data are read from a memory by the target task cooperative terminal;
the state updating module is used for acquiring a task information recording table for recording task information of the task collaboration event and updating the task information recording table according to the execution state of the target task collaboration terminal on the collaboration task.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements 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 CN112817707A (en) 2021-05-18
CN112817707B true 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)

Families Citing this family (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
CN114202318B (en) * 2022-02-18 2022-05-17 北京明略软件系统有限公司 Method and device for processing collaboration task, electronic equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007081794A2 (en) * 2006-01-06 2007-07-19 Ld Car, Llc D/B/A Convergence Communications System and method for extending the business data associated with a network-based user collaboration tool to include spatial reference information for collaborative visualization
US10210115B2 (en) * 2015-06-02 2019-02-19 Box, Inc. System for handling event messages for file collaboration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
事件驱动、面向服务的物联网服务提供方法;乔秀全;章洋;吴步丹;程渤;赵帅;马华东;陈俊亮;;中国科学:信息科学(第10期);全文 *

Also Published As

Publication number Publication date
CN112817707A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
US11728992B2 (en) Cryptlet binding key graph
US10833858B2 (en) Secure cryptlet tunnel
US11226938B2 (en) Method and system for real-time collaboration and event linking to documents
EP3622687B1 (en) Enclave pool management
EP3622661B1 (en) Cryptlet identity
US10681033B2 (en) Selecting and securing proof delgates for cryptographic functions
CN102456185B (en) Distributed workflow processing method and distributed workflow engine system
US10528722B2 (en) Enclave pool shared key
US10749687B2 (en) Binding version stamp for smart contracts
CN110390525B (en) Direct access method for block chain world state and block chain node
US10664591B2 (en) Enclave pools
CN112817707B (en) Task execution method, device, computer equipment and storage medium
CN110908812B (en) Service data processing method, device, readable storage medium and computer equipment
US11176170B2 (en) Blockchain-based data processing methods and apparatuses and computer devices
CN112100588B (en) Digital seal application method, device and electronic device based on blockchain
WO2014159148A2 (en) Reminder views for facilitating draft reminders
CN111813868B (en) Data synchronization method and device
US20230177015A1 (en) Method and system for real-time collaboration, task linking, and code design and maintenance in software development
CN112416980B (en) Data service processing method, device and equipment
CN111447136B (en) Message pushing method and device, computer equipment and storage medium
WO2020211075A1 (en) Decentralized secure multi-party data processing method and device, and storage medium
CN113095824B (en) Asset management method and device based on block chain and electronic equipment
CN111901228B (en) User group communication method based on address book and electronic equipment
CN117726462A (en) Tax data processing method, tax data processing device, computer equipment and storage medium
CN116302521A (en) Task processing method, task processing device and electronic equipment

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