CN113518384A - Distributed transaction processing method, device, equipment and computer readable storage medium - Google Patents

Distributed transaction processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113518384A
CN113518384A CN202110867247.3A CN202110867247A CN113518384A CN 113518384 A CN113518384 A CN 113518384A CN 202110867247 A CN202110867247 A CN 202110867247A CN 113518384 A CN113518384 A CN 113518384A
Authority
CN
China
Prior art keywords
communication
transaction
preprocessing
state
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.)
Granted
Application number
CN202110867247.3A
Other languages
Chinese (zh)
Other versions
CN113518384B (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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110867247.3A priority Critical patent/CN113518384B/en
Publication of CN113518384A publication Critical patent/CN113518384A/en
Application granted granted Critical
Publication of CN113518384B publication Critical patent/CN113518384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0289Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0252Traffic management, e.g. flow control or congestion control per individual bearer or channel
    • H04W28/0263Traffic management, e.g. flow control or congestion control per individual bearer or channel involving mapping traffic to individual bearers or channels, e.g. traffic flow template [TFT]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a distributed transaction processing method, a device, equipment and a computer readable storage medium, wherein the distributed transaction processing method comprises the following steps: receiving incoming NB communication flows, determining all NB communication transactions associated with the NB communication flows; preprocessing each NB communication transaction in parallel and acquiring a preprocessing result of each NB communication transaction; and if all the preprocessing results are successfully preprocessed, executing all the NB communication transactions in parallel. The invention solves the technical problems that the NB communication transaction serial waiting and low processing efficiency are caused by only allowing one communication transaction to occur in the traditional NB communication access mode.

Description

Distributed transaction processing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a distributed transaction processing method, apparatus, device, and computer readable storage medium.
Background
The cellular-based narrowband Internet of Things (NB-IoT) is an important branch of the Internet of everything today, and is receiving attention due to the characteristics of wide coverage, low power consumption, large connection and low cost. With the advent of the 5G era, the world wide interconnect has followed hundreds of millions of device connections and communications transfers. The traditional NB communication access mode only allows one communication transaction to occur on a channel, for the condition that one communication is accompanied by a plurality of transactions, when NB communication is received, the transactions are sequentially executed for the NB communication, when the last transaction returns to be executed successfully, the next transaction is executed, and when one transaction occupies a large time length, the uplink channel is blocked, and the communication processing is slow.
Disclosure of Invention
The invention mainly aims to provide a distributed transaction processing method, a distributed transaction processing device, distributed transaction processing equipment and a computer readable storage medium, and aims to solve the technical problems that the conventional NB communication access mode only allows one communication transaction to occur, so that NB communication transactions are in serial waiting and the processing efficiency is low.
In order to achieve the above object, the present invention provides a distributed transaction processing method, including the following steps:
receiving incoming NB communication flows, determining all NB communication transactions associated with the NB communication flows;
preprocessing each NB communication transaction in parallel and acquiring a preprocessing result of each NB communication transaction;
and if all the preprocessing results are successfully preprocessed, executing all the NB communication transactions in parallel.
Optionally, the step of determining all NB communication transactions associated with the NB communication flow comprises:
acquiring a communication message corresponding to the NB communication flow, and identifying all event fields in the communication message;
and determining matching fields matched with the event fields in a preset field transaction mapping table, determining to-be-executed NB communication transactions corresponding to the matching fields in the field transaction mapping table, and taking the to-be-executed NB communication transactions as NB communication transactions related to the NB communication flow.
Optionally, the step of determining all NB communication transactions associated with the NB communication flow is followed by:
acquiring the transaction state of each NB communication transaction, and setting each transaction state as a processing state;
detecting whether the transaction state of each NB communication transaction is successfully set to a processing state;
and if the NB communication transactions are successfully set to the in-process state, executing the step of preprocessing the NB communication transactions in parallel.
Optionally, the step of preprocessing each NB communication transaction in parallel includes:
preprocessing each NB communication transaction in parallel, and detecting whether a preprocessing process of each preprocessed transaction has a preprocessing exception or not in real time;
if a pre-execution exception exists in each pre-processed pre-processing process, determining an abnormal NB communication transaction corresponding to the pre-execution exception in each NB communication transaction;
and moving the abnormal NB communication transaction to a preset NB communication transaction interruption device, and continuing to execute the parallel preprocessing steps of the NB communication transactions after the abnormal NB communication transaction is recovered according to the NB communication transaction interruption device.
Optionally, the step of moving the abnormal NB communication transaction to a preset NB communication transaction interrupt device includes:
detecting whether the transaction state of the abnormal NB communication transaction is a processing state;
and if the transaction state of the abnormal NB communication transaction is a processing state, moving the abnormal NB communication transaction to a preset NB communication transaction interruption device.
Optionally, after the step of obtaining the preprocessing result of each NB communication transaction, the method includes:
and if the preprocessing result is the preprocessing failure, outputting prompt information that the processing result of the NB communication flow is the failure, adjusting the transaction state of each NB communication transaction, and stopping the processing flow of the NB communication flow.
Optionally, the step of adjusting the transaction status of each NB communication transaction includes:
adjusting the transaction state of each NB communication transaction from the in-process state to the initial state;
and if the target transaction state which is not successfully adjusted exists in the transaction states of the NB communication transactions, moving the NB communication transaction corresponding to the target transaction state to a preset NB communication transaction interruption device.
In addition, to achieve the above object, the present invention provides a distributed transaction processing apparatus, including:
a receiving module, configured to receive an incoming NB communication flow, and determine all NB communication transactions associated with the NB communication flow;
the preprocessing module is used for parallelly preprocessing each NB communication transaction and acquiring the preprocessing result of each NB communication transaction;
and the parallel execution module is used for executing the NB communication transactions in parallel if the preprocessing results are all preprocessing success.
In addition, to achieve the above object, the present invention further provides a distributed transaction processing apparatus, where the distributed transaction processing apparatus includes a memory, a processor, and a distributed transaction processing program stored in the memory and executable on the processor, and when executed by the processor, the distributed transaction processing apparatus implements the steps of the distributed transaction processing method as described above.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which a distributed transaction processing program is stored, and when the distributed transaction processing program is executed by a processor, the steps of the distributed transaction processing method as described above are implemented.
According to the invention, after the input NB communication stream is received and all NB communication transactions related to the NB communication stream are determined, each NB communication transaction is preprocessed in parallel, and after the preprocessing is successful, each NB communication transaction is executed in parallel, so that the phenomena of long communication blocking time and low processing efficiency caused by serially and sequentially processing distributed transactions in the prior art are avoided, and the technical problems of serial waiting of NB communication transactions and low processing efficiency caused by allowing only one communication transaction to occur in the traditional NB communication access mode are solved by enabling all NB communication transactions to be processed in parallel.
Drawings
FIG. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a distributed transaction processing method according to the present invention;
FIG. 3 is a schematic diagram of the apparatus elements of the distributed transaction apparatus of the present invention;
FIG. 4 is a schematic flow diagram of NB traffic flow in the distributed transaction method of the present invention;
fig. 5 is a schematic diagram of processing modules of NB traffic flow in the distributed transaction processing method of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention is distributed transaction processing equipment.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a distributed transaction program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke the distributed transaction processing program stored in the memory 1005 and perform the following operations:
receiving incoming NB communication flows, determining all NB communication transactions associated with the NB communication flows;
preprocessing each NB communication transaction in parallel and acquiring a preprocessing result of each NB communication transaction;
and if all the preprocessing results are successfully preprocessed, executing all the NB communication transactions in parallel.
Referring to fig. 2, the present invention provides a distributed transaction processing method, and in a first embodiment of the distributed transaction processing method, the distributed transaction processing method includes the following steps:
step S10, receiving input NB communication flow, and determining all NB communication transactions related to the NB communication flow;
at present, when NB (narrowband Internet of things) communication is received, transactions are sequentially executed for NB communication, when the last transaction returns to be executed successfully, the next transaction is executed, and when a transaction occupies a large time, an uplink channel is blocked, and the communication processing is slow. Therefore, in this embodiment, a plurality of communication transactions are processed in parallel, and NB communication transactions are decoupled and processed in a distributed manner, so that NB communication processing speed is increased. The process of distributed processing is as shown in fig. 4, after NB communication processing service is started, NB communication flow starts to be received, and one NB communication flow involves N NB communication transactions. Therefore, the NB communication processing service of each NB communication flow may be determined, and NB communication transaction 1, NB communication transaction 2, NB communication transaction N may be determined, and a processing flag bit may be performed, that is, after NB communication transaction processing is started, a processing flag bit is allocated for the NB communication transaction line and is marked as processing, and when NB communication transaction processing is ended, the processing flag bit is disabled.
As shown in fig. 5, the NB communication processing service includes an NB communication reception module, an NB communication transaction service module, and a management module. The NB communication reception module is mainly responsible for receiving NB communication and initiating NB communication processing services. The NB communication transaction service module is mainly responsible for operating specific NB communication transactions and providing operation interfaces for pre-execution, confirmation execution and cancellation execution. And the NB communication receiving module carries out NB communication transaction operation by calling the operation interface. The management module is used as a scheduling center and is responsible for overall service scheduling, the processing state of each NB communication transaction service module to the transaction is recorded, confirmation operation is carried out when all NB communication transaction service processing states are expressed as success, cancellation operation is carried out when any NB communication transaction service processing state is expressed as failure, specifically, the NB communication processing service maps the NB communication transaction to be executed by the NB communication according to an event field defined in an NB communication message, and after mapping is finished, a parallel attempt request is initiated to the mapped NB communication transaction service.
The management module records each NB communication service operation result, and initiates a confirmation operation request to the mapped NB communication transaction service when each operation result shows success; and when any operation result shows that the operation is failed, initiating a cancellation operation request to the mapped NB communication transaction service. After the request for initiating the confirmation operation is completed, outputting a processing result as success; after the cancel operation request is initiated, each NB communication transaction service returns to an initial state, and a processing result is output as failure.
Therefore, in the present embodiment, after receiving the respective NB communication streams, the respective NB communication streams are sequentially processed in chronological order of the respective received NB communication streams, and the processing manner is the same for each NB communication stream. And since each NB communication flow involves N NB communication transactions, all NB communication transactions associated with the NB communication flow may be determined first.
Step S20, preprocessing each NB communication transaction in parallel and acquiring the preprocessing result of each NB communication transaction;
after the NB communication stream is received and NB communication transaction processing is started, 1 to N NB communication transactions may be preprocessed according to the NB communication transaction processing start, and a preprocessing result of each NB communication transaction is obtained. It should be noted that, in this embodiment, the preprocessing of the NB communication transactions is to determine the normal processing flow of each NB communication transaction, and estimate and process the NB communication transactions in advance according to the processing flow to detect whether there is an abnormality.
Step S30, if all the preprocessing results are successful, executing all NB communication transactions in parallel.
After the preprocessing results of all NB communication transactions are obtained, if at least one of the NB communication transactions has a preprocessing failure, the N NB communication transactions are returned to the initial state, specifically, when a certain NB communication transaction fails to be executed in preprocessing, it may be determined first whether the NB communication state of the NB communication transaction is in processing, and if so, the NB communication transaction is returned to the transaction interruption position to be executed continuously. If not, returning the N NB communication transactions to the initial state, namely the unprocessed state. And when the judgment shows that the preprocessing results aiming at all the NB communication transactions are successful, the actual execution of N NB communication transactions can be carried out. And after the NB communication transaction is finished, the marking bit of the NB communication transaction is invalid, namely the NB communication processing state is changed from the middle processing state to the end processing state and is in an idle state.
In addition, in this embodiment, when an NB communication transaction is processed, a distributed transaction method is adopted to process multiple NB communication transactions in parallel, so that the communication transactions are triggered in parallel in the processing flow, the blocking duration of the NB communication transactions in the processing flow is greatly reduced, and the processing efficiency of the NB communication transactions is improved.
To assist understanding of the flow of the distributed transaction processing in this embodiment, the following description is given by way of example.
For example, after the NB communication data stream is accessed, an NB communication transaction is started, and the NB communication transaction processing state is modified to be in processing, that is, a flag bit is set for all NB communication transactions associated with the NB communication data stream, and the flag bit is marked as in processing. And then judging whether the state of each NB communication transaction is in process, if so, parallelly preprocessing N NB communication transactions, and if some NB communication transaction is abnormal in pre-execution during the parallel preprocessing of the N NB communication transactions, continuously judging whether the state of the NB communication transaction is in process, if so, returning to the interruption position of the NB communication transaction processing, and after the recovery of the NB communication transaction processing interruption processing, continuously parallelly preprocessing the N NB communication transactions. And determines whether all NB communication transactions are successfully preprocessed. If the NB communication transactions are not preprocessed successfully, the N NB communication transactions may be regressed to an initial state. If all NB communication transactions are successfully preprocessed, N NB communication transactions can be executed in parallel, and corresponding processing results are output. That is, if all of the 1 to N relevant NB communication transactions are successfully executed, it indicates that the NB communication transaction processing is successful, and the output processing result is successful. And if at least 1 processing failure exists in 1 to N related NB communication transactions, returning each transaction to the original state, and outputting a processing result as failure.
In the embodiment, after the input NB communication stream is received and all NB communication transactions associated with the NB communication stream are determined, each NB communication transaction is preprocessed in parallel, and after the preprocessing is successful, each NB communication transaction is executed in parallel, so that the phenomena of long communication blocking time and low processing efficiency caused by serially and sequentially processing distributed transactions in the prior art are avoided.
Further, based on the first embodiment of the present invention, a second embodiment of the distributed transaction processing method of the present invention is proposed, in this embodiment, the step S10 of the above embodiment is a refinement of the step of determining all NB communication transactions associated with the NB communication flow, and includes:
step a, acquiring a communication message corresponding to the NB communication flow, and identifying all event fields in the communication message;
in this embodiment, after all NB communication flows are acquired, and when NB communication flows are sequentially processed according to the received time sequence, a communication packet of the NB communication flow being processed may be acquired first, and character recognition may be performed on the communication packet to obtain all event fields having each event information. And, each event field includes at least one event information. And the event information is associated with each NB communication event, namely, each event information corresponds to at least one NB communication event.
And b, determining matching fields matched with the event fields in a preset field transaction mapping table, determining to-be-executed NB communication transactions corresponding to the matching fields in the field transaction mapping table, and taking the to-be-executed NB communication transactions as NB communication transactions related to the NB communication flow.
After all event fields in the communication message are acquired, a field transaction mapping table set in advance needs to be acquired, wherein the field transaction mapping table comprises each event field and NB communication transactions corresponding to each event field. And then traversing each event field, matching the traversed event field with all fields in a field transaction mapping table set in advance to obtain a matching field matched with each event field, and taking the NB communication transaction to be executed corresponding to each matching field in the field transaction mapping table as the NB communication transaction related to the NB communication flow. Further in this embodiment, in addition to determining all NB communication transactions associated with NB communication flows from the field transaction mapping table, NB communication events may also be determined from event information contained in the event field.
In this embodiment, all event fields are determined by identifying the communication packet corresponding to the NB communication flow, and the to-be-executed NB communication transaction corresponding to each event field is obtained according to the field transaction mapping table and is used as the NB communication transaction, thereby ensuring the accuracy of the obtained NB communication transaction.
Further, the step of determining all NB communication transactions associated with the NB communication flow is followed by:
step c, acquiring the transaction state of each NB communication transaction, and setting each transaction state as a processing state;
in this embodiment, after determining all NB communication transactions, the transaction state of each NB communication transaction needs to be acquired, and each transaction state is set to be the processing state in sequence. Adding corresponding flag bits for each NB communication transaction, and marking the processing on the flag bits.
D, detecting whether the transaction state of each NB communication transaction is successfully set to be a processing state;
and after the setting is completed, whether the transaction state of each NB communication transaction is successfully established as the in-process state can be sequentially detected. And different operations are executed according to different detection results.
And e, if the states are successfully set to the processing states, executing the step of preprocessing each NB communication transaction in parallel.
When it is determined that each NB communication transaction has been successfully set to the in-process state, each NB communication transaction may be preprocessed in parallel. However, if the transaction status of the NB communication transaction is found not to be in-process, it is sent to the NB communication transaction interrupt.
In this embodiment, the transaction state of each NB communication transaction is adjusted to the processing state, and when all NB communication transactions are successfully set to the processing state, each NB communication transaction is preprocessed in parallel, so that normal preprocessing is ensured.
Further, the step of preprocessing each NB communication transaction in parallel includes:
step g, preprocessing each NB communication transaction in parallel, and detecting whether each preprocessed preprocessing process has a pre-execution exception or not in real time;
in this embodiment, each NB communication transaction may be preprocessed in parallel, and in the process of preprocessing each NB communication transaction in parallel, when each NB communication transaction is preprocessed, whether there is an exception in the preprocessing process is detected in real time, that is, whether there is a pre-execution exception is determined, and preprocessing cannot be performed. And different operations are executed according to different detection results.
Step h, if a pre-execution exception exists in each pre-processing process, determining an abnormal NB communication transaction corresponding to the pre-execution exception in each NB communication transaction;
and k, moving the abnormal NB communication transaction to a preset NB communication transaction interruption device, and continuing to execute the parallel preprocessing steps of the NB communication transactions after the abnormal NB communication transaction is recovered according to the NB communication transaction interruption device.
When the pre-execution abnormality exists in the preprocessing process, the NB communication transaction with the pre-execution abnormality can be directly used as an abnormal communication transaction, the abnormal NB communication transaction can be moved to an NB communication interruption device which is set in advance, the abnormal NB communication interruption can recover the abnormal NB communication transaction at regular time or based on different time intervals, and after the abnormal NB communication transaction is recovered successfully, and the transaction state of the recovered abnormal NB communication transaction is in the process, the process of parallelly preprocessing each NB communication transaction can be continuously executed. If the pre-execution exception does not exist, the pre-execution is continued until all NB communication transactions are pre-executed.
In this embodiment, when it is checked that each NB communication transaction is preprocessed and there is a pre-execution exception, the corresponding abnormal NB communication transaction is sent to the abnormal NB communication transaction interrupt device for recovery processing, thereby ensuring that NB communication transactions are performed efficiently.
Specifically, the step of moving the abnormal NB communication transaction to a preset NB communication transaction interruption device includes:
step m, detecting whether the transaction state of the abnormal NB communication transaction is a processing state;
in this embodiment, when it is detected that an abnormal NB communication transaction exists, it is further required to detect a transaction state of the abnormal NB communication transaction, determine whether the transaction state is a processing state, and execute different operations according to different detection results.
And n, if the transaction state of the abnormal NB communication transaction is a processing state, moving the abnormal NB communication transaction to a preset NB communication transaction interruption device.
When the transaction state of the abnormal NB communication transaction is judged to be in the processing state, the abnormal NB communication transaction can be directly moved to an NB communication transaction interruption device which is set in advance. However, if the transaction state of the abnormal NB communication transaction is not the in-process state, the corresponding warning information is output.
In this embodiment, when it is determined that the transaction status of the abnormal NB communication transaction is in the processing status, the abnormal NB communication transaction is sent to the abnormal NB communication transaction interrupt device for recovery processing, thereby ensuring effective performance of the NB communication transaction.
Further, after the step of obtaining the preprocessing result of each NB communication transaction, the method includes:
and step x, if the preprocessing result is that the preprocessing fails, outputting prompt information that the processing result of the NB communication flow is that the preprocessing fails, adjusting the transaction state of each NB communication transaction, and stopping the processing flow of the NB communication flow.
When the preprocessing result for each NB communication transaction is judged to be a preprocessing failure, the prompt message that the processing result of the NB communication flow is a failure can be directly output to inform the user. And meanwhile, the transaction state of each NB communication transaction is adjusted, namely the transaction state is adjusted from processing to non-processing, or the flag bit in the NB communication transaction is directly controlled to be invalid.
In this embodiment, when it is determined that the preprocessing result is a preprocessing failure, the transaction status of each NB communication transaction is adjusted, and the processing flow thereof is stopped. Therefore, problems can be found before processing, and the phenomenon of actual errors is avoided.
Specifically, the step of adjusting the transaction status of each NB communication transaction includes:
step y, adjusting the transaction state of each NB communication transaction from the processing state to the initial state;
and z, if the target transaction state which is not successfully adjusted exists in the transaction states of the NB communication transactions, moving the NB communication transaction corresponding to the target transaction state to a preset NB communication transaction interruption device.
In this embodiment, when the transaction state of each NB communication transaction is adjusted, the transaction state of each NB communication transaction may be adjusted from the in-process state to the most initial state, that is, the initial state, such as the idle state, in parallel or sequentially. And when the transaction state which is not successfully adjusted is found in the transaction states of the NB communication transactions through judgment, the NB communication transactions are taken as the target transaction state. And the NB communication transaction corresponding to the target transaction state is moved to the NB communication transaction apparatus set in advance for corresponding processing.
In this embodiment, the transaction state of each NB communication transaction is adjusted, and when it is determined that there is a target transaction state that is not successfully adjusted, an NB communication transaction corresponding to the target transaction state is sent to the NB communication transaction interruption device. Thereby ensuring efficient execution of NB communication transactions.
In addition, referring to fig. 3, an embodiment of the present invention further provides a distributed transaction processing apparatus, including:
a receiving module a10, configured to receive an incoming NB communication flow, determine all NB communication transactions associated with the NB communication flow;
a preprocessing module a20, configured to perform parallel preprocessing on each NB communication transaction, and obtain a preprocessing result of each NB communication transaction;
a parallel execution module a30, configured to execute each NB communication transaction in parallel if each of the preprocessing results is a successful preprocessing.
Optionally, the receiving module a10 is configured to:
acquiring a communication message corresponding to the NB communication flow, and identifying all event fields in the communication message;
and determining matching fields matched with the event fields in a preset field transaction mapping table, determining to-be-executed NB communication transactions corresponding to the matching fields in the field transaction mapping table, and taking the to-be-executed NB communication transactions as NB communication transactions related to the NB communication flow.
Optionally, the receiving module a10 is configured to:
acquiring the transaction state of each NB communication transaction, and setting each transaction state as a processing state;
detecting whether the transaction state of each NB communication transaction is successfully set to a processing state;
and if the NB communication transactions are successfully set to the in-process state, executing the step of preprocessing the NB communication transactions in parallel.
Optionally, a preprocessing module a20, configured to:
preprocessing each NB communication transaction in parallel, and detecting whether a preprocessing process of each preprocessed transaction has a preprocessing exception or not in real time;
if a pre-execution exception exists in each pre-processed pre-processing process, determining an abnormal NB communication transaction corresponding to the pre-execution exception in each NB communication transaction;
and moving the abnormal NB communication transaction to a preset NB communication transaction interruption device, and continuing to execute the parallel preprocessing steps of the NB communication transactions after the abnormal NB communication transaction is recovered according to the NB communication transaction interruption device.
Optionally, a preprocessing module a20, configured to:
detecting whether the transaction state of the abnormal NB communication transaction is a processing state;
and if the transaction state of the abnormal NB communication transaction is a processing state, moving the abnormal NB communication transaction to a preset NB communication transaction interruption device.
Optionally, a preprocessing module a20, configured to:
and if the preprocessing result is the preprocessing failure, outputting prompt information that the processing result of the NB communication flow is the failure, adjusting the transaction state of each NB communication transaction, and stopping the processing flow of the NB communication flow.
Optionally, a preprocessing module a20, configured to:
adjusting the transaction state of each NB communication transaction from the in-process state to the initial state;
and if the target transaction state which is not successfully adjusted exists in the transaction states of the NB communication transactions, moving the NB communication transaction corresponding to the target transaction state to a preset NB communication transaction interruption device.
The steps implemented by each functional module of the distributed transaction processing apparatus may refer to each embodiment of the distributed transaction processing method of the present invention, and are not described herein again.
In addition, the present invention also provides a distributed transaction processing apparatus, including: a memory, a processor, and a distributed transaction program stored on the memory; the processor is configured to execute the distributed transaction processing program to implement the steps of the embodiments of the distributed transaction processing method described above.
The present invention also provides a computer readable storage medium storing one or more programs which are also executable by one or more processors for implementing the steps of the embodiments of the distributed transaction processing method described above.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the distributed transaction processing method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A distributed transaction processing method, characterized in that the distributed transaction processing method comprises the steps of:
receiving incoming NB communication flows, determining all NB communication transactions associated with the NB communication flows;
preprocessing each NB communication transaction in parallel and acquiring a preprocessing result of each NB communication transaction;
and if all the preprocessing results are successfully preprocessed, executing all the NB communication transactions in parallel.
2. The distributed transaction processing method of claim 1, wherein said step of determining all NB communication transactions associated with said NB communication flow comprises:
acquiring a communication message corresponding to the NB communication flow, and identifying all event fields in the communication message;
and determining matching fields matched with the event fields in a preset field transaction mapping table, determining to-be-executed NB communication transactions corresponding to the matching fields in the field transaction mapping table, and taking the to-be-executed NB communication transactions as NB communication transactions related to the NB communication flow.
3. The distributed transaction processing method of claim 1, wherein said step of determining all NB communication transactions associated with said NB communication flow is followed by:
acquiring the transaction state of each NB communication transaction, and setting each transaction state as a processing state;
detecting whether the transaction state of each NB communication transaction is successfully set to a processing state;
and if the NB communication transactions are successfully set to the in-process state, executing the step of preprocessing the NB communication transactions in parallel.
4. The distributed transaction processing method of claim 1, wherein the step of preprocessing each NB communication transaction in parallel comprises:
preprocessing each NB communication transaction in parallel, and detecting whether a preprocessing process of each preprocessed transaction has a preprocessing exception or not in real time;
if a pre-execution exception exists in each pre-processed pre-processing process, determining an abnormal NB communication transaction corresponding to the pre-execution exception in each NB communication transaction;
and moving the abnormal NB communication transaction to a preset NB communication transaction interruption device, and continuing to execute the parallel preprocessing steps of the NB communication transactions after the abnormal NB communication transaction is recovered according to the NB communication transaction interruption device.
5. The distributed transaction processing method of claim 4, wherein the step of moving the abnormal NB communication transaction to a preset NB communication transaction interrupting device comprises:
detecting whether the transaction state of the abnormal NB communication transaction is a processing state;
and if the transaction state of the abnormal NB communication transaction is a processing state, moving the abnormal NB communication transaction to a preset NB communication transaction interruption device.
6. The distributed transaction processing method of any of claims 1 to 5, wherein the step of obtaining the pre-processing result of each NB communication transaction is followed by:
and if the preprocessing result is the preprocessing failure, outputting prompt information that the processing result of the NB communication flow is the failure, adjusting the transaction state of each NB communication transaction, and stopping the processing flow of the NB communication flow.
7. The distributed transaction processing method of claim 6, wherein said step of adjusting the transaction status of each said NB communication transaction comprises:
adjusting the transaction state of each NB communication transaction from the in-process state to the initial state;
and if the target transaction state which is not successfully adjusted exists in the transaction states of the NB communication transactions, moving the NB communication transaction corresponding to the target transaction state to a preset NB communication transaction interruption device.
8. A distributed transaction processing apparatus, the distributed transaction processing apparatus comprising:
a receiving module, configured to receive an incoming NB communication flow, and determine all NB communication transactions associated with the NB communication flow;
the preprocessing module is used for parallelly preprocessing each NB communication transaction and acquiring the preprocessing result of each NB communication transaction;
and the parallel execution module is used for executing the NB communication transactions in parallel if the preprocessing results are all preprocessing success.
9. A distributed transaction device, comprising: memory, a processor and a distributed transaction processing program stored on the memory and executable on the processor, the distributed transaction processing program when executed by the processor implementing the steps of the distributed transaction processing method according to any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a distributed transaction processing program which, when executed by a processor, implements the steps of the distributed transaction processing method of any one of claims 1 to 7.
CN202110867247.3A 2021-07-29 2021-07-29 Distributed transaction processing method, device, equipment and computer readable storage medium Active CN113518384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110867247.3A CN113518384B (en) 2021-07-29 2021-07-29 Distributed transaction processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110867247.3A CN113518384B (en) 2021-07-29 2021-07-29 Distributed transaction processing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113518384A true CN113518384A (en) 2021-10-19
CN113518384B CN113518384B (en) 2023-12-01

Family

ID=78067853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110867247.3A Active CN113518384B (en) 2021-07-29 2021-07-29 Distributed transaction processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113518384B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080247390A1 (en) * 2007-04-06 2008-10-09 Research In Motion Limited System and method for correlating messages within a wireless transaction
US20150317349A1 (en) * 2014-05-02 2015-11-05 Facebook, Inc. Providing eventual consistency for multi-shard transactions
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block
CN109684050A (en) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 A kind of the affairs actuator and its application method of parallelization
CN111045794A (en) * 2019-12-17 2020-04-21 深圳前海环融联易信息科技服务有限公司 Distributed transaction processing method, device, system, computer equipment and storage medium
CN111352704A (en) * 2018-12-21 2020-06-30 叶常青 Distributed global transaction processing system and method based on policy management
CN111679892A (en) * 2020-06-04 2020-09-18 中国建设银行股份有限公司 Distributed transaction processing method, device, equipment and medium
WO2020224251A1 (en) * 2019-05-07 2020-11-12 深圳壹账通智能科技有限公司 Block chain transaction processing method, device, apparatus and storage medium
CN112306646A (en) * 2020-06-29 2021-02-02 北京沃东天骏信息技术有限公司 Method, device, equipment and readable storage medium for processing transaction
CN112822284A (en) * 2021-01-22 2021-05-18 平安壹钱包电子商务有限公司 Data processing method and device based on dynamic proxy and computer equipment
US20210176333A1 (en) * 2019-12-10 2021-06-10 International Business Machines Corporation Controlling transaction requests between applications and servers

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080247390A1 (en) * 2007-04-06 2008-10-09 Research In Motion Limited System and method for correlating messages within a wireless transaction
US20150317349A1 (en) * 2014-05-02 2015-11-05 Facebook, Inc. Providing eventual consistency for multi-shard transactions
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block
CN109684050A (en) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 A kind of the affairs actuator and its application method of parallelization
CN111352704A (en) * 2018-12-21 2020-06-30 叶常青 Distributed global transaction processing system and method based on policy management
WO2020224251A1 (en) * 2019-05-07 2020-11-12 深圳壹账通智能科技有限公司 Block chain transaction processing method, device, apparatus and storage medium
US20210176333A1 (en) * 2019-12-10 2021-06-10 International Business Machines Corporation Controlling transaction requests between applications and servers
CN111045794A (en) * 2019-12-17 2020-04-21 深圳前海环融联易信息科技服务有限公司 Distributed transaction processing method, device, system, computer equipment and storage medium
CN111679892A (en) * 2020-06-04 2020-09-18 中国建设银行股份有限公司 Distributed transaction processing method, device, equipment and medium
CN112306646A (en) * 2020-06-29 2021-02-02 北京沃东天骏信息技术有限公司 Method, device, equipment and readable storage medium for processing transaction
CN112822284A (en) * 2021-01-22 2021-05-18 平安壹钱包电子商务有限公司 Data processing method and device based on dynamic proxy and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王成良;李立新;叶剑;秦小龙;: "一种基于JMS的分布式异步事务处理模型设计", 信息工程大学学报, no. 02 *

Also Published As

Publication number Publication date
CN113518384B (en) 2023-12-01

Similar Documents

Publication Publication Date Title
WO2021227677A1 (en) Scene pushing method, scene executing method, scene pushing device, scene executing device, terminal, server, and system
US8732694B2 (en) Method and system for performing services in server and client of client/server architecture
CN112181746B (en) Fault repairing method, device and equipment of vehicle-mounted operating system
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN111400330A (en) Task processing method, device, equipment and computer readable storage medium
CN110673986A (en) Memory operation abnormity capturing method, device, terminal and storage medium
CN114189559B (en) Axios-based interface repeated request processing method and system
CN112805691A (en) Exception handling method, terminal device and storage medium
CN112416698B (en) Expansion method and device of monitoring system, storage medium and electronic equipment
CN106550021B (en) Push method and device for push message
CN106933932B (en) Data processing method and device and application server
CN112286559A (en) Upgrading method and device for vehicle-mounted intelligent terminal
CN113518384A (en) Distributed transaction processing method, device, equipment and computer readable storage medium
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN109446462B (en) Page-based data monitoring processing method, device, equipment and storage medium
CN115599669A (en) Debugging method and device of microservice, electronic equipment and readable storage medium
CN111367934A (en) Data consistency checking method, device, server and medium
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN115344289A (en) Client upgrading method and device, terminal equipment and storage medium
CN110336690B (en) Service request processing method, device, equipment and computer readable storage medium
CN114389970A (en) Link monitoring method and device
CN113867145A (en) Application control method and device, electronic equipment and storage medium
CN110443910B (en) Method, system, device and storage medium for monitoring state of unmanned device
CN111580940A (en) Method and device for processing multiple inter-process processes of application program and electronic equipment
CN112379952A (en) Method for implementing cross-process callback

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