CN110995803B - Upstream and downstream service processing method and system, computer readable storage medium - Google Patents

Upstream and downstream service processing method and system, computer readable storage medium Download PDF

Info

Publication number
CN110995803B
CN110995803B CN201911158668.8A CN201911158668A CN110995803B CN 110995803 B CN110995803 B CN 110995803B CN 201911158668 A CN201911158668 A CN 201911158668A CN 110995803 B CN110995803 B CN 110995803B
Authority
CN
China
Prior art keywords
service
upstream
downstream
processing method
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911158668.8A
Other languages
Chinese (zh)
Other versions
CN110995803A (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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou 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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201911158668.8A priority Critical patent/CN110995803B/en
Publication of CN110995803A publication Critical patent/CN110995803A/en
Application granted granted Critical
Publication of CN110995803B publication Critical patent/CN110995803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention provides an upstream service processing method, an upstream service processing system, a downstream service processing method, a downstream service processing system and a computer readable storage medium, wherein the upstream service processing method comprises the following steps: sending a service calling instruction; receiving a service calling receipt corresponding to the service calling instruction; processing the corresponding service according to the service call receipt; generating service confirmation information according to the service processing result; and sending the service confirmation information. By limiting the call-callback-confirmation upstream and downstream service interaction method, the same database conversation is held among systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency when submitted, and the problem of service data errors is avoided. Therefore, the upstream service processing method is optimized, the accuracy and the reliability of service processing are improved, and the consistency of multi-system service processing is improved.

Description

Upstream and downstream service processing method and system, computer readable storage medium
Technical Field
The present invention relates to the technical field of text data processing, and in particular, to an upstream service processing method, an upstream service processing system, a downstream service processing method, a downstream service processing system, and a computer-readable storage medium.
Background
In a distributed system composed of a plurality of different systems, different database sessions are held among the systems, so that the problem of service data errors is caused because the data of the systems are not strong in consistency and isolation when submitted to a database. Therefore, how to design a service processing method with both strong consistency and isolation becomes an urgent technical problem to be solved.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, a first aspect of the present invention provides an upstream traffic processing method.
A second aspect of the present invention provides an upstream traffic processing system.
The third aspect of the present invention provides a method for processing a downstream service.
A fourth aspect of the present invention provides a downstream service processing system.
A fifth aspect of the invention proposes a computer-readable storage medium.
In view of this, a first aspect of the present invention provides an upstream service processing method, where the upstream service processing method includes: sending a service calling instruction; receiving a service calling receipt corresponding to the service calling instruction; processing the corresponding service according to the service call receipt; generating service confirmation information according to the service processing result; and sending the service confirmation information.
In the technical scheme, a processing method for the upstream service is defined, and in the process of processing the upstream service: firstly, sending a service calling instruction to a downstream system so as to complete the service calling of the upstream system to the downstream system; after the downstream system receives and processes the service call instruction, the downstream system receives a service call receipt corresponding to the service call instruction, so as to complete the call-back from the downstream system to the upstream system; and then the upstream system calls the receipt to execute the corresponding service according to the received service, finally generates a service confirmation message according to the service processing result of the corresponding service, and sends the service confirmation message back to the downstream system, thereby completing the information confirmation from the upstream system to the downstream system, and synchronizing the data and the state of the upstream system and the downstream system aiming at the same service. By limiting the call-callback-confirmation upstream and downstream service interaction method, the same database conversation is held among systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency when submitted, and the problem of service data errors is avoided. Therefore, the upstream service processing method is optimized, the accuracy and the reliability of service processing are improved, and the consistency of multi-system service processing is improved.
In addition, the upstream service processing method in the above technical solution provided by the present invention may further have the following additional technical features:
in the above technical solution, further, the step of sending the service invocation instruction specifically includes: receiving service information; freezing service data corresponding to the service information; generating a service calling instruction according to the service information; and sending a service calling instruction.
In the technical scheme, the step of sending the service calling instruction is specifically limited, in the calling process, an upstream system receives service information firstly, then freezes service data corresponding to the service information according to the service information, after freezing is completed, the service calling instruction aiming at a downstream system is generated according to the service information, and finally the service calling instruction is sent to the downstream system. By freezing the service data corresponding to the service information before generating the service calling instruction, the service data related to the service in the receipt library can not be changed before the upstream system cooperates with the downstream system to complete the service, so that the service data is prevented from being changed or lost in the process of executing the service. Therefore, on one hand, the strong consistency of the upstream service processing method is further strengthened, and on the other hand, the upstream service processing method has isolation. Therefore, the technical effects of optimizing the upstream service processing method and improving the accuracy and reliability of service processing are achieved.
In any of the above technical solutions, further, the step of processing the corresponding service according to the service invocation receipt specifically includes: modifying the service state according to the service call receipt; checking whether the upstream system is registered with a simple callback component; and registering a simple callback component based on the upstream system, and executing the corresponding service according to the service call receipt.
In the technical scheme, specific limitations are made on the step of processing the corresponding service according to the service call receipt. In the working process, the upstream system modifies the corresponding service state according to the service call receipt, and the state record of the service in the upstream system is ensured to be consistent with the actual service processing state. And then checking whether the upstream system registers a simple callback component, wherein the simple callback component refers to that the upstream system can be called when the upstream system receives the receipt information, and after judging that the upstream system registers the simple callback component, the upstream system calls the receipt according to the service and prepares to execute the callback from the upstream system to the downstream system. The method further strengthens the strong consistency of the upstream service processing method by limiting the modification of the corresponding service state according to the service call receipt, avoids the deviation between the recorded service state and the actual service processing state in the upstream service system, and further realizes the technical effect of improving the accuracy and the reliability of service processing.
In any of the above technical solutions, further, the step of generating the confirmation information according to the service processing result specifically includes: acquiring a service processing result, and unfreezing service data for completing a service based on the service processing result; checking whether a unified callback component is registered in an upstream system; and registering a uniform callback component based on the upstream system, and generating service confirmation information according to a service processing result.
In the technical scheme, the step of generating the confirmation information according to the service processing result is specifically limited. In the working process, the upstream system analyzes the content in the service processing structure after acquiring the service processing result, and when the service processing result is analyzed to be the completion service, the upstream system unfreezes the previously frozen service data related to the service. And then the upstream system detects whether the same callback component is registered, wherein the uniform callback component refers to that when a plurality of downstream systems are called, the callback is carried out after all the downstream receipts play functions, and when the upstream system is judged to be registered with the same callback component and all the downstream systems related to the service feed back the receipts, the upstream system generates corresponding service confirmation information according to the service processing result and calls back the service confirmation information to each downstream system. By unfreezing the service data after confirming that the service processing is completed, the service data can be normally used after the service is completed, so that the normal operation of the system is kept on the basis of ensuring the strong consistency of the service processing. By generating and sending the service confirmation information according to the service processing result, the information of the upstream system and the downstream system aiming at the service is kept consistent, and the data difference of the upstream system and the downstream system aiming at the same service is avoided, so that the strong consistency and the isolation of the upstream service processing method are further strengthened. Therefore, the reliability and the accuracy of the upstream service processing method are optimized, and the technical effect of improving the stability of the system is achieved.
A second aspect of the present invention provides an upstream service processing system, including: a memory configured to store a computer program; a processor configured to execute a computer program to implement the upstream service processing method provided by any one of the above technical solutions.
In this technical solution, the upstream service processing system is composed of a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program stored in the memory to implement the upstream service processing method provided in any one of the above technical solutions. By limiting the calling-callback-confirmation upstream service processing system, the same database conversation is held among systems in a distributed system formed by a plurality of different systems, so that the databases are guaranteed to have strong consistency and isolation when submitted to the databases, and the problem of service data errors is avoided. Therefore, the technical effects of optimizing an upstream service processing system, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
A third aspect of the present invention provides a downstream service processing method, where the downstream service processing method includes: receiving a service calling instruction; processing the corresponding service according to the service calling instruction; generating a service calling receipt according to the service processing result; and sending a service calling receipt.
In the technical scheme, a processing method for downstream services is defined, a downstream system is located at a called party in a service processing process, and in the downstream service processing process: receiving a service calling instruction from an upstream system, executing a corresponding service according to a service calling result, after the corresponding service is completed, generating a service calling receipt by the downstream system according to a service processing result, and finally sending the service calling receipt back to the upstream system. By limiting the call-callback upstream and downstream service interaction method, the same database conversation is held among the systems in a distributed system consisting of a plurality of different systems, so that the databases are ensured to have strong consistency when submitted, and the problem of service data errors is avoided. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
In any of the above technical solutions, further, the step of processing the corresponding service according to the service call instruction specifically includes: freezing downstream service data corresponding to the service calling instruction according to the service calling instruction; and processing the corresponding service according to the service calling instruction.
In the technical scheme, the step of processing the corresponding service according to the service calling instruction is specifically limited. In the working process, the downstream system freezes downstream service data corresponding to the service calling instruction according to the service calling instruction, and then processes corresponding services according to the service calling instruction. The downstream service data corresponding to the service calling instruction is frozen before the corresponding service is processed, so that the downstream related service data are kept unchanged in the process of executing the service by the upstream system and the downstream system, the service deviation in the process of calling and confirming the downstream system is avoided, and the downstream service processing method is guaranteed to have strong consistency and isolation. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the stability of service processing are achieved.
In any of the above technical solutions, further, the downstream service processing method further includes: receiving service confirmation information; and unfreezing the downstream service data according to the service confirmation information.
In the technical scheme, a downstream service processing method is further limited. And after feeding back the service call receipt, the downstream system receives service confirmation information sent by the upstream system, wherein the service confirmation information comprises a service processing result of the upstream system aiming at the service, and then the downstream system unfreezes downstream service data according to the service confirmation information. By unfreezing the downstream service data after receiving the service confirmation information, the downstream service can be normally used after the service is completed, so that the normal operation of the system is maintained on the basis of ensuring the strong consistency of service processing. By limiting the call-callback-confirmation upstream and downstream service interaction method, the same database conversation is held among systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency when submitted, and the problem of service data errors is avoided. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
A fourth aspect of the present invention provides a downstream service processing system, including: a memory configured to store a computer program; and the processor is configured to execute the computer program to realize the downstream service processing method provided by any one of the technical schemes.
In this technical solution, the downstream service processing system is composed of a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program stored in the memory to implement the downstream service processing method provided in any one of the above technical solutions. Through limiting the downstream service processing system of calling-callback-confirmation, the same database conversation is held among the systems in a distributed system formed by a plurality of different systems, so that the databases are guaranteed to have strong consistency and isolation when submitted to the databases, and the problem of generating service data errors is avoided. And further, the technical effects of optimizing a downstream business processing system, improving the accuracy and reliability of business processing and improving the consistency of multi-system business processing are achieved.
A fifth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the upstream service processing method or the downstream service processing method provided in any of the above technical solutions, so that the computer-readable storage medium includes all the beneficial effects of the upstream service processing method or the downstream service processing method provided in any of the above technical solutions, and details are not described herein again.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows a flow diagram of an upstream traffic processing method according to one embodiment of the invention;
FIG. 2 shows a flow diagram of an upstream traffic processing method according to another embodiment of the invention;
FIG. 3 shows a flow diagram of an upstream traffic processing method according to yet another embodiment of the invention;
FIG. 4 shows a flow diagram of an upstream traffic processing method according to yet another embodiment of the invention;
FIG. 5 shows a block diagram of an upstream traffic processing system according to one embodiment of the invention;
FIG. 6 shows a flow diagram of a downstream traffic processing method according to one embodiment of the invention;
FIG. 7 shows a flow diagram of a downstream traffic processing method according to another embodiment of the invention;
FIG. 8 shows a flow diagram of a downstream traffic processing method according to yet another embodiment of the invention;
FIG. 9 shows a block diagram of a downstream traffic processing system according to one embodiment of the invention;
FIG. 10 shows a general block diagram of a distributed system according to one embodiment of the invention;
FIG. 11 shows an interaction diagram of an upstream system and a downstream system according to one embodiment of the invention;
FIG. 12 illustrates an interaction diagram of initiating a service invocation according to one embodiment of the invention;
FIG. 13 illustrates an interaction diagram of a downstream system service receipt according to one embodiment of the invention;
FIG. 14 shows an interaction diagram for validating business results, according to one embodiment of the invention;
fig. 15 shows an interaction diagram of a downstream validation service result according to an embodiment of the present invention.
Wherein, the correspondence between the reference numbers and the names of the components in fig. 11 is:
112 simple callback component, 114 unified callback component, 116 confirm callback component.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
An upstream traffic processing method, an upstream traffic processing system, a downstream traffic processing method, a downstream traffic processing system, and a computer-readable storage medium provided according to some embodiments of the present invention are described below with reference to fig. 1 to 15.
As shown in fig. 1, in an embodiment of the first aspect of the present invention, an upstream traffic processing method is provided, where the upstream traffic processing method includes:
step S102, sending a service calling instruction;
step S104, receiving a service calling receipt corresponding to the service calling instruction;
step S106, processing the corresponding service according to the service calling receipt;
step S108, generating service confirmation information according to the service processing result;
step S110, sending the service confirmation information.
In this embodiment, a processing method for an upstream service is defined, in the process of processing the upstream service: firstly, sending a service calling instruction to a downstream system so as to complete the service calling of the upstream system to the downstream system; after the downstream system receives and processes the service call instruction, the downstream system receives a service call receipt corresponding to the service call instruction, so as to complete the call-back from the downstream system to the upstream system; and then the upstream system calls the receipt to execute the corresponding service according to the received service, finally generates a service confirmation message according to the service processing result of the corresponding service, and sends the service confirmation message back to the downstream system, thereby completing the information confirmation from the upstream system to the downstream system, and synchronizing the data and the state of the upstream system and the downstream system aiming at the same service. By limiting the call-callback-confirmation upstream and downstream service interaction method, the same database conversation is held among systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency when submitted, and the problem of service data errors is avoided. Therefore, the upstream service processing method is optimized, the accuracy and the reliability of service processing are improved, and the consistency of multi-system service processing is improved.
In an embodiment of the present invention, further, as shown in fig. 2, the upstream service processing method includes:
step S202, receiving service information;
step S204, freezing the service data corresponding to the service information;
step S206, generating a service calling instruction according to the service information;
step S208, sending a service calling instruction;
step S210, receiving a service calling receipt corresponding to the service calling instruction;
step S212, processing corresponding business according to the business call receipt;
step S214, generating service confirmation information according to the service processing result;
step S216, the service confirmation information is sent.
In this embodiment, a specific limitation is made on the step of sending the service invocation instruction, and in the invocation process, the upstream system receives the service information first, then freezes the service data corresponding to the service information according to the service information, and after freezing is completed, generates the service invocation instruction for the downstream system according to the service information, and finally sends the service invocation instruction to the downstream system. By freezing the service data corresponding to the service information before generating the service calling instruction, the service data related to the service in the receipt library can not be changed before the upstream system cooperates with the downstream system to complete the service, so that the service data is prevented from being changed or lost in the process of executing the service. Therefore, on one hand, the strong consistency of the upstream service processing method is further strengthened, and on the other hand, the upstream service processing method has isolation. Therefore, the technical effects of optimizing the upstream service processing method and improving the accuracy and reliability of service processing are achieved.
In an embodiment of the present invention, further, as shown in fig. 3, the upstream service processing method includes:
step S302, receiving service information;
step S304, freezing the service data corresponding to the service information;
step S306, generating a service calling instruction according to the service information;
step S308, sending a service calling instruction;
step S310, receiving a service calling receipt corresponding to the service calling instruction;
step S312, the service state is modified according to the service call receipt;
step S314, checking whether the upstream system registers a simple callback component;
step S316, registering a simple callback component based on the upstream system, and executing the corresponding service according to the service call receipt;
step S318, generating service confirmation information according to the service processing result;
step S320, sending the service confirmation information.
In this embodiment, specific limitations are made on the step of processing the corresponding service according to the service invocation receipt. In the working process, the upstream system modifies the corresponding service state according to the service call receipt, and the state record of the service in the upstream system is ensured to be consistent with the actual service processing state. And then checking whether the upstream system registers a simple callback component, wherein the simple callback component refers to that the upstream system can be called when the upstream system receives the receipt information, and after judging that the upstream system registers the simple callback component, the upstream system calls the receipt according to the service and prepares to execute the callback from the upstream system to the downstream system. The method further strengthens the strong consistency of the upstream service processing method by limiting the modification of the corresponding service state according to the service call receipt, avoids the deviation between the recorded service state and the actual service processing state in the upstream service system, and further realizes the technical effect of improving the accuracy and the reliability of service processing.
In an embodiment of the present invention, further, as shown in fig. 4, the upstream service processing method includes:
step S402, receiving service information;
step S404, freezing the service data corresponding to the service information;
step S406, generating a service calling instruction according to the service information;
step S408, sending a service calling instruction;
step S410, receiving a service calling receipt corresponding to the service calling instruction;
step S412, processing the corresponding service according to the service call receipt;
step S414, obtaining a service processing result, and unfreezing service data for completing the service based on the service processing result;
step S416, checking whether the upstream system registers a unified callback component;
step S418, registering a uniform callback component based on an upstream system, and generating service confirmation information according to a service processing result;
step S420, sending the service confirmation information.
In this embodiment, the step of generating the confirmation information according to the service processing result is specifically limited. In the working process, the upstream system analyzes the content in the service processing structure after acquiring the service processing result, and when the service processing result is analyzed to be the completion service, the upstream system unfreezes the previously frozen service data related to the service. And then the upstream system detects whether the same callback component is registered, wherein the uniform callback component refers to that when a plurality of downstream systems are called, the callback is carried out after all the downstream receipts play functions, and when the upstream system is judged to be registered with the same callback component and all the downstream systems related to the service feed back the receipts, the upstream system generates corresponding service confirmation information according to the service processing result and calls back the service confirmation information to each downstream system. By unfreezing the service data after confirming that the service processing is completed, the service data can be normally used after the service is completed, so that the normal operation of the system is kept on the basis of ensuring the strong consistency of the service processing. By generating and sending the service confirmation information according to the service processing result, the information of the upstream system and the downstream system aiming at the service is kept consistent, and the data difference of the upstream system and the downstream system aiming at the same service is avoided, so that the strong consistency and the isolation of the upstream service processing method are further strengthened. Therefore, the reliability and the accuracy of the upstream service processing method are optimized, and the technical effect of improving the stability of the system is achieved.
As shown in fig. 5, in an embodiment of the second aspect of the present invention, there is provided an upstream traffic processing system 500, where the upstream traffic processing system 500 includes: a memory 502 configured to store a computer program; the processor 504 is configured to execute a computer program to implement the upstream service processing method provided in any of the above technical solutions.
In this embodiment, the upstream service processing system 500 is composed of a memory 502 and a processor 504, the memory 502 stores a computer program, and the processor 504 is configured to execute the computer program stored in the memory 502 to implement the upstream service processing method provided in any of the above technical solutions. By limiting the call-callback-confirmation upstream service processing system 500, the same database conversation is held among the systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency and isolation when submitted to the databases, and the problem of service data errors is avoided. And further, the technical effects of optimizing the upstream service processing system 500, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
As shown in fig. 6, in an embodiment of the third aspect of the present invention, a downstream traffic processing method is provided, where the downstream traffic processing method includes:
step S602, receiving a service calling instruction;
step S604, processing the corresponding service according to the service calling instruction;
step S606, generating a service call receipt according to the service processing result;
step S608, a service invocation receipt is sent.
In this embodiment, a processing method for a downstream service is defined, where a downstream system is located at a called party in a service processing procedure, and in the downstream service processing procedure: receiving a service calling instruction from an upstream system, executing a corresponding service according to a service calling result, after the corresponding service is completed, generating a service calling receipt by the downstream system according to a service processing result, and finally sending the service calling receipt back to the upstream system. By limiting the call-callback upstream and downstream service interaction method, the same database conversation is held among the systems in a distributed system consisting of a plurality of different systems, so that the databases are ensured to have strong consistency when submitted, and the problem of service data errors is avoided. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
In an embodiment of the present invention, further, as shown in fig. 7, the downstream traffic processing method includes:
step S702, receiving a service calling instruction;
step S704, freezing downstream service data corresponding to the service calling instruction according to the service calling instruction;
step S706, processing the corresponding service according to the service calling instruction;
step S708, generating a service call receipt according to the service processing result;
step S710, sending a service invocation receipt.
In this embodiment, specific limitations are made on the step of processing the corresponding service according to the service call instruction. In the working process, the downstream system freezes downstream service data corresponding to the service calling instruction according to the service calling instruction, and then processes corresponding services according to the service calling instruction. The downstream service data corresponding to the service calling instruction is frozen before the corresponding service is processed, so that the downstream related service is kept unchanged in the process of executing the service by the upstream system and the downstream system, the service deviation in the process of calling and confirming the downstream system is avoided, and the downstream service processing method is guaranteed to have strong consistency and isolation. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the stability of service processing are achieved.
In an embodiment of the present invention, further, as shown in fig. 8, the downstream traffic processing method includes:
step S802, receiving a service calling instruction;
step S804, freezing downstream service data corresponding to the service calling instruction according to the service calling instruction;
step S806, processing the corresponding service according to the service calling instruction;
step S808, generating a service call receipt according to the service processing result;
step S810, sending a service calling receipt;
step S812, receiving service confirmation information;
step S814, unfreezing the downstream service data according to the service confirmation information.
In this embodiment, a downstream traffic processing method is further defined. And after feeding back the service call receipt, the downstream system receives service confirmation information sent by the upstream system, wherein the service confirmation information comprises a service processing result of the upstream system aiming at the service, and then the downstream system unfreezes downstream service data according to the service confirmation information. By unfreezing the downstream service data after receiving the service confirmation information, the downstream service can be normally used after the service is completed, so that the normal operation of the system is maintained on the basis of ensuring the strong consistency of service processing. By limiting the call-callback-confirmation upstream and downstream service interaction method, the same database conversation is held among systems in a distributed system consisting of a plurality of different systems, so that the databases are guaranteed to have strong consistency when submitted, and the problem of service data errors is avoided. And further, the technical effects of optimizing a downstream service processing method, improving the accuracy and reliability of service processing and improving the consistency of multi-system service processing are achieved.
As shown in fig. 9, in an embodiment of the fourth aspect of the present invention, there is provided a downstream traffic processing system 900, where the downstream traffic processing system 900 includes: a memory 902 configured to store a computer program; the processor 904 is configured to execute a computer program to implement the downstream service processing method provided in any of the above technical solutions.
In this embodiment, the downstream traffic processing system 900 is composed of a memory 902 and a processor 904, the memory 902 stores a computer program, and the processor 904 is configured to execute the computer program stored in the memory 902 to implement the downstream traffic processing method provided in any of the above technical solutions. By limiting the call-callback-confirmation downstream service processing system 900, the same database conversation is held among the systems in a distributed system formed by a plurality of different systems, so that the databases are guaranteed to have strong consistency and isolation when submitted to the databases, and the problem of service data errors is avoided. And further, the technical effects of optimizing the downstream business processing system 900, improving the accuracy and reliability of business processing and improving the consistency of multi-system business processing are achieved.
In an embodiment of the fifth aspect of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and when being executed by a processor, the computer program implements the upstream service processing method or the downstream service processing method provided in any of the above embodiments, so that the computer-readable storage medium includes all the beneficial effects of the upstream service processing method or the downstream service processing method provided in any of the above embodiments, which are not described herein again.
In one embodiment of the present invention, as shown in fig. 10, the overall structure of the distributed system is as follows:
a message sender: and the call instruction between systems is converted into an asynchronous message, and the asynchronous message is ensured to be successfully sent to the message middleware.
The message receiver: and subscribing the message information in the message middleware and converting the message information into a local system call.
And the service coordinator: comprising three processing units.
A service management unit: and when the message is sent or received, the method is responsible for maintaining the service state information.
An isolation management unit: and in cooperation with the service state, the freezing and unfreezing of the service data are managed, and the isolation of the service is ensured by the frozen service.
The callback processing unit: and the callback processing component is responsible for registering and checking and calling the callback processing component when the system receives the response receipt messages of other systems.
As shown in fig. 11, the basic interaction principle of the upstream system and the downstream system is as follows:
the control of a logic service is completed by three times of interaction between two systems or multiple systems.
In the first step, the upstream system calls the downstream system operation interface through a message.
And secondly, the downstream system returns the calling result to the upstream system through the message.
And thirdly, after the upstream system processes the receipt, notifying the downstream system of the service ending condition through a message.
Three types of callback components can be embedded in the three steps:
the simple callback component 112: and the system can be called when receiving the receipt information.
The unified callback component 114: when multiple downstream systems are called, the call-back is carried out after all the downstream response receipts are successful.
The confirmation callback component 116: when the result is confirmed, a downward callback is performed.
The specific processing procedure is as follows, as shown in fig. 12:
1) and the application program calls the service management unit to declare the distributed service.
2) And the application program registers the service data into the isolation management unit for data isolation.
3) The application completes the local business operation.
4) The application program writes the call message into the database through the message sender.
5) The message sender asynchronously pushes the invocation message to the message middleware.
As shown in fig. 13:
1) the message middleware pushes the service invocation receipt message back to the upstream system.
2) And the message receiver calls the service management unit to modify the service calling state.
3) The message receiver calls the callback processing unit to check the callback component.
4) The callback processing unit checks whether a simple callback component is registered.
5) If a simple callback component exists, the callback processing unit executes the callback application.
As shown in fig. 14:
1) the service management unit checks the service processing result.
2) And when all the services are successful, the isolation management unit unfreezes the service data.
3) And the service management unit calls the callback service unit to carry out unified callback interface check.
4) And the callback service unit checks whether a unified callback component is registered.
5) If the unified callback component exists, the callback processing unit executes the callback application.
6) The application program writes the service confirmation message into the database through the message transmitter.
7) The message sender asynchronously pushes the service confirmation message to the message middleware.
As shown in fig. 15:
1) and the message middleware pushes the service confirmation message to a downstream system.
2) And the message receiver calls the isolation management unit to unfreeze the downstream service data.
3) The message receiver calls the callback processing unit to check the callback component.
4) The callback processing unit checks whether a confirmation callback component is registered.
5) If a confirmation callback component exists, the callback processing unit executes the callback application.
In the description of the present invention, the terms "plurality" or "a plurality" refer to two or more, and unless otherwise specifically defined, the terms "upper", "lower", and the like indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention; the terms "connected," "mounted," "secured," and the like are to be construed broadly and include, for example, fixed connections, removable connections, or integral connections; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description of the present invention, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In the present invention, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. An upstream traffic processing method, comprising:
sending a service calling instruction;
receiving a service calling receipt corresponding to the service calling instruction;
processing the corresponding service according to the service call receipt;
generating service confirmation information according to the service processing result;
sending the service confirmation information;
the step of processing the corresponding service according to the service call receipt specifically includes:
modifying the service state according to the service call receipt;
checking whether the upstream system is registered with a simple callback component;
based on the registration of the simple callback component in the upstream system, executing the corresponding service according to the service call receipt;
acquiring a service processing result, and unfreezing the service data based on the service processing result as a finished service;
checking whether a unified callback component is registered in an upstream system;
and based on the fact that a unified callback component is registered in the upstream system, generating service confirmation information according to the service processing result.
2. The upstream service processing method according to claim 1, wherein the step of sending the service invocation instruction specifically includes:
receiving service information;
freezing service data corresponding to the service information;
generating a service calling instruction according to the service information;
and sending the service calling instruction.
3. An upstream traffic processing system, comprising:
a memory configured to store a computer program;
a processor configured to execute the computer program to implement the upstream traffic processing method according to claim 1 or 2.
4. A method for downstream traffic processing, comprising:
receiving a service calling instruction;
processing the corresponding service according to the service calling instruction;
generating a service calling receipt according to the service processing result;
sending the service calling receipt;
the step of processing the corresponding service according to the service call instruction specifically includes:
freezing downstream service data corresponding to the service calling instruction according to the service calling instruction;
the downstream service processing method further comprises:
receiving service confirmation information;
and unfreezing the downstream service data according to the service confirmation information.
5. A downstream traffic processing system, comprising:
a memory configured to store a computer program;
a processor configured to execute the computer program to implement the downstream traffic processing method of claim 4.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the upstream traffic processing method according to claim 1 or 2; and/or the downstream traffic processing method according to claim 4.
CN201911158668.8A 2019-11-22 2019-11-22 Upstream and downstream service processing method and system, computer readable storage medium Active CN110995803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911158668.8A CN110995803B (en) 2019-11-22 2019-11-22 Upstream and downstream service processing method and system, computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911158668.8A CN110995803B (en) 2019-11-22 2019-11-22 Upstream and downstream service processing method and system, computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110995803A CN110995803A (en) 2020-04-10
CN110995803B true CN110995803B (en) 2022-04-19

Family

ID=70086011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911158668.8A Active CN110995803B (en) 2019-11-22 2019-11-22 Upstream and downstream service processing method and system, computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110995803B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669151A (en) * 2020-12-25 2021-04-16 深圳市金证科技股份有限公司 Method and equipment for processing multi-system cooperative service
CN113542406A (en) * 2021-07-14 2021-10-22 上海浦东发展银行股份有限公司 Asynchronous processing system of intersystem messages

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164790A (en) * 2011-12-09 2013-06-19 腾讯科技(深圳)有限公司 Internet payment system and data processing method thereof

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7739325B1 (en) * 2000-04-24 2010-06-15 Aspect Software, Inc. Apparatus and method for extensible real-time workflows
US7801912B2 (en) * 2005-12-29 2010-09-21 Amazon Technologies, Inc. Method and apparatus for a searchable data service
CN101753561B (en) * 2009-12-28 2013-01-16 中兴通讯股份有限公司 Business cluster processing method and cluster system
CN106991087A (en) * 2016-01-20 2017-07-28 阿里巴巴集团控股有限公司 A kind of method of distributed transactions, apparatus and system
CN106775959B (en) * 2016-12-06 2017-12-22 上海壹账通金融科技有限公司 distributed transaction processing method and system
CN106777026B (en) * 2016-12-08 2019-12-20 用友网络科技股份有限公司 Method, device and system for supporting final consistency of micro-service architecture transaction
CN108153598B (en) * 2017-12-25 2021-06-25 东软集团股份有限公司 Data consistency method and device based on micro-service architecture
CN109241186A (en) * 2018-08-29 2019-01-18 深圳市小牛在线互联网信息咨询有限公司 Management method, system, computer equipment and the storage medium of distributed transaction
CN109542639B (en) * 2018-11-06 2021-05-11 用友网络科技股份有限公司 Processing method and processing device for guaranteeing consistency of microservice calling data
CN109542964B (en) * 2018-11-06 2021-02-19 用友网络科技股份有限公司 Data calling method and data calling system
CN109670805A (en) * 2018-11-29 2019-04-23 中国人民银行清算总中心 Keep the internet banking system and service message processing method of data consistency
CN109783254A (en) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 Asynchronism callback method, apparatus, computer equipment and storage medium
CN110022260B (en) * 2019-02-02 2021-12-24 创新先进技术有限公司 Cross-environment receipt message processing method and system
CN110471746B (en) * 2019-08-22 2022-04-19 中国工商银行股份有限公司 Distributed transaction callback method, device and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164790A (en) * 2011-12-09 2013-06-19 腾讯科技(深圳)有限公司 Internet payment system and data processing method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"web业务开发中的同步互斥与异步回调";Ivan_lqc;《简书》;20150730;全文 *
"Windows平台应用程序权限能力控制研究";刘阳,黄皓;《计算机应用与软件》;20141031;第31卷(第10期);第10-13页 *

Also Published As

Publication number Publication date
CN110995803A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US11251966B2 (en) Sending cross-chain authenticatable messages
CN109451032B (en) Message transmission system
CN110995803B (en) Upstream and downstream service processing method and system, computer readable storage medium
CN111371892A (en) High-concurrency distributed message pushing system and method
US20070162560A1 (en) System and method for asynchronous request response
CN109542964B (en) Data calling method and data calling system
CN111694797B (en) File uploading and analyzing method, device, server and medium
US8484281B2 (en) System and method for callbacks based on web service addressing
CN108596582B (en) Polymerization payment platform solution based on dubbo
CN110889640A (en) Risk assessment method for preventing personal data from being leaked, terminal and network center
CN111626858A (en) Processing method and device for transaction, electronic equipment and computer readable medium
CN112596931A (en) Cross-process communication method and device, electronic equipment and storage medium
US10425778B2 (en) Distributed transactions on mobile devices via a messaging service provided by a mobile network operator
CN111934986A (en) Asynchronous message terminal pushing solution method and system
CN101605301A (en) A kind of group system and request message distribution method that carries out the multinode transaction
CN112732463A (en) Message subscription method and device based on big data
CN109670952B (en) Collecting and paying transaction platform
US20050153742A1 (en) System and method for pin blocking on terminal for mobile finance
CN115271959A (en) Distributed transaction log evidence storing and tracing method and system
CN115695077A (en) Bus data receiving method and device, electronic equipment and storage medium
CN111061576B (en) Method and system for creating entity object
CN112668998B (en) Flow implementation method, device, system, electronic equipment and readable storage medium
CN114356596A (en) Message processing method and device for distributed system
CN112866268A (en) Message processing method and system
CN110213322B (en) Content publishing processing method, client and server for community

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