CN110543360A - Task processing method and system - Google Patents

Task processing method and system Download PDF

Info

Publication number
CN110543360A
CN110543360A CN201910663583.9A CN201910663583A CN110543360A CN 110543360 A CN110543360 A CN 110543360A CN 201910663583 A CN201910663583 A CN 201910663583A CN 110543360 A CN110543360 A CN 110543360A
Authority
CN
China
Prior art keywords
data transfer
server
task request
transfer task
request
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.)
Withdrawn
Application number
CN201910663583.9A
Other languages
Chinese (zh)
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.)
Shenzhen Bai Qian Nationwide Financial Services Inc
Original Assignee
Shenzhen Bai Qian Nationwide Financial Services Inc
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 Shenzhen Bai Qian Nationwide Financial Services Inc filed Critical Shenzhen Bai Qian Nationwide Financial Services Inc
Priority to CN201910663583.9A priority Critical patent/CN110543360A/en
Publication of CN110543360A publication Critical patent/CN110543360A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition

Abstract

the embodiment of the application discloses a task processing method and a task processing system. The method comprises the following steps: the received data transfer task request is verified through the first server, the second server distributes the data transfer task request passing the verification, the third server packages the distributed data transfer task request so that the distributed data transfer task request conforms to a preset format, the packaged data transfer task request is output, finally, the processing result of the packaged data transfer task request is obtained, and a task request is processed step by step through a plurality of different servers. By adopting the embodiment of the application, the pressure of each server can be reduced, and the task request processing efficiency is improved.

Description

task processing method and system
Technical Field
the present application relates to the field of computer technologies, and in particular, to a task processing method and system.
background
For most agent service platforms, with the sharp increase of financial transaction amount and business varieties, the business requests are initiated too frequently, which causes the problems that the pressure of the agent service platform for processing data is large, and the pressure of a third party channel for processing data is large, thereby causing the abnormal data sending and returning, and the situation that a user is always in the waiting state of business results. Moreover, due to high concurrency and large data volume access to the program, the situations that data delay is serious, quick response is poor, the pressure of the program and a database is large, and the memory space is occupied are often caused, so that the program runs slowly, and the program is crashed more seriously. Therefore, how to improve the efficiency of business processing is an ongoing problem for those skilled in the art.
Disclosure of Invention
The embodiment of the application discloses a task processing method and a task processing system, which can improve the task request processing efficiency.
in a first aspect, an embodiment of the present application provides a task processing method, where the method includes:
Verifying the received data transfer task request according to a first preset rule through a first server, and if the data transfer task request passes the verification, outputting the data transfer task request passing the verification to a second server;
The data transfer task request is distributed to a third server through the second server according to a second preset rule;
Packaging the distributed data transfer task request through the third server so that the distributed data transfer task request conforms to a preset format, and outputting the packaged data transfer task request;
and acquiring a processing result of the packed data transfer task request.
In the method, the received data transfer task request is verified through the first server, the second server distributes the data transfer task request passing the verification, the third server packages the distributed data transfer task request, and finally the processing result of the packaged data transfer task request is obtained.
Based on the first aspect, in an optional implementation manner, the verifying, by the first server, the received data transfer task request according to a first preset rule, and if the verification passes, outputting the data transfer task request that passes the verification to the second server, further includes:
If the verification fails, discarding the data transfer task request;
and returning the checking result to the client side which sends the data transfer task request.
Based on the first aspect, in an optional implementation manner, before the distributing, by the second server, the data transfer task request to a third server according to a second preset rule, the method further includes:
Locking a pre-configured distributed lock to the received data transfer task request, wherein the distributed lock is used for occupying target resources and entering a data transfer task request execution state;
based on the set first waiting time of the distributed lock, if the target resource is not released after the locking instruction is received and the first waiting time is exceeded, deleting the distributed lock requested by the current data transfer task.
According to the implementation mode, the distributed locks are locked on the data transfer task requests, the waiting time is set, and if the data transfer task requests are not processed and completed within the first waiting time, the distributed locks are forcibly unlocked, so that the conditions that resources are occupied for a long time, servers are down and the like are avoided.
Based on the first aspect, in an optional implementation manner, the method further includes:
And monitoring the return time between the outputting of the packaged data transfer task request and the obtaining of the processing result of the packaged data transfer task request, and if the return time exceeds a threshold value, reducing the frequency of outputting the packaged data transfer task request by the third server or reducing the frequency of distributing the data transfer task request by the second server.
the realization mode dynamically prolongs the sending frequency of the data transfer task request and lightens the data processing pressure of the server by monitoring the return time of the processing result of the data transfer task request and if the return time exceeds a threshold value.
based on the first aspect, in an optional implementation manner, the obtaining a processing result of the wrapped task request includes:
And returning the processing result to the client side which sends the data transfer task request.
In a second aspect, an embodiment of the present application provides a task processing system, including: first server, second server and third server, wherein:
The first server verifies the received data transfer task request according to a first preset rule, and if the verification is passed, the data transfer task request passing the verification is output to the second server;
the second server distributes the data transfer task request to a third server according to a second preset rule;
The third server packages the distributed data transfer task request so that the distributed data transfer task request conforms to a preset format, and outputs the packaged data transfer task request;
And acquiring a processing result of the packed data transfer task request.
it should be noted that, for the implementation manner and the corresponding beneficial effects of the second aspect, reference may be made to the description in the first aspect and the corresponding implementation manner, and details are not described herein again.
In a third aspect, an embodiment of the present application provides a task processing method, including:
the first server verifies the received data transfer task request according to a first preset rule;
If the verification is passed, the first server outputs the data transfer task request passed by the verification to a second server; and the second server distributes the verified data transfer task request to a third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
in the method, the first server checks the received data transfer task request, so that the second server distributes the data transfer task request passing the check, the third server packages the distributed data transfer task request, and finally the processing result of the packaged data transfer task request is obtained.
in a fourth aspect, an embodiment of the present application provides a task processing device, including:
the verification unit is used for verifying the received data transfer task request according to a first preset rule;
The output unit is used for outputting the data transfer task request passing the verification to the second server if the verification passes; and the second server distributes the verified data transfer task request to the third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
it should be noted that, for the implementation manner and the corresponding beneficial effects of the fourth aspect, reference may be made to the description in the third aspect and the corresponding implementation manner, and details are not described herein again.
in a fifth aspect, an embodiment of the present application provides a task processing device, which includes a processor, a memory, and a communication device, where the processor, the memory, and the communication device are connected to each other, and the communication device is used for performing information interaction with an external device; the processor is configured to invoke stored program code, the execution comprising:
verifying the received data transfer task request according to a first preset rule;
If the verification is passed, outputting the data transfer task request passed by the verification to the second server through the communication equipment; and the second server distributes the verified data transfer task request to the third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
It should be noted that, for the implementation manner and the corresponding beneficial effects of the fifth aspect, reference may be made to the description in the third aspect and the corresponding implementation manner, and details are not described herein again.
In a sixth aspect, the present application provides a computer-readable storage medium storing program instructions, which when executed by a processor, cause the processor to perform the method of the third aspect.
it should be noted that, for the implementation manner and the corresponding beneficial effects of the sixth aspect, reference may be made to the description in the third aspect and the corresponding implementation manner, and details are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments of the present application or the background art will be briefly described below.
Fig. 1 is a system architecture diagram of a task processing method according to an embodiment of the present application;
Fig. 2 is a schematic flowchart of a task processing method provided in an embodiment of the present application;
FIG. 3 is a schematic block diagram of a task processing method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a task processing method according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a task processing device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a task processing device according to an embodiment of the present application.
Detailed Description
the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
it is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. As used in this specification, the terms "device," "unit," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a device may be, but is not limited to, a processor, a data processing platform, a computing device, a computer, 2 or more computers, and the like.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In order to better understand a task processing method, a task processing device, and a computer-readable storage medium provided in the embodiments of the present application, a system architecture of the task processing method according to the embodiments of the present application is described below. As shown in fig. 1, which is a schematic diagram of a system architecture of a task processing method provided in an embodiment of the present application, the system may be a proxy service platform, and provides a deduction service for an application program of a third party, the system includes an internal business system server, an external channel system server, a database server, a first server, a second server, and a third server, the internal business system server sends a data transfer task request to the first server, the first server verifies the received data transfer task request according to a first preset rule, if the verification passes, the verified data transfer task request is output to the second server, then the second server distributes the verified data transfer task request to the third server according to a second preset rule, and then the third server packages the distributed data transfer task request, and outputting the packaged data transfer task request to an external channel system server, and finally acquiring a processing result of the packaged data transfer task request.
The server related in the embodiment of the application can be an independent server or a cluster server, and can communicate with a plurality of terminals through the internet to provide task request processing service for the terminals. The server needs to run a corresponding server-side program to provide corresponding task request processing services, such as task request verification, distribution, packaging, database service, and the like. The cluster server connects a plurality of servers through a fast communication link, the servers work like a server from the outside, and for the inside, the external load is dynamically distributed to the node machines through a certain mechanism, so that the high performance and high availability unique to the super server are achieved.
ErlangThe internal business system server and the external channel system server may include, but are not limited to, a backend server, an interface server, a database server, and the like. The first server may comprise one or more servers (a plurality of servers may form a server cluster), and the second server and the third server may be the same. Wherein the second server may comprise a RabbitMQ server, the RabbitMQ being open-source message broker software (also called message-oriented middleware) implementing Advanced Message Queuing Protocol (AMQP), the RabbitMQ server being written in Erlang language, and the clustering and failover being built on an open telecommunication platform framework. All major programming languages have a client library that communicates with the agent interface.
The task processing method of the present application is described below with reference to fig. 2, as shown in fig. 2, which is a flowchart of a task processing method provided in an embodiment of the present application, and the method may be implemented based on the system architecture shown in fig. 1 or other architectures, and the method may include, but is not limited to, the following steps:
step S101: and verifying the received data transfer task request according to a first preset rule through the first server, and if the verification is passed, outputting the data transfer task request passed by the verification to the second server.
Specifically, the agent service platform receives a data transfer task request sent by the internal business system through the first server, wherein the internal service system can be connected with a plurality of platforms or clients and sends data transfer task requests of the plurality of platforms, the first server verifies the received data transfer task requests according to a first preset rule, the agent service platform is a platform for providing agent service (agent processing data transfer task request) for a third-party server (external channel system server), the first preset rule may be an account authority setting of a service request sender, whether an account password of the service request sender matches, and the like, and if the check is passed, namely, the account is not limited, the account password is matched, and the like, the data transfer task request passing the verification is output to the second server, returning the result of passing the verification to the platform or the client sending the data transfer task request; if the verification fails, namely the account is limited, the account password is not matched and the like, discarding the corresponding data transfer task request, the first server does not process the data transfer task request, and returning the result of the verification failure to the platform or the client sending the data transfer task request.
Step S102: and distributing the data transfer task request to a third server through the second server according to a second preset rule.
Specifically, after receiving a data transfer task request sent by a first server through a second server, the proxy service platform distributes the data transfer task request into different message queues according to a second preset rule, and synchronously sends the different message queues to a third server, where the second preset rule may be distribution according to the source of the data transfer task request, that is, the data transfer task request from the same platform or client is distributed to different message queues, or may be distribution according to the priority of the data transfer task request, and the data transfer task request with high priority is distributed to a high-speed message queue.
for example, the second server may be a rabbitMQ server, as shown in fig. 3, fig. 3 describes a principle architecture of the rabbitMQ server for distributing task requests, where a message switch may specify that the task requests are routed to corresponding message queues according to a preset rule, the message queues identify carriers of the task requests, each task request is posted to one or more message queues, and the message switch performs delivery of the task requests according to routing keywords; after the rabbitMQ server acquires the multiple data transfer task requests, the multiple data transfer task requests are distributed into different message queues through the message switch according to routing keywords in the task requests, the message queues are sent to different message queue carriers, and the data transfer task requests are sent out through the message queue carriers.
In one embodiment, before the second server distributes the data transfer task request to the third server according to a second preset rule, the server (which may be any one or more of the first server, the second server, and the third server) of the proxy service platform locks a pre-configured distributed lock for occupying a target resource and entering a data transfer task request execution state to the received data transfer task request; based on the set first waiting time of the distributed lock, if the occupied target resource is not released after the data transfer task request is locked and the first waiting time is exceeded, the distributed lock requested by the current data transfer task is deleted, for example, the first waiting time is set to 10 seconds, when the server successfully locks the distributed lock to the data transfer service request, if the data transfer service request is not completed (that is, the target resource is not released) for more than 10 seconds, the server forcibly deletes the distributed lock requested by the data transfer task and releases the target resource. According to the implementation mode, the distributed locks are locked on the data transfer task requests, the waiting time is set, and if the data transfer task requests are not processed and completed within the first waiting time, the distributed locks are forcibly unlocked, so that the conditions that resources are occupied for a long time, servers are down and the like are avoided.
Step S103: and packaging the distributed data transfer task request through the third server so as to enable the distributed data transfer task request to conform to a preset format, and outputting the packaged data transfer task request.
specifically, after receiving a data transfer task request sent by a first server through a third server, the agent service platform packages the data transfer task request to make the data transfer task request conform to a preset format, and outputs the packaged data transfer task request to an external channel system server, wherein the preset format is a format required by the external channel system server, and the external channel system server is a third-party server, such as a quick-payment through deduction system, a quick-line deduction system, an easy-to-handle deduction system, and the like.
step S104: and acquiring a processing result of the packaged data transfer task request.
Specifically, after the proxy service platform outputs the packaged data transfer task request to the external channel system server through the third server, the external channel system server processes the data transfer task request, returns a processing result of the data transfer task request to a server (which may be any one or more of the first server, the second server, and the third server) of the proxy service platform, and returns the processing result to the client that sent the data transfer task request.
In one embodiment, the agent service platform of the embodiment of the present application further includes a monitoring function, where the monitoring function may be disposed in any one or more of the first server, the second server, and the third server, the server monitors a return time between the third server outputting the packaged data transfer task request and obtaining a processing result of the packaged data transfer task request, and if the return time exceeds a threshold, the frequency of the third server outputting the packaged data transfer task request is reduced, or the frequency of the second server distributing the data transfer task request is reduced, for example, the threshold is set to 5 seconds, the third server outputs the data transfer task request to the external channel system server and then obtains the processing result of the data transfer task request, and if the time between the time exceeds 5 seconds, it means that the speed of the third server sending the request or the speed of the external channel system server processing the request is slow, and if the monitoring detection time exceeds 5 seconds, the frequency of the third server outputting the task request can be reduced, or the frequency of the second server distributing the task request can be reduced, so as to reduce the pressure of the external channel system server or the third server. According to the embodiment, the return time of the processing result of the data transfer task request is monitored, and if the return time exceeds the threshold, the sending frequency of the data transfer task request is dynamically prolonged, so that the data processing pressure of the server is relieved.
In one implementation, the embodiment of the present application may further include a database server for providing a database service. In the optimization of the database system, the database can be optimized by adding a proper amount of indexes (six indexes at most) and avoiding modes of unequal numbers, or, full-table scanning and the like. After the big data in the database is sent in a multi-thread mode, the processing result can be returned to the client side without waiting for the completion of the calling channel, and the client side is informed that the task request processing is completed.
In one embodiment, the present application embodiment may further include a cache server, configured to store frequently accessed content to improve content access speed, reduce database load through a cache plug-in redis persistence mechanism (RDB and AOF), and may further use a setnx command of redis to implement a distributed lock, use a get (lockkey, expires) of redis to obtain an expiration time of a previous lock, and set an expiration time of a current distributed lock.
By implementing the embodiment of the application, the received data transfer task request is verified through the first server, the second server distributes the data transfer task request passing the verification, the third server packages the distributed data transfer task request, and finally the processing result of the packaged data transfer task request is obtained.
the present application further provides a task processing method, as shown in fig. 4, which is a flowchart of the task processing method provided in the embodiment of the present application, and the method may be implemented based on the above system architecture or other architectures, and the method may include, but is not limited to, the following steps:
Step S401: the first server verifies the received data transfer task request according to a first preset rule;
Specifically, the first server receives a data transfer task request sent by an internal service system, where the internal service system may be connected to multiple platforms or clients to send data transfer task requests of the multiple platforms, and the first server verifies the received data transfer task request according to a first preset rule, where the first preset rule may be a rule such as setting an account authority of a service request sender, and whether an account password of the service request sender matches or not.
Step S402: if the verification is passed, the first server outputs a data transfer task request passing the verification to the second server; and the second server distributes the verified data transfer task request to a third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
specifically, if the verification is passed, that is, the account is not limited, the account and the password are matched, and the like, outputting a data transfer task request passed through the verification to the second server, so that the second server distributes the data transfer task request passed through the verification to a third server according to a second preset rule, so that the third server packages the distributed data transfer task request, so that the distributed data transfer task request conforms to a preset format, and outputting the packaged data transfer task request; meanwhile, if the verification is passed, the first server returns the result of passing the verification to the platform or the client sending the data transfer task request; if the verification fails, namely the account is limited, the account password is not matched and the like, discarding the corresponding data transfer task request, the first server does not process the data transfer task request, and returning the result of the verification failure to the platform or the client sending the data transfer task request.
by implementing the embodiment of the application, the first server verifies the received data transfer task request, so that the second server distributes the data transfer task request passing the verification, the third server packages the distributed data transfer task request, and finally the processing result of the packaged data transfer task request is obtained.
in order to better implement the above solution of the embodiments of the present application, the present application further provides a task processing device, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 5, an embodiment of the present application provides a schematic structural diagram of a task processing device 50, where the task processing device 50 may include: a verification unit 501 and an output unit 502, wherein,
A verifying unit 501, configured to verify the received data transfer task request according to a first preset rule;
An output unit 502, configured to output the data transfer task request that passes the verification to the second server if the verification passes; and the second server distributes the verified data transfer task request to the third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
It should be noted that, in the embodiment of the present application, the functions of each functional unit in the apparatus described in fig. 5 may refer to the description related to the first server performing step S401 and step S402 in the embodiment of the method described in fig. 4, and are not described again here.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a simplified task processing device according to the task processing device diagram. For ease of understanding and illustration, one or more of the following components may be included in the task processing device 60 of FIG. 6: memory 601, processor 602, and communication device 603, wherein:
The memory 601 may include one or more storage units, each of which may include one or more memories, which may be used to store programs and various data and enable high-speed, automatic access to the programs or data during operation of the task processing device 60. When the task processing device 60 shown in fig. 6 executes the method described in fig. 2, the memory may be used to store task processing, and other related data, etc.
The communication device 603, which may also be referred to as a transceiver, or transceiver, etc., may include elements for wireless, wired, or other communication. Optionally, a device used for implementing the receiving function in the part 603 may be regarded as a receiving unit, and a device used for implementing the transmitting function may be regarded as a transmitting unit, that is, the part 603 includes a receiving unit and a transmitting unit.
The processor 602, which may also be referred to as a processing unit, a processing board, a processing module, a processing device, etc. The processor may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. When the task processing device 60 shown in fig. 6 executes the method shown in fig. 2, the processor 602 calls the task processing program in the memory 601 to perform the following steps:
verifying the received data transfer task request according to a first preset rule through the communication equipment 603;
If the verification is passed, outputting the data transfer task request passed by the verification to the second server through the communication device 603; and the second server distributes the verified data transfer task request to the third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
It should be noted that, in the embodiments of the present application, reference may be made to a specific implementation manner of the first server in the embodiment of fig. 4 in the foregoing method embodiments for the execution step of the processor 602 in the task processing device 60, and details are not described here again.
it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. And the aforementioned storage medium includes: a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
in this application, the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
in addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. While the present application has been described herein in conjunction with various embodiments, other variations to the disclosed embodiments may be understood and effected by those skilled in the art in practicing the present application as claimed herein.

Claims (10)

1. a task processing method, comprising:
Verifying the received data transfer task request according to a first preset rule through a first server, and if the data transfer task request passes the verification, outputting the data transfer task request passing the verification to a second server;
The data transfer task request is distributed to a third server through the second server according to a second preset rule;
Packaging the distributed data transfer task request through the third server so that the distributed data transfer task request conforms to a preset format, and outputting the packaged data transfer task request;
And acquiring a processing result of the packed data transfer task request.
2. The method according to claim 1, wherein the first server checks the received data transfer task request according to a first preset rule, and if the check is passed, outputs the data transfer task request passed by the check to the second server, further comprising:
if the verification fails, discarding the data transfer task request;
and returning the checking result to the client side which sends the data transfer task request.
3. the method according to claim 1, wherein before the distributing, by the second server, the data transfer task request to a third server according to a second preset rule, further comprises:
Locking a pre-configured distributed lock to the received data transfer task request, wherein the distributed lock is used for occupying target resources and entering a data transfer task request execution state;
Based on the set first waiting time of the distributed lock, if the target resource is not released after the locking instruction is received and the first waiting time is exceeded, deleting the distributed lock requested by the current data transfer task.
4. The method according to any one of claims 1-3, further comprising:
and monitoring the return time between the outputting of the packaged data transfer task request and the obtaining of the processing result of the packaged data transfer task request, and if the return time exceeds a threshold value, reducing the frequency of outputting the packaged data transfer task request by the third server or reducing the frequency of distributing the data transfer task request by the second server.
5. The method of claim 4, wherein the obtaining of the processing results of the wrapped task request is followed by:
and returning the processing result to the client side which sends the data transfer task request.
6. a task processing system comprising a first server, a second server, and a third server, wherein:
The first server verifies the received data transfer task request according to a first preset rule, and if the verification is passed, the data transfer task request passing the verification is output to the second server;
The second server distributes the data transfer task request to a third server according to a second preset rule;
The third server packages the distributed data transfer task request so that the distributed data transfer task request conforms to a preset format, and outputs the packaged data transfer task request;
and acquiring a processing result of the packed data transfer task request.
7. A task processing method, comprising:
the first server verifies the received data transfer task request according to a first preset rule;
if the verification is passed, the first server outputs the data transfer task request passed by the verification to a second server; and the second server distributes the verified data transfer task request to a third server according to a second preset rule, so that the third server packages the distributed data transfer task request, the distributed data transfer task request conforms to a preset format, and the packaged data transfer task request is output.
8. A task processing apparatus characterized by comprising means for performing the method of claim 7.
9. the task processing device is characterized by comprising a processor, a memory and a communication device, wherein the processor, the memory and the communication device are connected with each other, the memory is used for storing application program codes, and the communication device is used for carrying out information interaction with an external device; the processor is configured to invoke the program code to perform the method of claim 7.
10. a computer-readable storage medium, characterized in that the computer-readable storage medium stores program instructions that, when executed by a processor, cause the processor to perform the method as claimed in claim 7.
CN201910663583.9A 2019-07-22 2019-07-22 Task processing method and system Withdrawn CN110543360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910663583.9A CN110543360A (en) 2019-07-22 2019-07-22 Task processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910663583.9A CN110543360A (en) 2019-07-22 2019-07-22 Task processing method and system

Publications (1)

Publication Number Publication Date
CN110543360A true CN110543360A (en) 2019-12-06

Family

ID=68710287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910663583.9A Withdrawn CN110543360A (en) 2019-07-22 2019-07-22 Task processing method and system

Country Status (1)

Country Link
CN (1) CN110543360A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176505A (en) * 2019-12-20 2020-05-19 上海淇玥信息技术有限公司 Page display method and device based on third-party task linkage and electronic equipment
CN113506095A (en) * 2021-08-05 2021-10-15 上海中通吉网络技术有限公司 Order dynamic rule checking and distributing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111176505A (en) * 2019-12-20 2020-05-19 上海淇玥信息技术有限公司 Page display method and device based on third-party task linkage and electronic equipment
CN113506095A (en) * 2021-08-05 2021-10-15 上海中通吉网络技术有限公司 Order dynamic rule checking and distributing method

Similar Documents

Publication Publication Date Title
US8484659B2 (en) Distributed processing of binary objects via message queues including a failover safeguard
US20110032847A1 (en) Multiplexed communication for duplex applications
KR102407334B1 (en) Gateway apparatus and operating method thereof
EP3319267A1 (en) Wireless system access control method and device
CN109873863B (en) Asynchronous calling method and device of service
CN109189509B (en) Interface calling method, interface calling response method and server
CN108011909B (en) Communication method and system, electronic device and computer cluster
CN113641410A (en) Netty-based high-performance gateway system processing method and system
CN110543360A (en) Task processing method and system
CN111666745A (en) File downloading method, device, server and medium
US20210406102A1 (en) Method and apparatus for providing asynchronicity to microservice application programming interfaces
CN111694620B (en) Interaction method, device and equipment of third party service and computer storage medium
US20230046979A1 (en) Microservice call method and apparatus, device, and medium
CN111931157A (en) Access method, device, storage medium and computer equipment of single sign-on system
CN113703997A (en) Bidirectional asynchronous communication middleware system integrating multiple message agents and implementation method
CN107645476B (en) Request processing method and device
US7587399B2 (en) Integrated software toolset for a web server
CN110765443A (en) Single sign-on method and device, computer equipment and storage medium
CN110750365A (en) Remote procedure calling method, system, terminal and storage medium
WO2015085735A1 (en) Information requesting method and system
US7373504B1 (en) Kernel-level cryptographic kernel interface
US20220321346A1 (en) Token management for asynchronous request-reply
CN114374657A (en) Data processing method and device
CN113051008A (en) Interface request processing method and device, computer equipment and storage medium
US9009546B2 (en) Heuristic failure prevention in software as a service (SAAS) systems

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20191206