Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Referring to fig. 1, fig. 1 is an application environment diagram of a transaction information processing method according to an embodiment of the present application. As shown in fig. 1, the application environment includes:
1) terminal POS machine. The terminal POS machine is used for initiating a transaction request. The terminal POS machine can also be other terminal equipment such as a smart phone and an ATM, and the terminal needs to communicate with the background server in an instant mode to conduct transaction communication.
2) And (4) a server. The server is used for receiving the transaction request of the terminal, processing the transaction request and returning a transaction result to the terminal, and comprises a preset rear-end access layer, a preset rear-end service layer and a preset rear-end message platform.
The operation process of each main body is as follows:
1) the terminal POS machine initiates a transaction request to the server in the transaction process;
2) the server receives a transaction request sent by a terminal POS machine based on a preset back-end access layer, and forwards the transaction request to a preset back-end service layer so that the preset back-end service layer processes the transaction request;
3) the preset back-end access layer subscribes a message notification of a transaction result corresponding to the transaction request to a preset back-end message platform;
4) the message notification is used for processing the transaction request by the preset back-end service layer, obtaining a transaction result corresponding to the transaction request after the processing is finished, and publishing the transaction result to the preset back-end message platform in a message publishing way;
5) after receiving a message corresponding to the transaction request issued by a preset back-end service layer, a preset back-end message platform informs a preset back-end access layer of the message, the preset back-end access layer receives the message from the preset back-end message platform, and obtains a transaction result corresponding to the transaction request according to the message;
6) and returning the transaction result to the terminal POS so as to realize asynchronous communication between the terminal POS machine and the server.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a transaction information processing method according to an embodiment of the present disclosure. As shown in FIG. 2, the method includes the following steps S21-S26:
and S21, receiving the transaction request sent by the terminal based on the preset back end access layer.
Specifically, in the embodiment of the present application, a backend service layer (i.e., a preset backend service layer) is disposed in a server backend, and the backend service layer is configured to process a transaction request of a terminal to obtain a processing end corresponding to the transaction request, and a backend access layer (i.e., a preset backend access layer) is disposed in the server backend, and the interaction information between the terminal and the preset backend service layer is forwarded through the preset backend access layer, so that the backend server completes the transaction request of the terminal, and returns a transaction result corresponding to the transaction request to the terminal, thereby implementing asynchronous processing on the transaction request of the terminal. Compared with the prior art, the method and the device have the advantages that the terminal is directly communicated with the back-end service layer for processing the transaction information of the terminal, for example, the terminal POS machine is directly communicated with the back-end service layer, the preset back-end access layer is additionally arranged on the background of the server, and the asynchronous communication between the terminal and the back-end service layer is realized through the preset back-end access layer, so that the asynchronous transaction between the terminal and the back-end server is realized, the technical problem that the processing efficiency of the transaction information is limited by polling interval time and network communication consumption in the prior art is low is solved, the processing efficiency of the transaction request is improved, and the experience of a user on the transaction speed is improved. This implementation of asynchronous transactions is equally applicable to other terminal devices, such as: terminals such as smart phones in intelligent equipment or self-service terminals such as ATM machines need the terminals to perform instant communication with a background server.
The terminal carries out transaction, when the background server is required to process the transaction to obtain a transaction result, the terminal initializes and connects with a network, and then initiates a transaction request to a back end corresponding to the background server, and the background server receives the transaction request sent by the terminal based on a preset back end access layer.
Further, the preset rear access layer is constructed by adopting a preset Netty framework. Because the Netty network communication framework can ensure the performance, stability and flexibility of the application, the Netty network communication framework is used for processing the operations of transmission, coding, decoding and the like of the message, and the processing capability of service access is ensured.
Further, the step of receiving the transaction request sent by the terminal based on the preset backend access layer includes:
and receiving a transaction request sent by the terminal according to a preset duplex communication mode between the terminal and the preset rear access layer based on the preset rear access layer.
Specifically, as Netty absorbs a plurality of protocols, for example, various protocols including FTP, SMTP, HTTP, TCP, UDP, and the like, in order to improve the transmission speed and stability of the terminal and the preset backend access layer, the terminal and the preset backend access layer both adopt a duplex communication mode of TCP + ProtoBuff protocol, and the backend access layer uses a Netty network communication framework to process operations such as transmission, encoding, decoding, and the like of a message, thereby ensuring the processing capability of service access. Compared with the prior art, the terminal is directly communicated with the back-end service layer, for example, the terminal POS machine is directly communicated with the back-end service layer, simplex communication from the terminal to the back end is adopted as the communication mode, the preset back-end access layer is adopted in the embodiment of the application to realize asynchronous communication between the terminal and the back-end service layer, and the preset duplex communication mode is adopted between the terminal and the preset back-end access layer.
Furthermore, the preset duplex communication mode includes a duplex communication mode of a TCP and a ProtoBuff protocol.
Specifically, in the process of implementing asynchronous processing of terminal transaction in the embodiment of the present application, if a communication protocol of TCP + ProtoBuff is used for transaction asynchronization, the transmission efficiency and stability of a transaction request can be effectively improved, and especially in a weak network environment, the method has great advantages in transmission speed and stability compared with a conventional http/https mode.
S22, forwarding the transaction request to a preset back-end service layer so that the preset back-end service layer processes the transaction request.
S23, subscribing a message notice of a transaction result corresponding to the transaction request to a preset back-end message platform, wherein the message notice is generated by the preset back-end service layer processing the transaction request to obtain the transaction result and publishing the transaction result to the preset back-end message platform.
S24, receiving the message notification from the preset back-end message platform.
And S25, acquiring the transaction result corresponding to the transaction request according to the message notification.
And S26, returning the transaction result to the terminal.
Specifically, after receiving the transaction request of the terminal, the preset back-end access layer forwards the transaction request to the preset back-end service layer, so that the preset back-end service layer processes the transaction request, and simultaneously subscribes a message notification of a transaction result corresponding to the transaction request to a preset back-end message platform, wherein the subscribed content includes information such as a transaction state, a transaction order number, a transaction amount, payment time, a payment mode and the like corresponding to the transaction request. The preset back-end service layer processes the transaction request according to a preset transaction request processing sequence to obtain a transaction result corresponding to the transaction request, wherein the transaction result comprises information such as a transaction state, a transaction order number, a transaction amount, payment time and a payment mode corresponding to the transaction request, and the transaction state comprises transaction success or transaction failure. When the transaction cannot be returned to the final state immediately, a preset back-end service layer selects a subscription theme and issues a transaction message to a message platform according to a preset strategy of load balancing when the transaction is converted into the final state in transaction processing, namely after the preset back-end service layer completes processing of the transaction request, the obtained transaction result is issued to the preset back-end message platform.
The publish-subscribe (Pub/Sub) is a message communication mode, a mode oriented to a network structure, describes how two different parts of messages are connected and communicated with each other, a sender (Pub) sends the messages, a subscriber (Sub) receives the messages, and a publish-subscribe mechanism is mainly used for constructing instant messaging application.
And after receiving the message notification of the transaction result corresponding to the transaction request sent by the preset back-end message platform, the preset back-end access layer acquires the transaction result corresponding to the transaction request according to the message notification. According to the embodiment of the application, based on the preset rear-end access layer and the preset rear-end message platform, the asynchronous communication between the terminal and the rear-end service layer is realized through the rear-end access layer and the preset rear-end message platform, the processing efficiency of transaction requests is improved, and the experience of users on transaction speed is improved.
In the embodiment of the application, based on a preset backend access layer, a transaction request sent by a terminal is received, the transaction request is forwarded to the preset backend service layer, so that the preset backend service layer processes the transaction request, a message notification of a transaction result corresponding to the transaction request is subscribed to a preset backend message platform, the message notification is received from the preset backend message platform, the transaction result corresponding to the transaction request is obtained according to the message notification, and the transaction result is returned to the terminal, so that the instant communication of the transaction information between the terminal and a server in the traditional technology is converted into asynchronous communication between the terminal and the server, and compared with the prior art in which the instant communication is limited by polling interval time and network communication time consumption, especially under the condition of poor network environment, the embodiment of the application can improve the processing efficiency of the transaction request, the experience of the user on the transaction speed is improved. The transaction information processing method for terminal transaction asynchronization provided by the embodiment of the application improves the speed and stability of the transaction result notification touch terminal, and meanwhile, analysis from the point of a merchant can obviously feel the improvement of the transaction speed and stability when the transaction information processing method is used for transaction, so that the merchant can quickly finish transaction operations such as collection and the like in a peak period of operation.
Referring to fig. 3, fig. 3 is a schematic view of a first sub-flow of a transaction information processing method according to an embodiment of the present application. In this embodiment, the transaction request includes a preset transaction identifier corresponding to the transaction request, the preset back-end message platform includes a plurality of preset topics, and the step of subscribing to the preset back-end message platform for a message notification of the transaction result corresponding to the transaction request includes:
s301, determining a target preset theme corresponding to the transaction request according to the preset transaction identifier;
s302, subscribing the information notice of the transaction result corresponding to the transaction request to the target preset topic.
The Topic is in English, messages in the publish-subscribe mode are uniformly collected (namely a preset back-end Message platform), different producers send messages to the Topic, and the messages are distributed to different subscribers by MQ servers (MQ, English is a Message Queue), so that the broadcast of the messages is realized.
Specifically, under the condition that the preset back-end message platform comprises a plurality of preset themes, when a message notification needs to be subscribed to the theme contained in the preset back-end message platform after a transaction request is received, the subscriptions of the message notification corresponding to the transaction request need to be distributed to different preset themes, so that the plurality of preset themes process the subscriptions of the message notification as uniformly as possible, and a distributed processing mode is adopted for the subscriptions of the message notification, so that the processing efficiency of the preset themes on the message notification can be improved, and the network congestion and the bottleneck problem of the performance of the computer equipment caused by the processing of a large number of message notifications can be relieved. After receiving the transaction request, subscribing the message notification to the topic included in the preset back-end message platform, for example, the message notification may be distributed according to a preset time period, the subscription of the message notification in the same preset time period is distributed to a preset topic, the subscription of the message notification in another preset time period is distributed to another preset topic, and the like, and the message notification may also be distributed according to the source of the transaction request, where different preset topics correspond to different transaction request sources, and may also be distributed according to the transaction type to which the transaction request belongs, and different topics correspond to different transaction types, and the like.
Referring to fig. 4, fig. 4 is a second sub-flow diagram of a transaction information processing method according to an embodiment of the present application. In this embodiment, a plurality of preset themes preset with respective corresponding preset theme numbers, and the step of determining the target preset theme corresponding to the transaction request according to the preset transaction identifier includes:
s41, acquiring a total number of themes corresponding to a plurality of preset themes;
s42, acquiring the preset transaction identifier, and calculating the Hash value of the transaction identifier corresponding to the preset transaction identifier according to a preset Hash value calculation mode;
s43, performing modulo operation on the subject total value based on the transaction identifier Hash value to obtain a transaction identifier quotient value corresponding to the preset transaction identifier;
s44, determining a target preset theme number corresponding to the transaction identifier quotient according to the transaction identifier quotient and the preset theme number;
and S45, determining a target preset theme according to the target preset theme number.
Specifically, in order to improve the processing capability of the preset backend message platform on the message, the preset backend message platform may adopt a distributed processing manner, the preset backend message platform may include a plurality of preset themes, the plurality of preset themes preset respective corresponding preset theme numbers, and each theme processes a part of the message, for example, the preset backend message platform may be divided into 4 themes. In order to enable a plurality of subscriptions for processing message notifications with balanced preset topics, the message notifications are distributed to different preset topics in a balanced manner, a total number of topics corresponding to the preset topics can be obtained, meanwhile, the transaction request comprises a preset transaction identifier corresponding to the transaction request, after a preset back-end access layer receives the transaction request, the preset transaction identifier is obtained, and a Hash value of the transaction identifier corresponding to the preset transaction identifier is calculated according to a preset Hash value calculation mode, because the Hash value is a group of binary values obtained by encrypting file contents, each number in the group of binary values is summed based on the group of binary values, and then a value corresponding to the Hash value can be obtained, so that the total number of the topics can be subjected to modulo operation based on the Hash value of the transaction identifier, the method comprises the steps of obtaining a transaction identifier quotient value corresponding to a preset transaction identifier, determining a target preset subject number corresponding to the transaction identifier quotient value according to the transaction identifier quotient value and the preset subject number, determining a target preset subject according to the target preset subject number, and subscribing a message notice of a transaction result corresponding to a transaction request to the target preset subject, so that a background server can calculate a Hash value of transaction identifier information firstly, and then load the Hash value on a message subject corresponding to the quotient after the Hash value is modulo, thereby realizing distributed processing of messages corresponding to the transaction request, reducing the number of messages processed by each subject, improving the processing capacity of a preset rear-end message platform on the messages, improving the processing efficiency of the messages, and improving the processing efficiency of terminal transactions. The modulus operation (mod) is that, when a quotient is calculated, the quotient is rounded in a negative infinite direction, and the quotient is made to be small as much as possible, and assuming that integers a and b exist, the modulus operation can be divided into two steps:
1) and (3) solving an integer quotient: c is a/b; 2) calculating a modulus: r ═ a- (c ═ b).
Alternatively, the above 1) and 2) can also be described as: 3) overall calculation mode: amodb ═ a-b [ a/b ] ([ a/b ] denotes integer quotient).
Referring to fig. 5, fig. 5 is a schematic view of a third sub-flow of a transaction information processing method according to an embodiment of the present application. In this embodiment, before the step of returning the transaction result to the terminal, the method further includes:
s51, judging whether the processing time corresponding to the transaction result is within a preset timeout period and whether the transaction quantity corresponding to all the transaction results to be processed is smaller than or equal to a preset quantity threshold value;
s52, if the processing time is within the preset overtime time and the transaction quantity corresponding to all the transaction results to be processed is less than or equal to the preset quantity threshold, executing the step of returning the transaction results to the terminal;
and S53, if the processing time is not within the preset overtime time or the transaction quantity corresponding to all the transaction results to be processed is greater than the preset quantity threshold value, continuously inquiring the transaction results by adopting a polling mechanism.
Specifically, considering the timeliness of the transaction, a timeout time is generally set for each transaction request, for example, 10 seconds, 15 seconds, or 20 seconds, etc., are within a time range that the user can endure, and exceed the timeout time, which means that the transaction is not processed immediately. For a transaction request with a higher instantaneity requirement, for example, when a PSO machine is used to perform a transaction, the notification message of the transaction result is received by the preset back-end access layer within a very short time, and in consideration of the timeliness of the transaction and the stability of the processing capability corresponding to the preset back-end access layer, it is determined whether the notification corresponding to the transaction result is within the preset timeout time corresponding to the transaction request, and whether the transaction number corresponding to the transaction result that is not notified by the preset back-end access layer is within a reasonable range (i.e., whether the transaction number corresponding to all the transaction results to be processed is less than or equal to the preset number threshold), so as to avoid that the transaction number that is not notified beyond the preset specified range causes a higher pressure to the memory of the preset back-end access layer, if the processing time is within the preset timeout time, and the transaction number corresponding to all the transaction results to be processed is less than or equal to the preset number threshold, executing the step of returning the transaction result to the terminal, if the processing time exceeds the preset timeout time, or the transaction quantity corresponding to all transaction results to be processed is greater than the preset quantity threshold, that is, if the processing time corresponding to the processing result is timeout, or the quantity corresponding to the transaction results which are not notified is greater, the preset rear-end access layer cancels asynchronous notification, at this moment, the terminal cancels asynchronous notification of the waiting rear end, for example, the terminal POS cancels asynchronous notification of the waiting rear end, and continues to query the transaction results by using a transaction polling mechanism, so that reasonable utilization and high availability of system processing resources can be ensured, and timeliness of terminal transactions can be ensured.
Referring to fig. 6, fig. 6 is a fourth sub-flow diagram of a transaction information processing method according to an embodiment of the present application. In this embodiment, the step of returning the transaction result to the terminal comprises:
and S61, encrypting the transaction result in a preset encryption mode to obtain a target transaction result.
And S62, returning the target transaction result to the terminal.
Specifically, the transaction result is processed in a preset processing mode, that is, the original data corresponding to the transaction result is processed in a preset manner, for example, the transaction result information is processed by assembling, encrypting, protoBuff coding and the like, the security in the asynchronous transmission process of the transaction information can be improved through encryption, the encoding is carried out through a Protobuff encoding mode, because the Protobuf code can compress the information data, the data volume of the transaction information data can be reduced, thereby further improving the transmission efficiency of the transaction information data to obtain the processed target transaction result, then writing data through the TCP connection held by the Netty framework, informing the terminal of the transaction result, and returning the target transaction result to the terminal, for example, in the POS transaction, informing the POS machine terminal of the transaction result of the POS machine so as to realize asynchronous processing of the terminal transaction.
It should be noted that, the transaction information processing method described in each of the above embodiments may recombine the technical features included in different embodiments as needed to obtain a combined implementation, but all of them are within the protection scope claimed in the present application.
Referring to fig. 7, fig. 7 is a schematic block diagram of a transaction information processing apparatus according to an embodiment of the present application. Corresponding to the transaction information processing method, the embodiment of the application also provides a transaction information processing device. As shown in fig. 7, the transaction information processing apparatus includes a unit for executing the transaction information processing method described above, and the transaction information processing apparatus may be configured in a computer device. Specifically, referring to fig. 7, the transaction information processing apparatus 70 includes a first receiving unit 71, a forwarding unit 72, a subscribing unit 73, a second receiving unit 74, an obtaining unit 75, and a returning unit 76.
The first receiving unit 71 is configured to receive, based on a preset backend access layer, a transaction request sent by a terminal;
a forwarding unit 72, configured to forward the transaction request to a preset backend service layer, so that the preset backend service layer processes the transaction request;
the subscription unit 73 is configured to subscribe, to a preset back-end message platform, a message notification of a transaction result corresponding to the transaction request, where the message notification is generated by the preset back-end service layer by completing processing of the transaction request to obtain the transaction result and publishing the transaction result to the preset back-end message platform;
a second receiving unit 74, configured to receive the message notification from the preset backend message platform;
the obtaining unit 75 is configured to obtain a transaction result corresponding to the transaction request according to the message notification;
a return unit 76 for returning the transaction result to the terminal.
In an embodiment, the transaction request includes a preset transaction identifier corresponding to the transaction request, the preset backend message platform includes a plurality of preset topics, and the subscription unit 73 includes:
the first determining subunit is configured to determine, according to the preset transaction identifier, a target preset theme corresponding to the transaction request;
and the subscription subunit is used for subscribing the message notification of the transaction result corresponding to the transaction request to the target preset theme.
In an embodiment, a number of the preset themes preset a corresponding preset theme number, and the first determining subunit includes:
the first obtaining subunit is configured to obtain a total number of topics corresponding to the number of the preset topics;
the second obtaining subunit is configured to obtain the preset transaction identifier, and calculate a Hash value of the transaction identifier corresponding to the preset transaction identifier according to a preset Hash value calculation manner;
the modulo subunit is used for performing modulo operation on the total subject value based on the transaction identifier Hash value to obtain a transaction identifier quotient value corresponding to the preset transaction identifier;
the second determining subunit is configured to determine, according to the transaction identifier quotient value and the preset theme number, a target preset theme number corresponding to the transaction identifier quotient value;
and the third determining subunit is used for determining the target preset theme according to the target preset theme number.
In one embodiment, the transaction information processing device 70 further comprises:
the judging unit is used for judging whether the processing time corresponding to the transaction result is within a preset timeout time or not and whether the transaction quantity corresponding to all transaction results to be processed is smaller than or equal to a preset quantity threshold or not;
and the execution unit is used for executing the step of returning the transaction result to the terminal if the processing time is within the preset timeout time and the transaction quantity corresponding to all the transaction results to be processed is less than or equal to a preset quantity threshold value.
In one embodiment, the return unit 76 includes:
the processing subunit is used for encrypting the transaction result in a preset encryption mode to obtain a target transaction result;
and the return subunit is used for returning the target transaction result to the terminal.
In an embodiment, the preset backend access layer is constructed by a preset Netty framework.
In an embodiment, the first receiving unit 71 is configured to receive, based on the preset backend access layer, a transaction request sent by a terminal according to a preset duplex communication manner between the terminal and the preset backend access layer.
It should be noted that, as can be clearly understood by those skilled in the art, the detailed implementation process of the transaction information processing apparatus and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
Meanwhile, the division and connection manner of each unit in the transaction information processing device are only used for illustration, in other embodiments, the transaction information processing device may be divided into different units as needed, or each unit in the transaction information processing device may adopt different connection orders and manners to complete all or part of the functions of the transaction information processing device.
The transaction information processing apparatus described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a computer device such as a desktop computer or a server, or may be a component or part of another device.
Referring to fig. 8, the computer device 500 includes a processor 502, a memory, and a network interface 505 connected by a system bus 501, wherein the memory may include a non-volatile storage medium 503 and an internal memory 504, and the memory may also be a volatile computer-readable storage medium.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, causes the processor 502 to perform one of the transaction information processing methods described above.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be enabled to execute a transaction information processing method as described above.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 8 is a block diagram of only a portion of the configuration relevant to the present teachings and does not constitute a limitation on the computer device 500 to which the present teachings may be applied, and that a particular computer device 500 may include more or less components than those shown, or combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 8, and are not described herein again.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps: receiving a transaction request sent by a terminal based on a preset rear access layer; forwarding the transaction request to a preset back-end service layer so that the preset back-end service layer processes the transaction request; subscribing a message notification of a transaction result corresponding to the transaction request to a preset back-end message platform, wherein the message notification is generated by completing the processing of the transaction request by the preset back-end service layer to obtain the transaction result and publishing the transaction result to the preset back-end message platform; receiving the message notification from the preset back-end message platform; acquiring a transaction result corresponding to the transaction request according to the message notification; and returning the transaction result to the terminal.
In an embodiment, the transaction request includes a preset transaction identifier corresponding to the transaction request, the preset backend message platform includes a plurality of preset topics, and when the step of subscribing, to the preset backend message platform, the message notification of the transaction result corresponding to the transaction request is implemented, the following steps are specifically implemented:
determining a target preset theme corresponding to the transaction request according to the preset transaction identifier;
and subscribing the message notification of the transaction result corresponding to the transaction request to the target preset topic.
In an embodiment, a plurality of preset themes preset with respective corresponding preset theme numbers, and when the processor 502 implements the step of determining the target preset theme corresponding to the transaction request according to the preset transaction identifier, the following steps are specifically implemented:
acquiring a total number of themes corresponding to a plurality of preset themes;
acquiring the preset transaction identification, and calculating a transaction identification Hash value corresponding to the preset transaction identification according to a preset Hash value calculation mode;
performing modulo operation on the subject total numerical value based on the transaction identification Hash value to obtain a transaction identification quotient corresponding to the preset transaction identification;
determining a target preset theme number corresponding to the transaction identifier quotient according to the transaction identifier quotient and the preset theme number;
and determining a target preset theme according to the target preset theme number.
In one embodiment, the processor 502 further implements the following steps before implementing the step of returning the transaction result to the terminal:
judging whether the processing time corresponding to the transaction result is within a preset timeout time or not and whether the transaction quantity corresponding to all transaction results to be processed is smaller than or equal to a preset quantity threshold or not;
and if the processing time is within the preset overtime and the transaction quantity corresponding to all the transaction results to be processed is less than or equal to the preset quantity threshold, executing the step of returning the transaction results to the terminal.
In an embodiment, when the processor 502 implements the step of returning the transaction result to the terminal, the following steps are specifically implemented:
encrypting the transaction result in a preset encryption mode to obtain a target transaction result;
and returning the target transaction result to the terminal.
In an embodiment, when the processor 502 implements the step of receiving the transaction request sent by the terminal based on the preset backend access layer, the preset backend access layer is constructed by a preset Netty framework.
In an embodiment, when the processor 502 implements the step of receiving the transaction request sent by the terminal based on the preset backend access layer, the following steps are specifically implemented:
and receiving a transaction request sent by the terminal according to a preset duplex communication mode between the terminal and the preset rear access layer based on the preset rear access layer.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiments may be implemented by a computer program, and the computer program may be stored in a computer readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium, and the computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute the steps of the transaction information processing method described in the above embodiments.
The computer readable storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device. The computer readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The storage medium is an entity and non-transitory storage medium, and may be various entity storage media capable of storing computer programs, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a magnetic disk, or an optical disk.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing an electronic device (which may be a personal computer, a terminal, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.