CN111190717B - Task processing method and system - Google Patents

Task processing method and system Download PDF

Info

Publication number
CN111190717B
CN111190717B CN202010002186.XA CN202010002186A CN111190717B CN 111190717 B CN111190717 B CN 111190717B CN 202010002186 A CN202010002186 A CN 202010002186A CN 111190717 B CN111190717 B CN 111190717B
Authority
CN
China
Prior art keywords
task
processing
server
link
execution result
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
CN202010002186.XA
Other languages
Chinese (zh)
Other versions
CN111190717A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010002186.XA priority Critical patent/CN111190717B/en
Publication of CN111190717A publication Critical patent/CN111190717A/en
Application granted granted Critical
Publication of CN111190717B publication Critical patent/CN111190717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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

Abstract

The embodiment of the disclosure discloses a task processing method and a task processing system. The task processing method comprises the following steps: the method comprises the steps that a task to be processed is obtained, the task to be processed is distributed to a current server to be pre-executed, the current server caches and records the pre-execution result and notifies other servers to pre-execute, a last server generates a processing certificate according to the pre-execution result, the processing certificate is fed back to the last server in the reverse order, the current server which receives the processing certificate adds a link signature to the processing certificate and continues to feed back until the first server, the first server performs solidification and storage according to the pre-execution result and notifies the other servers to perform solidification and storage according to the pre-execution result, so that the processing of the task to be processed is effective, and a system interface feeds back after the task processing is effective. According to the technical scheme, in a complex task processing scene, the consistency and reliability of multi-link data can be improved.

Description

Task processing method and system
Technical Field
The embodiment of the disclosure relates to a computer data processing technology, in particular to a task processing method and a task processing system.
Background
Some tasks triggered by users, such as the application software of a typical e-commerce platform, need to be processed in the existing application software, and the users can initiate order transaction tasks, and the tasks need to be processed and responded by a server.
With the enrichment of functions and the increase of user traffic, the complexity of task processing is increasing. For example, the order transaction tasks are classified into orders initiated by participating in the second killing activity and conventional order transaction tasks, and the different order transaction tasks have different processing strategies and possibly have large concurrent tasks, so that different servers are required for processing, and even a plurality of servers are required for serial sequential processing, and the processing of the latter server depends on the processing result of the former server. Therefore, the server can perform the functions of each server, the processing strategy of each link is simplified, and the development of programmers is facilitated.
The problem with the above solution is that each link of the serial execution needs to keep the data consistent. If a certain server crashes and other faults occur and data is lost, the data of each system is inconsistent, and the phenomenon of error processing results occurs.
Disclosure of Invention
The embodiment of the disclosure provides a task processing method and a task processing system, which are used for considering the processing characteristics of multiple links in a complex task processing scene and improving the data consistency and the reliability.
In a first aspect, an embodiment of the present disclosure provides a method for processing a task, where the method includes:
the system interface acquires a task to be processed;
the system interface distributes the task to be processed to a current link server for pre-execution according to the processing sequence of the task;
the server in the current link carries out cache record on the pre-execution result and notifies the servers in other links to pre-execute the task to be processed;
the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse order of the processing order;
the current link server which receives the processing certificate adds the link signature into the processing certificate, and continues reverse feedback until the first link server;
the first link server performs solidification storage of task processing data according to the pre-execution result and notifies other link servers of solidification storage of task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective;
and the system interface feeds back after the task processing takes effect.
In a second aspect, an embodiment of the present disclosure further provides a task processing system, where the system includes a system interface and at least two link servers, and where:
the system interface is used for acquiring the task to be processed and distributing the task to be processed to the current link server for pre-execution according to the processing sequence of the task;
the current link server is used for caching and recording the pre-execution result and notifying the servers of other links to pre-execute the task to be processed;
the other link servers are used for pre-executing the task to be processed;
the last link server is used for generating a processing certificate according to the pre-execution result and feeding back the processing certificate to the last link server according to the reverse sequence of the processing sequence;
the current link server is used for receiving the processing certificate, adding the link signature to the processing certificate, and continuing reverse feedback until the first link server;
the first link server is used for performing solidification storage of task processing data according to a pre-execution result and notifying other link servers of performing solidification storage of the task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective;
and the system interface is used for feeding back after the task processing is effective.
According to the method and the device for processing the task, the task to be processed is acquired through the system interface, the task to be processed is distributed to the current link server through the system interface to be pre-executed, the current link server caches and records the pre-execution result, the servers of other links are informed of pre-executing the task to be processed, the last link server generates a processing certificate according to the pre-execution result, the processing certificate is fed back to the previous link server according to the reverse order of the processing order, the current link server which receives the processing certificate adds the signature of the link to the processing certificate, and continues to feed back in the reverse order until the first link server, the first link server carries out solidification storage of task processing data according to the pre-execution result, and informs the other link servers of solidification storage of the task processing data according to the pre-execution result, so that the processing of the task to be processed is effective, the system interface feeds back after the task processing is effective, the defect that in the prior serial execution process, due to the fact that data of a certain server is lost due to faults such as dead, the like, the data of each system is inconsistent, and finally the defect of the error processing result is caused, in a complex task processing scene is achieved, the effect of processing of a plurality of links is improved, and the reliability of data is improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1a is an information interaction diagram of a method of processing a task in accordance with a first embodiment of the present disclosure;
FIG. 1b is a flow chart of a method of processing a task in accordance with one embodiment of the present disclosure;
FIG. 2a is an information interaction diagram of a method for processing a task in a second embodiment of the disclosure;
FIG. 2b is a flow chart of a method of processing a task in a second embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a processing system for a task in a third embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Example 1
Fig. 1a is an information interaction diagram of a task processing method according to an embodiment of the present disclosure. The embodiment is applicable to the situation that serial execution of tasks to be processed is required, the method can be executed by a task processing device, the device can be implemented in a software and/or hardware mode, and the device can be configured in computer equipment. As shown in fig. 1a, the method may include:
the system interface acquires a task to be processed; the system interface distributes the task to be processed to the current link server for pre-execution according to the processing sequence of the task; the server in the current link carries out cache record on the pre-execution result and notifies the servers in other links to pre-execute the task to be processed; the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse sequence of the processing sequence; the current link server which receives the processing certificate adds the link signature into the processing certificate, and continues reverse feedback until the first link server; the first link server performs solidification storage of task processing data according to the pre-execution result and notifies other link servers of solidification storage of task processing data according to the pre-execution result so as to enable processing of the task to be processed to be effective; the system interface feeds back after the task processing takes effect.
Fig. 1b is a flowchart of a task processing method according to an embodiment of the present disclosure, where, as shown in fig. 1b, the method may include the following steps:
s110, the system interface acquires a task to be processed.
In this embodiment, the system where the system interface is located may include at least two link servers, each link server may execute operations of a corresponding link, and based on the at least two link servers, the system may perform serial processing operations on tasks initiated by the user. By way of example, the user initiated task may be a general order task (e.g., a task that may purchase transfer tickets) or an event killing task (e.g., a task that may kill daily necessities) or the like. The task initiated by the user can be divided into a plurality of subtasks according to the actual processing process, a sequence exists among the subtasks, and each subtask can correspond to a link server of a corresponding link. The task to be processed in this embodiment may preferably be a task initiated by a user.
The system interface is an interface for receiving a task to be processed. Preferably, the system interface may be disposed in a system background, or may be disposed in each link server that performs serial processing operation. It will be appreciated that if the system interface is disposed in the system background or in the first link server that performs the serial processing operation, the task to be processed received by the system interface may be a task initiated by the user (a task that is not processed by any process). If the system interface is disposed in another link server that performs serial processing operation, the task to be processed received by the system interface may be a task initiated by a user corresponding to the corresponding link server (i.e., a task processed by a server before the corresponding link server).
And S120, the system interface distributes the task to be processed to the current link server for pre-execution according to the processing sequence of the task.
If the system interface is a system interface of a first link server that is disposed in a system background or performs serial processing operation, and the task to be processed is a task initiated by a user (a task that is not processed), then after the system interface obtains the task to be processed, the first link server corresponding to the task to be processed is determined, where the current link server is the first link server. After determining the current link server corresponding to the task to be processed, the control system interface distributes the task to be processed to the current link server. And after receiving the task to be processed, the current link server pre-executes the task to be processed according to a preset processing rule.
If the system interface is a system interface of another link server that is disposed in the system background or performs serial processing operation, and the task to be processed is a task initiated by the user (a task processed by a server before the current link server), after the system interface obtains the task to be processed, a corresponding link server corresponding to the task to be processed is determined, where the current link server is the corresponding link server (it is to be noted here that, when the system includes two link servers, the corresponding link server is the last link server). After determining the current link server corresponding to the task to be processed, the control system interface distributes the task to be processed to the current link server. And after receiving the task to be processed, the current link server pre-executes the task to be processed according to a preset processing rule.
And S130, the server in the current link caches and records the pre-execution result, and informs the servers in other links of pre-executing the task to be processed.
In the prior art, after a current link server processes a task to be processed, the current link server directly stores a processing result into a database. In this embodiment, after the current link server pre-executes the task to be processed according to the preset processing rule, the pre-execution result is not directly stored in the database, but is recorded in the cache. Once a problem occurs in the task processing process, the pre-execution result in the cache can be directly deleted, and the execution of the task initiated by the user is terminated, so that the processing result error corresponding to the task initiated by the user is avoided.
After the current link server finishes processing the current task to be processed, the current link server can directly send the task to be processed after the pretreatment to other link servers (the method needs to be described herein, when the system only has two link servers and the current link server is the last link server, the number of the other link servers is 0, at this time, after the current link server caches the pre-execution result, the current link server can directly execute S140), notify the other link servers to pre-execute the received task to be processed according to the preset processing rule, or send the task to be processed after the pretreatment to a system interface arranged at the other link servers, notify the other link servers to pre-execute the received task to the preset processing rule by the system interface until the last link server records the pre-execution result in the cache.
Preferably, the step of caching and recording the pre-execution result by the current link server and notifying the servers of other links of pre-executing the task to be processed may include: the current link server caches the pre-execution result and notifies the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially notified.
It can be understood that, in the process of notifying the servers of the other links to pre-execute the task to be processed, if there is no dependency relationship between the pre-execution results of the servers of the other links after the current link server, the current link server may notify the servers of the other links in parallel to pre-execute the corresponding task to be processed according to the preset processing rule, so that the servers of the other links execute the pre-execution operation in parallel. It should be noted that, the pre-execution of the other link servers may depend on the pre-execution result of the current link server, or may not depend on the pre-execution result of the current link server.
And S140, the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse order of the processing order.
The processing certificate is a certificate indicating that the last link server is pre-executed. The processing voucher may preferably be a predefined string of characters, which may be a number, a symbol code, or the like, as examples.
In this embodiment, after the execution of the last link server is completed, the last link server generates a processing certificate and sends the processing certificate to the last link server.
And S150, adding the link signature to the processing certificate by the current link server which receives the processing certificate, and continuing reverse feedback until the first link server.
The signature of the link is the unique identity of the server of the link. By way of example, it may be the name of the present link server or the ID address of the present link server, etc. It will be appreciated that the processing voucher also contains the signature of the last link server.
Illustratively, if there are four link servers, the processing voucher includes four link signatures after the first link server adds the present link signature to the processing voucher. If the processing certificate contains all link signatures, the system can normally process the task initiated by the user, and the processing process has no problem.
S160, the first link server performs solidification storage of task processing data according to the pre-execution result, and informs other link servers of solidification storage of task processing data according to the pre-execution result so as to enable processing of the task to be processed to be effective.
The solidification storage is to store the pre-execution result into a database. After all link servers perform solidification storage of task processing data according to the pre-execution result, the task initiated by the user is processed to be effective.
Preferably, the first link server can sequentially inform other link servers of performing solidification storage of the task processing data according to the pre-execution result, and can also concurrently inform other link servers of performing solidification storage of the task processing data according to the pre-execution result. Because each link server completes the pre-execution process, each link server has a corresponding pre-execution result, and therefore, the solidification storage process of each link server can be executed in parallel.
S170, the system interface feeds back after the task processing takes effect.
After the task processing is effective, a system interface of a first link server which is arranged at a system background or performs serial processing operation can be preferable, and a notification of the effective task processing is fed back to a system user. The feedback mode may be generating a page in which task processing takes effect, voice broadcasting, and the like.
Taking a task initiated by a user as a second killing activity, taking a system as an e-commerce platform, setting a system interface on a background of the e-commerce platform, and taking a second killing strategy processing server, an order processing server and a user message notification server as examples according to the sequence of each link server, wherein the processing process of the task is described in detail:
the system interface receives a second killing order initiated by a user, the system interface distributes the second killing order to the second killing strategy processing server, and the second killing strategy processing server inquires whether the inventory database corresponding to commodities participating in second killing has allowance according to the second killing order initiated by the user. If it is determined that there is a margin in the inventory, it is determined that the second kill order can be executed and the order executable is recorded in the cache. And then, the second killing strategy processing server forwards the second killing order to the order processing server, the order processing server reminds the user to execute the order placing operation, the user completes the order placing operation, the second killing order placing is successful, and the user is placed in the cache. And then, the order processing server informs the user that the message notification system is successful in order placement, and the user message notification system generates and records the user message notification system in the cache.
Then, the user message notification system generates a processing certificate "001", adds the server name3 thereof to the processing certificate, and sends the processing certificate to the order processing server and the second killing strategy processing server in reverse order respectively, wherein the order processing server and the second killing strategy processing server add the server names name2 and name1 to the processing certificate respectively, and the finally obtained processing certificate is "001, name3, name2 and name1".
And the second killing strategy processing server performs solidification storage on the order executable, and simultaneously, the order processing server and the user message notification service perform solidification storage on the user ordered page and the order successful page respectively. And finally, feeding back the successful order page to the user through the system interface.
According to the task processing method provided by the embodiment, the task to be processed is acquired through the system interface, the task to be processed is distributed to the current link server for pre-execution according to the processing sequence of the task, the current link server caches and records the pre-execution result and notifies the servers of other links to pre-execute the task to be processed, the last link server generates the processing certificate according to the pre-execution result, the processing certificate is fed back to the last link server according to the reverse sequence of the processing sequence, the current link server which receives the processing certificate adds the current link signature to the processing certificate and continues the reverse sequence feedback until the first link server, the first link server performs solidification and storage of task processing data according to the pre-execution result and notifies other link servers of solidification and storage of the task processing data according to the pre-execution result, so that the processing of the task to be processed is effective, the system interface feeds back after the task processing is effective, the defect that in the prior serial execution process, due to the fact that a certain server is dead and other faults cause data loss, the data are inconsistent, finally, the defect of error processing result is caused, and the processing characteristics of complex task processing scene are achieved, and the reliability of data are improved.
Example two
Fig. 2a is an information interaction diagram of a task processing method according to a second embodiment of the present disclosure. This embodiment may be combined with each of the alternatives of one or more embodiments described above, where the system interface feedback after the task processing is validated includes:
the system interface receives a solidification storage notice fed back by each link server;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
As shown in fig. 2a, the method may include:
the system interface acquires a task to be processed; the system interface distributes the task to be processed to the current link server for pre-execution according to the processing sequence of the task; the server in the current link carries out cache record on the pre-execution result and notifies the servers in other links to pre-execute the task to be processed; the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse sequence of the processing sequence; the current link server which receives the processing certificate adds the link signature into the processing certificate, and continues reverse feedback until the first link server; the first link server performs solidification storage of task processing data according to the pre-execution result and notifies other link servers of solidification storage of task processing data according to the pre-execution result so as to enable processing of the task to be processed to be effective; and the system interface receives the solidification storage notification fed back by the servers of all links, and confirms that the task processing is effective and feeds back the success of the task if the solidification storage notification is successful.
Fig. 2b is a flowchart of a task processing method according to a second embodiment of the present disclosure, where, as shown in fig. 2b, the method may include the following steps:
s210, the system interface acquires a task to be processed.
S220, the system interface distributes the task to be processed to the current link server for pre-execution according to the processing sequence of the task.
And S230, the server in the current link caches and records the pre-execution result, and informs the servers in other links of pre-executing the task to be processed.
S240, the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse order of the processing order.
S250, the current link server which receives the processing certificate adds the link signature to the processing certificate, and the reverse feedback is continued until the first link server.
S260, the first link server performs solidification storage of task processing data according to the pre-execution result, and informs other link servers of solidification storage of task processing data according to the pre-execution result so as to enable processing of the task to be processed to be effective.
S270, the system interface receives the solidification storage notification fed back by the servers of all links, and if the solidification storage notification is successful, the system interface confirms that the task processing is effective and feeds back the success of the task.
In this embodiment, after each link server performs the solidification storage of the task processing data according to the pre-execution result, a solidification storage notification is sent to the system interface, where the solidification storage notification may be a notification of success of solidification storage or a notification of failure of solidification storage. If the system interface receives a notification that at least one of the cure stores is not in effect, a task processing failure may be confirmed. If all the solidification stores received by the system interface are notifications of successful solidification stores, the task processing effect can be confirmed, and the success of the task is fed back.
According to the task processing method provided by the embodiment, the task to be processed is acquired through the system interface, the task to be processed is distributed to the current link server for pre-execution according to the processing sequence of the task, the current link server caches the pre-execution result and informs the servers of other links to pre-execute the task to be processed, the last link server generates a processing certificate according to the pre-execution result, the processing certificate is fed back to the previous link server according to the reverse sequence of the processing sequence, the current link server which receives the processing certificate adds the current link signature to the processing certificate and continues the reverse sequence feedback until the first link server, the first link server performs the solidification storage of the task processing data according to the pre-execution result and informs the other link servers of the solidification storage of the task processing data according to the pre-execution result, so that the processing of the task to be processed takes effect, the system interface receives the solidification storage notification fed back by each link server, if the solidification storage notification is successful, the task processing effect is confirmed, the task feedback success is overcome, the problem that in the prior serial execution process, the data is lost due to the failure of a certain server, the failure of a dead machine, the like, the final system data is not consistent, the processing result is achieved, the quality of the processing result is further complicated, and the processing result is further achieved, and the processing effect of the processing of the data is more than the failure is achieved.
On the basis of the above embodiments, further comprising: if the system interface confirms that the task processing is not effective, the feedback task fails.
Preferably, if the system interface receives at least one notification of the solidification storage failure, it can be confirmed that the task processing is not effective, and at this time, the system interface can feed back the task failure to the user by generating a task failure page or a voice broadcasting mode.
On the basis of the above embodiments, further comprising: and if the system interface confirms that the task processing is not effective, sending a task pre-execution cancellation notice to each link server.
Preferably, each link server deletes the corresponding pre-execution result in the cache after receiving the task pre-execution cancellation notification.
Example III
Fig. 3 is a schematic structural diagram of a task processing system according to a third embodiment of the present disclosure. The embodiment is applicable to the situation that serial execution of tasks to be processed is required. The system may be implemented in software and/or hardware. As shown in fig. 3, the system may include a system interface and at least two link servers:
the system interface 310 is configured to obtain a task to be processed, and distribute the task to be processed to a current link server for pre-execution according to a processing sequence of the task;
the current link server 320 is configured to cache the pre-execution result and notify the servers of other links to pre-execute the task to be processed;
the other link server 330 is configured to pre-execute a task to be processed;
the last link server 340 is configured to generate a processing certificate according to the pre-execution result, and feed back the processing certificate to the last link server according to the reverse order of the processing order;
the current link server 320 is configured to receive the processing certificate, add the signature of the link to the processing certificate, and continue the reverse feedback until the first link server;
the first link server 350 is configured to perform solidification storage of task processing data according to a pre-execution result, and notify other link servers to perform solidification storage of task processing data according to the pre-execution result, so as to enable the processing of the task to be processed to be effective;
the system interface 310 is used for feeding back after the task processing takes effect.
According to the task processing system provided by the embodiment, the task to be processed is acquired by utilizing the system interface, the task to be processed is distributed to the current link server for pre-execution according to the processing sequence of the task, the pre-execution result is cached and recorded by utilizing the current link server, and servers of other links are notified to pre-execute the task to be processed; executing the task to be processed in advance by using servers in other links; generating a processing certificate by using the last link server according to the pre-execution result, and feeding back the processing certificate to the last link server according to the reverse sequence of the processing sequence; receiving the processing certificate by using the current link server, adding the link signature into the processing certificate, and continuing reverse feedback until the first link server; the first link server is utilized to carry out solidification storage of task processing data according to the pre-execution result, and other link servers are informed to carry out solidification storage of task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective; the system interface is utilized to feed back after the task processing is effective, so that the defects of inconsistent data of each system and finally incorrect processing results caused by data loss caused by the failure such as halt of a certain server in the existing serial execution process are overcome, and the effects of considering the processing characteristics of multiple links in a complex task processing scene and improving the consistency and reliability of the data are achieved.
Based on the above technical solution, optionally, the system interface 310 may be specifically configured to receive a solidification storage notification fed back by each link server;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
Based on the above technical solution, optionally, the system interface 310 may further be configured to:
if the confirmation task processing is not effective, the feedback task fails.
Based on the above technical solution, optionally, the system interface 310 may further be configured to: and if the system interface confirms that the task processing is not effective, sending a task pre-execution cancellation notice to each link server.
Based on the above technical solution, optionally, the current link server 320 may be specifically configured to:
and carrying out cache record on the pre-execution result, and notifying the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially notified.
Based on the above technical solution, optionally, the first link server 350 may specifically be configured to:
and notifying other link servers in parallel to perform solidification storage of task processing data according to the pre-execution result.
On the basis of the technical scheme, the server at least comprises the following links: the second killing strategy processing server, the order processing server and the user message notification server.
The task processing system provided by the embodiment of the disclosure can execute the task processing method provided by the embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
According to one or more embodiments of the present disclosure, example one provides a method for processing a task, including:
the system interface acquires a task to be processed;
the system interface distributes the task to be processed to the current link server for pre-execution according to the processing sequence of the task;
the server in the current link carries out cache record on the pre-execution result and notifies the servers in other links to pre-execute the task to be processed;
the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse sequence of the processing sequence;
the current link server which receives the processing certificate adds the link signature into the processing certificate, and continues reverse feedback until the first link server;
the first link server performs solidification storage of task processing data according to the pre-execution result and notifies other link servers of solidification storage of task processing data according to the pre-execution result so as to enable processing of the task to be processed to be effective;
the system interface feeds back after the task processing takes effect.
According to one or more embodiments of the present disclosure, an example two provides a method for processing a task, and based on the method for processing a task in the example one, the feedback performed by the system interface after the task processing is effective includes:
the system interface receives a solidification storage notice fed back by each link server;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
According to one or more embodiments of the present disclosure, an example three provides a method for processing a task, and further includes, on the basis of the method for processing a task of example one or example two:
if the system interface confirms that the task processing is not effective, the feedback task fails.
According to one or more embodiments of the present disclosure, an example four provides a task processing method, and further includes, on the basis of the task processing method of the example three:
and if the system interface confirms that the task processing is not effective, sending a task pre-execution cancellation notice to each link server.
According to one or more embodiments of the present disclosure, an example fifth provides a task processing method, based on the task processing method of the example first, the current link server performing cache recording on a pre-execution result, and notifying servers of other links to pre-execute a task to be processed, including:
the current link server caches the pre-execution result and notifies the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially notified.
According to one or more embodiments of the present disclosure, an example six provides a task processing method, on the basis of the task processing method of the example one, the first link server notifying the other link servers to perform solidification storage of task processing data according to a pre-execution result includes:
and the first link server informs other link servers in parallel to carry out solidification storage of task processing data according to the pre-execution result.
According to one or more embodiments of the present disclosure, an example seventh provides a method for processing a task, which includes, based on the method for processing a task in example one, at least a server including: the second killing strategy processing server, the order processing server and the user message notification server.
According to one or more embodiments of the present disclosure, example eight provides a processing system for a task, comprising a system interface and at least two link servers, wherein:
the system interface is used for acquiring the task to be processed and distributing the task to be processed to the current link server for pre-execution according to the processing sequence of the task;
the current link server is used for caching and recording the pre-execution result and notifying the servers of other links of pre-executing the task to be processed;
the other link servers are used for pre-executing the tasks to be processed;
the last link server is used for generating a processing certificate according to the pre-execution result and feeding back the processing certificate to the last link server according to the reverse sequence of the processing sequence;
the current link server is used for receiving the processing certificate, adding the link signature into the processing certificate, and continuing reverse feedback until the first link server;
the first link server is used for carrying out solidification storage on the task processing data according to the pre-execution result and notifying other link servers of carrying out solidification storage on the task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective;
and the system interface is used for feeding back after the task processing is effective.
According to one or more embodiments of the present disclosure, an example nine provides a task processing system, and on the basis of the task processing system of the example eight, a system interface is configured to receive a solidification storage notification fed back by each link server;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
In accordance with one or more embodiments of the present disclosure, example ten provides a processing system for a task, the system interface further configured to, on the basis of the processing system for the task of example eight or nine:
if the confirmation task processing is not effective, the feedback task fails.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A method of processing a task, the method comprising:
the system interface acquires a task to be processed;
the system interface distributes the task to be processed to a current link server for pre-execution according to the processing sequence of the task;
the current link server caches the pre-execution result, informs the servers of other links of pre-executing the task to be processed, and records the pre-execution result in the cache until the last link server records the pre-execution result in the cache;
the last link server generates a processing certificate according to the pre-execution result, and feeds back the processing certificate to the last link server according to the reverse order of the processing order;
the current link server which receives the processing certificate adds the link signature into the processing certificate, and continues reverse feedback until the first link server;
the first link server performs solidification storage of task processing data according to the pre-execution result and notifies other link servers of solidification storage of task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective;
and the system interface feeds back after the task processing takes effect.
2. The method of claim 1, wherein the system interface feeding back after the task processing is validated comprises:
the system interface receives a solidification storage notice fed back by each link server;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
3. The method according to claim 1 or 2, further comprising:
if the system interface confirms that the task processing is not effective, the feedback task fails.
4. A method according to claim 3, further comprising:
and if the system interface confirms that the task processing is not effective, sending a task pre-execution cancellation notice to each link server.
5. The method of claim 1, wherein the current link server buffering the pre-execution result and notifying the servers of the other links to pre-execute the task to be processed comprises:
and the current link server caches and records the pre-execution result and notifies the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially notified.
6. The method of claim 1, wherein the first link server notifying other link servers of the solidified storage of the task processing data according to the pre-execution result comprises:
and the first link server informs other link servers in parallel to carry out solidification storage of task processing data according to the pre-execution result.
7. The method according to claim 1, characterized by a server comprising at least the following links: the second killing strategy processing server, the order processing server and the user message notification server.
8. A processing system for tasks for performing the method of any of claims 1-7, characterized in that the system comprises a system interface and at least two link servers, wherein:
the system interface is used for acquiring the task to be processed and distributing the task to be processed to the current link server for pre-execution according to the processing sequence of the task;
the current link server is used for caching and recording the pre-execution result, notifying the servers of other links to pre-execute the task to be processed, and recording the pre-execution result into the cache until the last link server records the pre-execution result into the cache;
the other link servers are used for pre-executing the task to be processed;
the last link server is used for generating a processing certificate according to the pre-execution result and feeding back the processing certificate to the last link server according to the reverse sequence of the processing sequence;
the current link server is used for receiving the processing certificate, adding the link signature to the processing certificate, and continuing reverse feedback until the first link server;
the first link server is used for performing solidification storage of task processing data according to a pre-execution result and notifying other link servers of performing solidification storage of the task processing data according to the pre-execution result so as to enable the processing of the task to be processed to be effective;
and the system interface is used for feeding back after the task processing is effective.
9. The system of claim 8, wherein the system interface is configured to receive a notification of the solidification storage of the link server feedback;
and if the solidification storage notification is successful, confirming that the task processing is effective, and feeding back the success of the task.
10. The system of claim 8 or 9, wherein the system interface is further configured to:
if the confirmation task processing is not effective, the feedback task fails.
CN202010002186.XA 2020-01-02 2020-01-02 Task processing method and system Active CN111190717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010002186.XA CN111190717B (en) 2020-01-02 2020-01-02 Task processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010002186.XA CN111190717B (en) 2020-01-02 2020-01-02 Task processing method and system

Publications (2)

Publication Number Publication Date
CN111190717A CN111190717A (en) 2020-05-22
CN111190717B true CN111190717B (en) 2023-04-25

Family

ID=70708105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010002186.XA Active CN111190717B (en) 2020-01-02 2020-01-02 Task processing method and system

Country Status (1)

Country Link
CN (1) CN111190717B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086283B (en) * 2022-05-18 2024-02-06 阿里巴巴(中国)有限公司 Voice stream processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108062249A (en) * 2017-12-11 2018-05-22 成都博睿德科技有限公司 High in the clouds data allocation schedule method based on big data
CN110175172A (en) * 2019-05-22 2019-08-27 深圳大学 Very big two points of groups parallel enumerating method based on sparse bipartite graph
CN110413421A (en) * 2019-06-28 2019-11-05 阿里巴巴集团控股有限公司 Business data processing method and device, transaction data processing method and device
CN110457126A (en) * 2019-08-13 2019-11-15 杭州有赞科技有限公司 A kind of asynchronous invoking method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009020692A (en) * 2007-07-11 2009-01-29 Toshiba Corp Task management device, task management method, and task management program
US9164806B2 (en) * 2011-01-28 2015-10-20 Oracle International Corporation Processing pattern framework for dispatching and executing tasks in a distributed computing grid

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108062249A (en) * 2017-12-11 2018-05-22 成都博睿德科技有限公司 High in the clouds data allocation schedule method based on big data
CN110175172A (en) * 2019-05-22 2019-08-27 深圳大学 Very big two points of groups parallel enumerating method based on sparse bipartite graph
CN110413421A (en) * 2019-06-28 2019-11-05 阿里巴巴集团控股有限公司 Business data processing method and device, transaction data processing method and device
CN110457126A (en) * 2019-08-13 2019-11-15 杭州有赞科技有限公司 A kind of asynchronous invoking method and system

Also Published As

Publication number Publication date
CN111190717A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN110968586B (en) Distributed transaction processing method and device
CN110941446B (en) Version release method and device based on multi-environment offline task
US7454751B2 (en) Fault-tolerant system and methods with trusted message acknowledgement
US8069140B2 (en) Systems and methods for mirroring the provision of identifiers
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
US20220051187A1 (en) System and method for anomaly detection and deduplication of electronic data feeds
CN107612950B (en) Method, device and system for providing service and electronic equipment
CN107045676B (en) Logistics circulation message processing method and device
US20110179304A1 (en) Systems and methods for multi-tenancy in contact handling systems
US20090187656A1 (en) Method, system, and apparatus for scheduling pattern based web services
JP2013171301A (en) Device, method, and program for job continuation management
CN108428074A (en) A kind of processing method and processing device cancelled an order in order honours an agreement flow
CN107688489B (en) Method and system for scheduling tasks
CN111190717B (en) Task processing method and system
CN109978290A (en) A kind of operation flow backspacing processing method of extensive makeup, flow engine and operation system
US7533383B2 (en) Method, system, and apparatus for scheduling pattern based web services
CN111311254A (en) Service processing method, device and system based on block chain
CN110381077A (en) For the treating method and apparatus of digital certificate
CN113641384A (en) Probe upgrading management method, device and system
CN111143041B (en) Data consistency method, distributed coordinator and central coordinator
CN115131067A (en) Data processing method and device, electronic equipment and storage medium
CN112231601A (en) Link management method, device, equipment and computer storage medium
CN116069868B (en) Distributed flexible transaction processing method and device based on enterprise microservice
CN116302619B (en) Cross-site multi-activity processing method, device, apparatus and storage medium
CN116010126B (en) Service aggregation method, device and system

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