CN114143300B - Transaction request sending method and device - Google Patents

Transaction request sending method and device Download PDF

Info

Publication number
CN114143300B
CN114143300B CN202111416541.9A CN202111416541A CN114143300B CN 114143300 B CN114143300 B CN 114143300B CN 202111416541 A CN202111416541 A CN 202111416541A CN 114143300 B CN114143300 B CN 114143300B
Authority
CN
China
Prior art keywords
transaction request
link
sending
transaction
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111416541.9A
Other languages
Chinese (zh)
Other versions
CN114143300A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111416541.9A priority Critical patent/CN114143300B/en
Publication of CN114143300A publication Critical patent/CN114143300A/en
Application granted granted Critical
Publication of CN114143300B publication Critical patent/CN114143300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a transaction request sending method and a transaction request sending device, which relate to the technical field of mobile interconnection, wherein the method comprises the following steps: running a client program based on an HTTP/2 protocol on a plurality of threads, and establishing a link on each thread; determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively; transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol. Therefore, a plurality of links exist, and when one link transmits a transaction request, other links which do not transmit the transaction request can transmit the transaction request, so that the method is applicable to a scene where the transaction request is high and concurrent, and the links with larger throughput are preferentially used for transmitting, thereby improving the transmission efficiency of the transaction request.

Description

Transaction request sending method and device
Technical Field
The present invention relates to the field of mobile interconnection technologies, and in particular, to a method and an apparatus for sending a transaction request.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The HTTP/2 protocol is a novel protocol, netty is an open source programming framework of a client and a server based on Java NIO, and support of the HTTP/2 protocol is provided. But it only provides support at the packet level. For example, for a string text or binary text, netty provides an implementation of encapsulating this text as an HTTP/2 protocol, which is also just a serial protocol, and does not take full advantage of the parallel nature of the HTTP/2 protocol. That is, only the transaction requests packaged into the HTTP/2 protocol can be serially transmitted, the requirement of the high concurrency scene of the transaction requests cannot be met, and the transmission efficiency of the transaction requests based on the HTTP/2 protocol is low.
Disclosure of Invention
The embodiment of the invention provides a transaction request sending method, which is used for sending transaction requests based on HTTP/2 protocol in parallel, and sending links with higher priority throughput, so as to improve the sending efficiency of the transaction requests, and comprises the following steps:
Running a client program based on an HTTP/2 protocol on a plurality of threads, and establishing a link on each thread;
Determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively;
Transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol.
The embodiment of the invention also provides a transaction request sending device, which is used for sending the transaction request based on the HTTP/2 protocol in parallel, and sending the transaction request by a link with higher priority throughput, so as to improve the sending efficiency of the transaction request, and the device comprises:
the link establishment module is used for running the client program based on the HTTP/2 protocol on a plurality of threads and establishing a link on each thread;
The first processing module is used for determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively;
The sending module is used for sending a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the transaction request sending method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the transaction request sending method when being executed by a processor.
The embodiment of the invention also provides a computer program product, which comprises a computer program, and the computer program realizes the transaction request sending method when being executed by a processor.
In the embodiment of the invention, a client program based on the HTTP/2 protocol is operated on a plurality of threads, and a link is established on each thread; determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively; transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol. Therefore, a plurality of links exist, and when one link transmits a transaction request, other links which do not transmit the transaction request can transmit the transaction request, so that the method is applicable to a scene where the transaction request is high and concurrent, and the links with larger throughput are preferentially used for transmitting, thereby improving the transmission efficiency of the transaction request.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of a transaction request sending method provided in an embodiment of the present invention;
FIG. 2 is a flowchart of a method for determining a first link, which does not send a transaction request and has a throughput greater than a preset threshold, from links corresponding to a plurality of threads, respectively, according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for sending a transaction request to a server using the first link according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a transaction request sending device according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
The term "and/or" is used herein to describe only one relationship, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are open-ended terms, meaning including, but not limited to. The description of the reference terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The order of steps involved in the embodiments is illustrative of the practice of the application, and is not limited and may be suitably modified as desired.
The HTTP/2 protocol is found to be a novel protocol, netty is an open source programming framework of a client side and a server side based on Java NIO, and support of the HTTP/2 protocol is provided. But it only provides support at the packet level. For example, for a string text or binary text, netty provides an implementation of encapsulating this text as an HTTP/2 protocol, which is also just a serial protocol, and does not take full advantage of the parallel nature of the HTTP/2 protocol. That is, only the transaction requests packaged into the HTTP/2 protocol can be serially transmitted, the requirement of the high concurrency scene of the transaction requests cannot be met, and the transmission efficiency of the transaction requests based on the HTTP/2 protocol is low.
For the above study, an embodiment of the present invention provides a transaction request sending method, as shown in fig. 1, including:
s101: running a client program based on an HTTP/2 protocol on a plurality of threads, and establishing a link on each thread;
S102: determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively;
S103: transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol.
In the embodiment of the invention, a client program based on the HTTP/2 protocol is operated on a plurality of threads, and a link is established on each thread; determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively; transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol. Therefore, a plurality of links exist, and when one link transmits a transaction request, other links which do not transmit the transaction request can transmit the transaction request, so that the method is applicable to a scene where the transaction request is high and concurrent, and the links with larger throughput are preferentially used for transmitting, thereby improving the transmission efficiency of the transaction request.
The following describes the above-mentioned steps S101 to S103 in detail.
For S101 described above, the HTTP/2 protocol-based client program is run on a plurality of threads, and one link is established on each thread, so that a multilink is established.
Wherein the link is used for transmitting the transaction request to the server by the client based on the HTTP/2 protocol.
In S102, the link on each thread may transmit the transaction request, but in order to ensure the integrity of transmission of the transaction request, the next transaction request may be transmitted for the same link after the current transaction request is transmitted, so when determining the link to be transmitted for the transaction request to be transmitted, it is necessary to select a link from multiple links, where no transaction request is being transmitted, and in order to improve transmission efficiency, a link with a high throughput may be preferably selected for transmission.
As shown in fig. 2, a method flowchart for determining a first link that does not send a transaction request and has a throughput greater than a preset threshold from links corresponding to the threads, according to an embodiment of the present invention, includes:
S201: and determining a second link which does not send the transaction request from links corresponding to the threads respectively.
When each link receives a command for sending a transaction request, the state of the link is marked as being used for sending the transaction request, after the transaction request is sent, the state of the link is marked as not being used for sending the transaction request, and a second link which is not used for sending the transaction request is determined from the links respectively corresponding to the threads according to the state of each link in the links respectively corresponding to the threads.
S202: and sending the detection packet to the server by using the second link, and receiving the first feedback information fed back by the server according to the detection packet.
S203: and obtaining the throughput corresponding to each second link respectively according to the data quantity contained in the detection packet and the time length from the transmission of the detection packet to the reception of the feedback information of each second link.
Illustratively, the amount of data in the probe packet is 100M, and the second link has a throughput of 100M per second for a period of 1 second from sending the probe packet to receiving the feedback information.
S204: and determining a first link with throughput larger than a preset threshold from the second links.
Here, the preset threshold includes, for example: presetting throughput; the preset throughput can be determined according to the standard reaching throughput of the historical transmitted transaction request, and can also be determined in real time based on the ordering of the throughput of the current second link.
For example, when the transaction request is sent historically and the throughput reaches 100M/s, the efficiency of sending the transaction request can meet the requirement, and the preset throughput can be determined to be 100M/s. Or after the throughput of each second link is calculated, the second link with the first three of the throughput ranks (descending rank) is wanted to be selected, and then the throughput of the second link with the fourth rank is determined as a preset threshold.
For S103, the transaction request is a transaction request based on HTTP/2 protocol, as shown in fig. 3, which is a flowchart of a method for sending a transaction request to a server by using the first link according to an embodiment of the present invention, including:
S301: and marking the state of the first link as a transaction request being sent, and obtaining the expected sending times of the transaction request sent by the first link according to the data quantity sent by the first link each time and the data quantity contained in the transaction request to be sent.
For example, the transaction request contains 100M data, and the first link obtains 100 expected transmission times when 1M data is transmitted each time.
S302: and when the number of times of sending the transaction request by the first link is equal to the expected number of times of sending, marking the state of the first link as no transaction request is sent.
Therefore, the link can be ensured to participate in the selection of sending other transaction requests after one transaction request is completely sent, so that the integrity of the transaction request sending on the same link can be ensured when a plurality of links are used for sending the transaction requests.
In addition, in another embodiment of the present invention, every first preset time period, a probe packet is sent by using a second link that does not send a transaction request, and a new link is re-established on a thread corresponding to the second link for the second link that cannot receive second feedback information fed back by the server in the second preset time period; and for a third link which is transmitting the transaction request, after the third feedback information fed back by the server is not received within a second preset time period after the transaction request is transmitted, reestablishing a new link on a thread corresponding to the third link, and retransmitting the transaction request which is transmitted last time by utilizing the new link.
Thus, each link can be monitored in real time, whether the link is in a connected state or not can be monitored for the link which does not send the transaction request, whether the link can be selected to send the transaction request or not can be monitored, and when the problem of the link is found, a new link can be established on the thread corresponding to the link in time. For the link which is sending the transaction request, whether the link successfully sends the transaction request to the server or not can be judged through monitoring the link, if the link is found to have a problem, a new link is established on a thread corresponding to the link, and the transaction request which is failed to send is retransmitted by the new link, wherein the new link is established on the thread corresponding to the link. The success rate of transaction request sending is improved.
In addition, after the transaction request is sent to the server, response data of the server to the transaction request is also required to be received, if one link waits until the server returns the response data after sending the transaction request, other transaction requests are sent, and the sending efficiency of the transaction request is low.
Thus, in another embodiment of the present invention, the transaction request further includes: a transaction identifier; after the first link is utilized to send a transaction request to be sent to a server, an idle link is utilized to receive response data returned by the server according to the transaction request; wherein, the response data comprises a transaction identifier corresponding to the transaction request; wherein the idle links include links that are not currently transmitting transaction requests; and determining a transaction request corresponding to the response data according to the transaction identifier carried in the response data, and sending the response data to the user initiating the transaction request.
In this way, when the transaction data is sent, the transaction data carries the transaction identifier, after each link sends the transaction request, the response data of the transaction request does not need to be waited, other transaction data can be directly sent, when the response data corresponding to the transaction data returns, any link which is idle at the moment can be directly utilized to receive the response data, the corresponding transaction data is determined according to the transaction identifier in the response data, and the sending efficiency of the transaction request is improved.
Here, the response data based on the HTTP/2 protocol is generally cumbersome and unordered, so for example, the response data may be sent to the user who initiates the corresponding transaction request by the following method: and extracting the return code and the return information from the response data, packaging the return code and the return information together, and sending the return code and the return information to the user initiating the corresponding transaction request.
Thus, the user can intuitively obtain the return result and the return information, and the user experience is improved.
The embodiment of the invention also provides a transaction request sending device, which is described in the following embodiment. Because the principle of the device for solving the problem is similar to that of the transaction request sending method, the implementation of the device can refer to the implementation of the transaction request sending method, and the repetition is omitted.
As shown in fig. 4, a schematic diagram of a transaction request sending device according to an embodiment of the present invention includes: a link establishment module 401, a first processing module 402, and a transmission module 403; wherein,
A link establishment module 401, configured to run a client program based on HTTP/2 protocol on a plurality of threads, and establish a link on each thread;
A first processing module 402, configured to determine, from links corresponding to the multiple threads, a first link that does not send a transaction request and has a throughput greater than a preset threshold;
A sending module 403, configured to send a transaction request to a server using the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol.
In a possible implementation manner, the first processing module is specifically configured to determine, from links corresponding to the multiple threads, a second link that does not send a transaction request; transmitting a detection packet to a server by using a second link, and receiving first feedback information fed back by the server according to the detection packet; obtaining the throughput corresponding to each second link respectively according to the data volume contained in the detection packet and the time length from the transmission of the detection packet to the reception of the feedback information of each second link; and determining a first link with throughput larger than a preset threshold from the second links.
In a possible implementation manner, the sending module is specifically configured to mark the state of the first link as that a transaction request is being sent, and obtain, according to the data amount sent by the first link each time and the data amount included in the transaction request to be sent, the expected number of times of sending the transaction request by the first link; and when the number of times of sending the transaction request by the first link is equal to the expected number of times of sending, marking the state of the first link as no transaction request is sent.
In one possible embodiment, the method further comprises: the monitoring module is used for sending a detection packet by using a second link which does not send a transaction request every a first preset time period, and reestablishing a new link on a thread corresponding to the second link aiming at the second link which cannot receive second feedback information fed back by the server within the second preset time period; and for a third link which is transmitting the transaction request, after the third feedback information fed back by the server is not received within a second preset time period after the transaction request is transmitted, reestablishing a new link on a thread corresponding to the third link, and retransmitting the transaction request which is transmitted last time by utilizing the new link.
In one possible implementation, the transaction request further includes: a transaction identifier; the apparatus further comprises: the second processing module is used for receiving response data returned by the server according to the transaction request by using the idle link; wherein, the response data comprises a transaction identifier corresponding to the transaction request; wherein the idle links include links that are not currently transmitting transaction requests; and determining a transaction request corresponding to the response data according to the transaction identifier carried in the response data, and sending the response data to the user initiating the transaction request.
In one possible implementation, the second processing module is specifically configured to extract the return code and the return information from the response data, package the return code and the return information together, and send the return code and the return information to the user who initiates the corresponding transaction request.
Based on the foregoing inventive concept, as shown in fig. 5, the present invention further proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored on the memory 510 and executable on the processor 520, where the processor 520 implements the foregoing transaction request sending method when executing the computer program 530.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the transaction request sending method.
The embodiment of the invention also provides a computer program product, which comprises a computer program, and the computer program realizes the transaction request sending method when being executed by a processor.
In the embodiment of the invention, a client program based on the HTTP/2 protocol is operated on a plurality of threads, and a link is established on each thread; determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively; transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on the HTTP/2 protocol. Therefore, a plurality of links exist, and when one link transmits a transaction request, other links which do not transmit the transaction request can transmit the transaction request, so that the method is applicable to a scene where the transaction request is high and concurrent, and the links with larger throughput are preferentially used for transmitting, thereby improving the transmission efficiency of the transaction request.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (13)

1. A transaction request transmission method, comprising:
Running a client program based on an HTTP/2 protocol on a plurality of threads, and establishing a link on each thread;
Determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively;
transmitting a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on HTTP/2 protocol;
Further comprises:
Every first preset time period, a detection packet is sent by using a second link which does not send a transaction request, and a new link is re-established on a thread corresponding to the second link aiming at the second link which cannot receive second feedback information fed back by the server in the second preset time period;
and for a third link which is transmitting the transaction request, after the third feedback information fed back by the server is not received within a second preset time period after the transaction request is transmitted, reestablishing a new link on a thread corresponding to the third link, and retransmitting the transaction request which is transmitted last time by utilizing the new link.
2. The method for sending a transaction request according to claim 1, wherein determining a first link, which does not send a transaction request and has a throughput greater than a preset threshold, from links corresponding to the threads, respectively, comprises:
Determining a second link which does not send a transaction request from links corresponding to the threads respectively;
transmitting a detection packet to a server by using a second link, and receiving first feedback information fed back by the server according to the detection packet;
Obtaining the throughput corresponding to each second link respectively according to the data volume contained in the detection packet and the time length from the transmission of the detection packet to the reception of the feedback information of each second link;
and determining a first link with throughput larger than a preset threshold from the second links.
3. The transaction request transmission method according to claim 1, wherein transmitting the transaction request to the server using the first link includes:
Marking the state of the first link as a transaction request being sent, and obtaining the expected sending times of the transaction request sent by the first link according to the data quantity sent by the first link each time and the data quantity contained in the transaction request to be sent;
And when the number of times of sending the transaction request by the first link is equal to the expected number of times of sending, marking the state of the first link as no transaction request is sent.
4. The transaction request transmission method according to claim 1, wherein the transaction request further includes: a transaction identifier;
after sending the transaction request to be sent to the server by using the first link, the method further comprises:
Receiving response data returned by the server according to the transaction request by using the idle link; wherein, the response data comprises a transaction identifier corresponding to the transaction request; wherein the idle links include links that are not currently transmitting transaction requests;
and determining a transaction request corresponding to the response data according to the transaction identifier carried in the response data, and sending the response data to the user initiating the transaction request.
5. The transaction request transmission method according to claim 1, wherein transmitting the response data to the user who initiated the corresponding transaction request includes:
and extracting the return code and the return information from the response data, packaging the return code and the return information together, and sending the return code and the return information to the user initiating the corresponding transaction request.
6. A transaction request transmitting apparatus, comprising:
the link establishment module is used for running the client program based on the HTTP/2 protocol on a plurality of threads and establishing a link on each thread;
The first processing module is used for determining a first link which does not send a transaction request and has throughput larger than a preset threshold value from links corresponding to the threads respectively;
the sending module is used for sending a transaction request to a server by utilizing the first link; wherein the transaction request is a transaction request based on HTTP/2 protocol;
Further comprises: the monitoring module is used for sending a detection packet by using a second link which does not send a transaction request every a first preset time period, and reestablishing a new link on a thread corresponding to the second link aiming at the second link which cannot receive second feedback information fed back by the server within the second preset time period;
and for a third link which is transmitting the transaction request, after the third feedback information fed back by the server is not received within a second preset time period after the transaction request is transmitted, reestablishing a new link on a thread corresponding to the third link, and retransmitting the transaction request which is transmitted last time by utilizing the new link.
7. The transaction request transmitting device of claim 6, wherein the first processing module is specifically configured to determine, from links corresponding to the plurality of threads, a second link that does not transmit a transaction request;
transmitting a detection packet to a server by using a second link, and receiving first feedback information fed back by the server according to the detection packet;
Obtaining the throughput corresponding to each second link respectively according to the data volume contained in the detection packet and the time length from the transmission of the detection packet to the reception of the feedback information of each second link;
and determining a first link with throughput larger than a preset threshold from the second links.
8. The apparatus for sending a transaction request according to claim 6, wherein the sending module is specifically configured to mark a state of the first link as a transaction request being sent, and obtain an expected number of times the first link sends the transaction request according to an amount of data sent by the first link each time and an amount of data included in the transaction request to be sent;
And when the number of times of sending the transaction request by the first link is equal to the expected number of times of sending, marking the state of the first link as no transaction request is sent.
9. The transaction request transmitting device of claim 6, wherein the transaction request further includes: a transaction identifier;
The apparatus further comprises: the second processing module is used for receiving response data returned by the server according to the transaction request by using the idle link; wherein, the response data comprises a transaction identifier corresponding to the transaction request; wherein the idle links include links that are not currently transmitting transaction requests;
and determining a transaction request corresponding to the response data according to the transaction identifier carried in the response data, and sending the response data to the user initiating the transaction request.
10. The transaction request transmitting device of claim 9, wherein the second processing module is configured to extract the return code and the return information from the response data, and to package the return code and the return information together for transmission to the user initiating the corresponding transaction request.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 5 when executing the computer program.
12. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 5.
13. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the method of any of claims 1 to 5.
CN202111416541.9A 2021-11-25 2021-11-25 Transaction request sending method and device Active CN114143300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111416541.9A CN114143300B (en) 2021-11-25 2021-11-25 Transaction request sending method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111416541.9A CN114143300B (en) 2021-11-25 2021-11-25 Transaction request sending method and device

Publications (2)

Publication Number Publication Date
CN114143300A CN114143300A (en) 2022-03-04
CN114143300B true CN114143300B (en) 2024-04-19

Family

ID=80387708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111416541.9A Active CN114143300B (en) 2021-11-25 2021-11-25 Transaction request sending method and device

Country Status (1)

Country Link
CN (1) CN114143300B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013048484A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Quality of experience enhancements over wireless networks
CN103532909A (en) * 2012-07-04 2014-01-22 中兴通讯股份有限公司 Multi-stream service concurrent transmission method, sub-system, system and multi-interface terminal
CN106230984A (en) * 2016-09-12 2016-12-14 深圳市彬讯科技有限公司 A kind of method that the Netty of employing framework realizes web service passage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013048484A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Quality of experience enhancements over wireless networks
CN103532909A (en) * 2012-07-04 2014-01-22 中兴通讯股份有限公司 Multi-stream service concurrent transmission method, sub-system, system and multi-interface terminal
CN106230984A (en) * 2016-09-12 2016-12-14 深圳市彬讯科技有限公司 A kind of method that the Netty of employing framework realizes web service passage

Also Published As

Publication number Publication date
CN114143300A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN110418376A (en) Data transmission method and device
CN109921843B (en) Beidou short message communication method for satellite remote education system
CN106034084B (en) Data transmission method and device
CN102685203A (en) Method and equipment for data resource transmission
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN104618236A (en) Parallel data transmission system and method of acceleration network
CN104184756A (en) Data synchronization method, device and system
CN107872396A (en) Communication means, processing equipment, terminal device and server with overtime control
CN102394880A (en) Method and device for processing jump response in content delivery network
RU2019126328A (en) METHOD, DATA TRANSMISSION DEVICE AND COMMUNICATION SYSTEM
CN105408871A (en) Method and apparatus for providing redundant data access
JP2015534360A5 (en)
CN113259415A (en) Network message processing method and device and network server
CN105281940B (en) Method, equipment and system for HELLO message interaction based on NETCONF protocol
CN110808917B (en) Multilink aggregation data retransmission method and transmitting equipment
CN103678364A (en) Dynamic detection method and device for URL redirection endless loop
CN106302093B (en) Communication method, system and server
CN105763375A (en) Data packet transmission method, receiving method and microwave station
CN114143300B (en) Transaction request sending method and device
CN106790354B (en) Communication method and device for preventing data congestion
CN102684865B (en) Method, system and device for data synchronization
KR20100113116A (en) Network message management device and methods thereof
CN105119968A (en) Picture transmission method and device
US8332498B2 (en) Synchronized relay messaging and coordinated network processing using SNMP
CN108574615B (en) Content transmission method, device and system based on multipath MPTCP

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