CN111190717A - Task processing method and system - Google Patents

Task processing method and system Download PDF

Info

Publication number
CN111190717A
CN111190717A CN202010002186.XA CN202010002186A CN111190717A CN 111190717 A CN111190717 A CN 111190717A CN 202010002186 A CN202010002186 A CN 202010002186A CN 111190717 A CN111190717 A CN 111190717A
Authority
CN
China
Prior art keywords
processing
task
server
link
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010002186.XA
Other languages
Chinese (zh)
Other versions
CN111190717B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)
  • Retry When Errors Occur (AREA)

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 of obtaining tasks to be processed, distributing the tasks to be processed to a current server for pre-execution, caching and recording a pre-execution result by the current server, informing other servers of pre-execution, generating a processing certificate by the last server according to the pre-execution result, feeding back the processing certificate to the last server in a reverse order, adding a signature of the current link to the processing certificate by the current server receiving the processing certificate, feeding back the signature continuously until the first server, carrying out curing storage by the first server according to the pre-execution result, and informing other servers of curing storage according to the pre-execution result so as to enable the processing of the tasks to be processed to take effect, and feeding back by a system interface after the task processing takes effect. According to the technical scheme, the consistency and the reliability of multi-link data can be improved in a complex task processing scene.

Description

Task processing method and system
Technical Field
The embodiment of the disclosure relates to computer data processing technology, and in particular, to a task processing method and system.
Background
Some tasks triggered by users need to be processed in existing application software, for example, the application software of an e-commerce platform is typical, and users can initiate order transaction tasks and need servers to process and respond.
With the richness of functions and the increase of user traffic, the complexity of task processing is higher and higher. For example, as order trading tasks, orders initiated by taking part in killing activity of seconds and regular order trading tasks are distinguished, and the order trading tasks in different categories need different servers for processing due to different processing strategies and possibly large concurrency of tasks, and even need a plurality of servers for processing in series and in sequence, and the processing of the latter server depends on the processing result of the former server. Therefore, the server can perform its own functions, the processing strategy of each link is simplified, and the development of programmers is facilitated.
The problem with the above scheme is that each link of serial execution needs to keep 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 wrong processing results occurs.
Disclosure of Invention
The embodiment of the disclosure provides a task processing method and system, so as to take account of multi-link processing characteristics and improve data consistency and reliability in a complex task processing scene.
In a first aspect, an embodiment of the present disclosure provides a method for processing a task, where the method includes:
a system interface acquires a task to be processed;
the system interface distributes the tasks to be processed to a current link server for pre-execution according to the processing sequence of the tasks;
the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed;
the last link server generates a processing voucher according to the pre-execution result, and feeds the processing voucher back to the last link server according to the reverse order of the processing order;
the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues reverse order feedback until the first link server;
the first link server carries out solidification storage on the task processing data according to the pre-execution result and informs other link servers to carry 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 feeds back after the task processing is effective.
In a second aspect, an embodiment of the present disclosure further provides a task processing system, where the task processing system includes a system interface and at least two link servers, where:
the system interface is used for acquiring the tasks to be processed and distributing the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks;
the current link server is used for caching and recording the pre-execution result and informing servers of other links to pre-execute the task to be processed;
the other link server is used for pre-executing the task to be processed;
the last link server is used for generating a processing voucher according to the pre-execution result and feeding back the processing voucher to the last link server according to the reverse order of the processing order;
the current link server is used for receiving the processing certificate, adding the current link signature to the processing certificate, and continuing reverse order feedback until the current link server is the first link server;
the first link server is used for performing solidification storage on the task processing data according to the pre-execution result and informing other link servers of performing 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.
The embodiment of the disclosure obtains the task to be processed through a system interface, 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 and records the pre-execution result and informs 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 receiving the processing certificate adds the signature of the current link to the processing certificate and continues the reverse 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 servers of other links to perform the 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 take effect, the system interface feeds back after the task processing becomes effective, overcomes the defects that in the prior serial execution process, data loss is caused by the faults of a certain server, such as crash, and the like, so that the data of each system are inconsistent, and finally the error processing result is caused, and achieves the effects of considering the processing characteristics of multiple links and improving the data consistency and reliability in a complex task processing scene.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1a is an information interaction diagram of a processing method of a task in a first embodiment of the disclosure;
FIG. 1b is a flowchart of a method for processing a task in the first embodiment of the disclosure;
FIG. 2a is an information interaction diagram of a task processing method in the second embodiment of the disclosure;
FIG. 2b is a flowchart of a task processing method in the second embodiment of the 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 are shown in the 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 rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the 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. Moreover, 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 "include" and variations thereof as used herein are 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". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Example one
Fig. 1a is an information interaction diagram of a task processing method according to a first embodiment of the present disclosure. The embodiment may be applicable to a case where serial execution of a task to be processed is required, and the method may be performed by a processing apparatus of the task, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be configured in a computer device. As shown in fig. 1a, the method may include:
a system interface acquires a task to be processed; the system interface distributes the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks; the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed; the last link server generates a processing voucher according to the pre-execution result, and feeds back the processing voucher to the last link server according to the reverse order of the processing order; the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues to feed back in a reverse order until the first link server; the first link server carries out solidification storage on the task processing data according to the pre-execution result and informs other link servers to carry 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 feeds back after the task processing is effective.
Fig. 1b is a flowchart of a task processing method according to a first embodiment of the disclosure, and as shown in fig. 1b, the method may include the following steps:
and S110, acquiring the task to be processed by the system interface.
In this embodiment, the system where the system interface is located may include at least two link servers, each link server may perform an operation of a corresponding link, and based on the at least two link servers, the system may perform a serial processing operation on a task initiated by a user. For example, the user-initiated task may be a general order task (e.g., may be a task of purchasing a transfer ticket) or an activity second killing task (e.g., may be a task of second killing daily supplies), and so on. The task initiated by the user can be divided into a plurality of subtasks according to the actual processing process, the sequence exists between each subtask, 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 the task to be processed. Preferably, the system interface may be disposed in the system background, or may be disposed in each link server performing the serial processing operation. It is understood that, if the system interface is disposed in the system background or in the first link server performing serial processing operation, the task to be processed received by the system interface may be a task initiated by the user (a task without any processing). If the system interface is set in another link server performing the 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, distributing the tasks to be processed to the current link server by the system interface according to the processing sequence of the tasks for pre-execution.
Illustratively, if the system interface is a system interface of a first link server that is arranged 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), after the system interface acquires the task to be processed, a first link server corresponding to the task to be processed is determined, and at this time, the current link server is the first link server. And 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 performs pre-execution on 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 set in a system background or performs serial processing operation, and the task to be processed is a task initiated by a user (a task processed by a server before the current link server), after the system interface acquires the task to be processed, a corresponding link server corresponding to the task to be processed is determined, and at this time, the current link server is the corresponding link server (it should be noted here that, when the system includes two link servers, the corresponding link server is the last link server). And 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 performs pre-execution on the task to be processed according to a preset processing rule.
And S130, the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed.
Currently, after a current link server processes a task to be processed, the current link server directly stores a processing result in a database. In this embodiment, after the current link server performs pre-execution on 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 preprocessing to other link servers (it should be noted here that when the system only has two link servers and the current link server is the last link server, the number of other link servers is 0, at this time, the current link server can directly execute S140 after caching and recording the pre-execution result, notify the other link servers to pre-execute the received task to be processed according to the preset processing rule, or notify the other link servers to pre-execute the received task to be processed according to the preset processing rule by sending the pre-processed task to the system interface of the other link servers, and transmit the pre-processed task to the other link servers by the system interface, and recording the pre-execution result into a cache until the last link server records the pre-execution result into the cache.
Preferably, the caching and recording the pre-execution result by the server in the current link, and informing the server in the other link to pre-execute the task to be processed may include: and the current link server caches and records the pre-execution result and informs the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially informed.
It can be understood that, in the process of notifying the servers of other links to perform pre-execution on the tasks to be processed, if there is another link server behind the current link server and there is no dependency relationship between pre-execution results thereof, the current link server may concurrently notify the other link servers to perform pre-execution on the corresponding tasks to be processed according to the preset processing rule, so that the other link servers perform pre-execution operations concurrently. It should be noted that the pre-execution of the other link server may 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.
Wherein, the processing voucher is a voucher representing that the last link server completes pre-execution. The processing credentials may preferably be a predefined string of characters, which may be, for example, a number, a symbol code, or the like.
In this embodiment, after the pre-execution is completed, the last link server generates a processing certificate, and sends the processing certificate to the previous link server.
S150, the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues the reverse order feedback until the first link server.
The link signature is the only identity of the server in the link. Illustratively, it may be the name of the link server or the ID address of the link server, etc. It will be appreciated that the processing voucher also includes the signature of the last link server.
Illustratively, if there are four link servers, the processing certificate contains four link signatures after the first link server adds the current link signature to the processing certificate. If the processing certificate contains all the link signatures, the system can normally process the tasks initiated by the user, and the processing process has no problem.
And S160, the first link server performs solidification storage of the task processing data according to the pre-execution result, and informs other link servers to perform 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 solidification storage is to store the pre-execution result into a database. And after all link servers perform solidification storage of the task processing data according to the pre-execution result, the processing of the task initiated by the user is effective.
Preferably, the first link server may sequentially notify other link servers to perform the solidification storage of the task processing data according to the pre-execution result, or may concurrently notify other link servers to perform the solidification storage of the task processing data according to the pre-execution result. Because each link server completes the pre-execution process and each link server has a corresponding pre-execution result, the solidification storage process of each link server can be executed in parallel.
And S170, feeding back the system interface after the task processing is effective.
After the task processing is effective, it may be preferably a system interface of a first link server that is disposed in a system background or performs serial processing operation, and the notification that the task processing is effective is fed back to the system user. The feedback mode may be to generate a page in which the task processing is effective, or to perform voice broadcast.
Taking a task initiated by a user as a second killing activity, a system as an e-commerce platform, a system interface arranged in a background of the e-commerce platform, and each link server comprising a second killing strategy processing server, an order processing server and a user message notification server in sequence as an example, the processing process of the task is explained in detail:
the system interface receives a killing-by-second order initiated by a user, the system interface distributes the killing-by-second order to the killing-by-second strategy processing server, and the killing-by-second strategy processing server inquires whether a stock database corresponding to commodities participating in killing by second has a margin or not according to the killing-by-second order initiated by the user. If the stock is determined to be in a margin, the execution of the killing-by-second order is determined, and the executable order is recorded in the cache. And then, the second order killing strategy processing server forwards the second order killing order to the order processing server, the order processing server reminds the user to execute order placing operation, and if the user finishes the order placing operation, the second order killing order placing is successful, and the order placed by the user is recorded in the cache. And then, the order processing server informs the user of the success of ordering by the information notification system, and the user information notifies the system to generate and record in the cache.
Then, the user message notification system generates a processing voucher '001', adds the server name3 into the processing voucher, and respectively sends the processing voucher to the order processing server and the second-killing policy processing server in a reverse order, the order processing server and the second-killing policy processing server respectively add the server names name2 and name1 into the processing voucher, and the finally obtained processing voucher is '001, name3, name2, and name 1'.
And then, the second killing strategy processing server carries out curing storage on the order executable, and simultaneously, the order processing server and the user message notification service respectively carry out curing storage on the user order placed page and the order placing success page. And finally, feeding back the ordering success page to the user through a system interface.
In the task processing method provided by this embodiment, a system interface is used to obtain a task to be processed, the system interface allocates 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 caches and records a pre-execution result and notifies servers of other links to pre-execute the task to be processed, a last link server generates a processing certificate according to the pre-execution result, feeds back the processing certificate to the previous link server according to a reverse sequence of the processing sequence, the current link server receiving the processing certificate adds a current link signature to the processing certificate and continues the reverse sequence feedback until the first link server performs solidified storage of task processing data according to the pre-execution result and notifies servers of other links to perform solidified storage of the task processing data according to the pre-execution result, the method has the advantages that the processing of the tasks to be processed is enabled to be effective, the system interface feeds back after the task processing is enabled to be effective, the defects that in the existing serial execution process, due to the fact that data are lost due to the fact that a certain server is halted and the like, the data of each system are inconsistent, and finally the error processing result is caused are overcome, the method achieves the effect of considering the processing characteristics of multiple links in a complex task processing scene, and improves the data consistency and reliability.
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 optional solution in one or more of the above embodiments, and in this embodiment, the feeding back, by the system interface, after the task processing is effective includes:
a system interface receives a solidification storage notice fed back by each link server;
and if the solidified 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:
a system interface acquires a task to be processed; the system interface distributes the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks; the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed; the last link server generates a processing voucher according to the pre-execution result, and feeds back the processing voucher to the last link server according to the reverse order of the processing order; the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues to feed back in a reverse order until the first link server; the first link server carries out solidification storage on the task processing data according to the pre-execution result and informs other link servers to carry 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 receives the solidification storage notice fed back by the server in each link, if the solidification storage notice is successful, the task processing is confirmed to be effective, and the success of the task is fed back.
Fig. 2b is a flowchart of a task processing method provided in the second embodiment of the present disclosure, and as shown in fig. 2b, the method may include the following steps:
s210, the system interface acquires the task to be processed.
And S220, distributing the tasks to be processed to the current link server by the system interface according to the processing sequence of the tasks for pre-execution.
And S230, the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the tasks to be processed.
And 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.
And S250, adding the current link signature to the processing certificate by the current link server receiving the processing certificate, and continuing to feed back in a reverse order until the first link server.
And S260, the first link server performs solidification storage on the task processing data according to the pre-execution result and informs other link servers to perform 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 S270, the system interface receives the solidification storage notification fed back by the server in each link, if the solidification storage notification is successful, the task processing is confirmed to be effective, and the success of the task is fed back.
In this embodiment, after performing the solidification storage of the task processing data according to the pre-execution result, each link server sends a solidification storage notification to the system interface, where the solidification storage notification may be a notification that the solidification storage is successful or a notification that the solidification storage is failed. If the system interface receives a notification that at least one solidified store is not in effect, a task processing failure may be confirmed. If all the curing storages received by the system interface are notifications that the curing storage is successful, the task processing can be confirmed to be effective, and the success of the task is fed back.
In the task processing method provided by this embodiment, a system interface is used to obtain a task to be processed, the system interface allocates 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 caches and records a pre-execution result and notifies servers of other links to pre-execute the task to be processed, a last link server generates a processing certificate according to the pre-execution result, feeds back the processing certificate to the previous link server according to a reverse sequence of the processing sequence, the current link server receiving the processing certificate adds a current link signature to the processing certificate and continues the reverse sequence feedback until the first link server performs solidified storage of task processing data according to the pre-execution result and notifies servers of other links to perform solidified storage of the task processing data according to the pre-execution result, the method and the system have the advantages that the processing of the tasks to be processed is enabled to be effective, the system interface receives the solidification storage notification fed back by the server in each link, if the solidification storage notification is successful, the task processing is confirmed to be effective, and the successful feedback of the tasks is fed back, so that the defects that in the existing serial execution process, data loss is caused by the fact that a certain server is halted and the like, data of each system is inconsistent, and finally an error processing result is caused are overcome, the processing characteristics of multiple links are considered in a complex task processing scene, and the data consistency and the reliability are further improved.
On the basis of the above embodiments, the method further includes: and if the system interface confirms that the task processing is not effective, feeding back the task failure.
Preferably, if the system interface receives at least one notification of the failed solidification storage, it may be determined that the task processing is not in effect, and at this time, the system interface may feed back the task failure to the user by generating a task failure page or by voice broadcasting.
On the basis of the above embodiments, the method further includes: and if the system interface confirms that the task processing is not effective, sending a task pre-execution revocation notification to each link server.
Preferably, after receiving the task pre-execution revocation notification, each link server deletes the corresponding pre-execution result in the cache.
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 can be suitable for the condition that the tasks to be processed need to be executed in series. 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 used for acquiring the tasks to be processed, and distributing the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks;
the current link server 320 is used for caching and recording the pre-execution result and informing servers of other links to pre-execute the tasks to be processed;
the other link server 330 is used for pre-executing the task to be processed;
the last link server 340 is used for generating a processing voucher according to the pre-execution result and feeding back the processing voucher to the previous link server according to the reverse order of the processing order;
the current link server 320 is used for receiving the processing certificate, adding the current link signature to the processing certificate, and continuing the reverse order feedback until the first link server;
the first link server 350 is configured to perform the solidification storage of the task processing data according to the pre-execution result, and notify other link servers to perform the solidification storage of the task processing data according to the pre-execution result, so that the processing of the to-be-processed task is effective;
and the system interface 310 is used for feeding back after the task processing is effective.
In the task processing system provided by this embodiment, a system interface is used to fetch a task to be processed, the task to be processed is allocated to a current link server for pre-execution according to a processing sequence of the task, a pre-execution result is cached and recorded by the current link server, and servers of other links are notified to pre-execute the task to be processed; pre-executing the tasks to be processed by utilizing servers of other links; generating a processing voucher by using the last link server according to the pre-execution result, and feeding back the processing voucher to the previous link server according to the reverse order of the processing order; receiving a processing certificate by using a current link server, adding a local link signature to the processing certificate, and continuing reverse order feedback until a first link server; utilizing the first link server to perform solidification storage of the task processing data according to the pre-execution result, and informing other link servers to perform 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 take effect; the system interface is used for feeding back after the task processing becomes effective, the defects that in the existing serial execution process, data loss is caused by faults such as crash of a certain server and the like, so that data of each system are inconsistent, and finally, an error processing result is caused are overcome, the processing characteristics of multiple links are considered in a complex task processing scene, and the data consistency and reliability are improved.
On the basis of the above technical solution, optionally, the system interface 310 may be specifically configured to receive a solidified storage notification fed back by each link server;
and if the solidified storage notification is successful, confirming that the task processing is effective and feeding back the success of the task.
On the basis of the above technical solution, optionally, the system interface 310 may further be configured to:
if it is confirmed that the task processing is not in effect, the feedback task fails.
On the basis of 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 revocation notification to each link server.
On the basis of the above technical solution, optionally, the current link server 320 may be specifically configured to:
and caching and recording the pre-execution result, and informing the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially informed.
On the basis of the above technical solution, optionally, the first link server 350 may be specifically configured to:
and parallelly informing other links of the server to perform solidification storage of the task processing data according to the pre-execution result.
On the basis of the above technical solution, optionally, the server at least includes the following links: the system comprises a second killing strategy processing server, an order processing server and a 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 corresponding functional modules and beneficial effects of the execution method.
According to one or more embodiments of the present disclosure, an example provides a method for processing a task, including:
a system interface acquires a task to be processed;
the system interface distributes the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks;
the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed;
the last link server generates a processing voucher according to the pre-execution result, and feeds back the processing voucher to the last link server according to the reverse order of the processing order;
the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues to feed back in a reverse order until the first link server;
the first link server carries out solidification storage on the task processing data according to the pre-execution result and informs other link servers to carry 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 feeds back after the task processing is effective.
According to one or more embodiments of the present disclosure, example two provides a method for processing a task, and on the basis of the method for processing the task of example one, the feedback performed by the system interface after the task processing is effective includes:
a system interface receives a solidification storage notice fed back by each link server;
and if the solidified 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, example three provides a processing method of a task, and on the basis of the processing method of the task of example one or example two, the processing method further includes:
and if the system interface confirms that the task processing is not effective, feeding back the task failure.
According to one or more embodiments of the present disclosure, example four provides a processing method of a task, and on the basis of the processing method of the task of example three, the processing method further includes:
and if the system interface confirms that the task processing is not effective, sending a task pre-execution revocation notification to each link server.
According to one or more embodiments of the present disclosure, example five provides a task processing method, and on the basis of the task processing method of example one, the current link server caches and records the pre-execution result, and notifies servers of other links to pre-execute the to-be-processed task, including:
and the current link server caches and records the pre-execution result and informs the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially informed.
According to one or more embodiments of the present disclosure, example six provides a task processing method, and on the basis of the task processing method of example one, the step of informing, by a first link server, other link servers of performing 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 perform solidification storage of the task processing data according to the pre-execution result.
According to one or more embodiments of the present disclosure, example seven provides a processing method of a task, and on the basis of the processing method of the task of example one, the server at least includes the following links: the system comprises a second killing strategy processing server, an order processing server and a user message notification server.
Example eight provides, in accordance with one or more embodiments of the present disclosure, a processing system of a task, comprising a system interface and at least two link servers, wherein:
the system interface is used for acquiring the tasks to be processed and distributing the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks;
the current link server is used for caching and recording the pre-execution result and informing servers of other links to pre-execute the task to be processed;
the other link server is used for pre-executing the task to be processed;
the last link server is used for generating a processing voucher according to the pre-execution result and feeding back the processing voucher to the previous link server according to the reverse order of the processing order;
the current link server is used for receiving the processing certificate, adding the current link signature to the processing certificate, and continuing the reverse order feedback until the first link server;
the first link server is used for performing solidification storage on the task processing data according to the pre-execution result and informing other link servers to perform 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.
In accordance with one or more embodiments of the present disclosure, example nine provides a task processing system, and on the basis of the task processing system of example eight, the system interface is configured to receive a solidified storage notification fed back by each link server;
and if the solidified storage notification is successful, confirming that the task processing is effective and feeding back the success of the task.
Example ten provides a processing system of tasks, and on the basis of the processing system of example eight or nine, the system interface is further configured to:
if it is confirmed that the task processing is not in effect, the feedback task fails.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while 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. Under 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 limitations on the scope of the 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 disclosed as example forms of implementing the claims.

Claims (10)

1. A method for processing a task, the method comprising:
a system interface acquires a task to be processed;
the system interface distributes the tasks to be processed to a current link server for pre-execution according to the processing sequence of the tasks;
the current link server caches and records the pre-execution result and informs servers of other links to pre-execute the task to be processed;
the last link server generates a processing voucher according to the pre-execution result, and feeds the processing voucher back to the last link server according to the reverse order of the processing order;
the current link server receiving the processing certificate adds the current link signature to the processing certificate, and continues reverse order feedback until the first link server;
the first link server carries out solidification storage on the task processing data according to the pre-execution result and informs other link servers to carry 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 feeds back after the task processing is effective.
2. The method of claim 1, wherein the system interface feeding back after the task processing is effective comprises:
the system interface receives a solidification storage notice fed back by each link server;
and if the solidified storage notification is successful, confirming that the task processing is effective and feeding back the success of the task.
3. The method of claim 1 or 2, further comprising:
and if the system interface confirms that the task processing is not effective, feeding back the task failure.
4. The method of claim 3, further comprising:
and if the system interface confirms that the task processing is not effective, sending a task pre-execution revocation notification to each link server.
5. The method of claim 1, wherein the current link server caches and records the pre-execution result and notifies other link servers to pre-execute the task to be processed, the method comprising:
and the current link server caches and records the pre-execution result and informs the server of the next link to pre-execute the task to be processed until the server of the last link is sequentially informed.
6. The method of claim 1, wherein the first link server informing other link servers of performing solidified storage of task processing data according to the pre-execution result comprises:
and the first link server parallelly informs other link servers to perform solidification storage of the task processing data according to the pre-execution result.
7. The method of claim 1, characterized in that the server comprises at least the following: the system comprises a second killing strategy processing server, an order processing server and a user message notification server.
8. A processing system of tasks for performing the method of any of claims 1-7, wherein the system comprises a system interface and at least two link servers, wherein:
the system interface is used for acquiring the tasks to be processed and distributing the tasks to be processed to the current link server for pre-execution according to the processing sequence of the tasks;
the current link server is used for caching and recording the pre-execution result and informing servers of other links to pre-execute the task to be processed;
the other link server is used for pre-executing the task to be processed;
the last link server is used for generating a processing voucher according to the pre-execution result and feeding back the processing voucher to the last link server according to the reverse order of the processing order;
the current link server is used for receiving the processing certificate, adding the current link signature to the processing certificate, and continuing reverse order feedback until the current link server is the first link server;
the first link server is used for performing solidification storage on the task processing data according to the pre-execution result and informing other link servers of performing 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.
9. The system of claim 8, wherein the system interface is configured to receive a solidified storage notification fed back by each link server;
and if the solidified 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 it is confirmed that the task processing is not in effect, 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 true CN111190717A (en) 2020-05-22
CN111190717B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086283A (en) * 2022-05-18 2022-09-20 阿里巴巴(中国)有限公司 Voice stream processing method and unit

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019450A1 (en) * 2007-07-11 2009-01-15 Kabushiki Kaisha Toshiba Apparatus, method, and computer program product for task management
US20120197959A1 (en) * 2011-01-28 2012-08-02 Oracle International Corporation Processing pattern framework for dispatching and executing tasks in a distributed computing grid
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019450A1 (en) * 2007-07-11 2009-01-15 Kabushiki Kaisha Toshiba Apparatus, method, and computer program product for task management
US20120197959A1 (en) * 2011-01-28 2012-08-02 Oracle International Corporation Processing pattern framework for dispatching and executing tasks in a distributed computing grid
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN111190717B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN110968586B (en) Distributed transaction processing method and device
US7454751B2 (en) Fault-tolerant system and methods with trusted message acknowledgement
CN108681777B (en) Method and device for running machine learning program based on distributed system
US20190158626A1 (en) Method, apparatus and computer readable storage medium for processing service
US11176517B2 (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
US20180341523A1 (en) Highly available distributed queue using replicated messages
CN111667334B (en) Audit failure order processing method and device, computer equipment and storage medium
CN113094362B (en) Method and device for reliably delivering and processing asynchronous message
CN111784329A (en) Service data processing method and device, storage medium and electronic device
CN112995262B (en) Distributed transaction submission method, system and computing equipment
CN111190717B (en) Task processing method and system
CN114978902B (en) Information processing method, apparatus, device, storage medium, and program product
CN115131067A (en) Data processing method and device, electronic equipment and storage medium
CN112714092B (en) Registration login method, device and computer readable storage medium
JP6613315B2 (en) Transaction processing system and transaction control method
CN113992352A (en) Message pushing method and device, electronic equipment and storage medium
CN116010126B (en) Service aggregation method, device and system
CN112231601B (en) Link management method, device, equipment and computer storage medium
CN112819592B (en) Service request processing method, system, computer equipment and storage medium
CN109062931B (en) Cache synchronization control method, device, system, server and readable storage medium
CN116302619B (en) Cross-site multi-activity processing method, device, apparatus and storage medium
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN112231601A (en) Link management method, device, equipment and computer storage medium
CN116319819A (en) Service contract calling method 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