CN112953769A - Data transmission method, device, computer system and readable storage medium - Google Patents

Data transmission method, device, computer system and readable storage medium Download PDF

Info

Publication number
CN112953769A
CN112953769A CN202110186763.XA CN202110186763A CN112953769A CN 112953769 A CN112953769 A CN 112953769A CN 202110186763 A CN202110186763 A CN 202110186763A CN 112953769 A CN112953769 A CN 112953769A
Authority
CN
China
Prior art keywords
message
message queue
servers
sending
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.)
Granted
Application number
CN202110186763.XA
Other languages
Chinese (zh)
Other versions
CN112953769B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110186763.XA priority Critical patent/CN112953769B/en
Publication of CN112953769A publication Critical patent/CN112953769A/en
Application granted granted Critical
Publication of CN112953769B publication Critical patent/CN112953769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Landscapes

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

Abstract

The disclosure provides a data transmission method, which can be used in the technical field of cloud computing and information security or other fields. Wherein, the method comprises the following steps: sending a message to one of at least two message queue servers; and under the condition of receiving the information which is sent by the message queue server and used for identifying the message sending failure, sending the message to other message queue servers in at least two message queue servers in a polling mode until the information used for identifying the message sending success is received. The present disclosure also provides a data transmission apparatus, a computer system, a readable storage medium, and a computer program product.

Description

Data transmission method, device, computer system and readable storage medium
Technical Field
The present disclosure relates to the field of cloud computing, information security technology, or other fields, and more particularly, to a data transmission method, apparatus, computer system, readable storage medium, and computer program product.
Background
Message queue servers are very popular and powerful message middleware known to support multiple cross-language clients and protocols quickly, so that the application of the message queue servers is very wide, especially the application of the message queue servers in message transmission in financial systems. With the increasing real-time requirements of customers on financial services such as transfer, payment and the like, the connection between the application server and the message queue server in the bank clearing system needs to meet high availability.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: when the message queue server goes down and other faults, the problem of discontinuous transaction or message loss is easily caused.
Disclosure of Invention
In view of the above, the present disclosure provides a data transmission method, an apparatus, a computer system, a readable storage medium, and a computer program product.
One aspect of the present disclosure provides a data transmission method applied to an application server, including:
sending a message to one of at least two message queue servers; and
and under the condition of receiving the information which is sent by the message queue server and used for identifying the message sending failure, sending the message to other message queue servers in at least two message queue servers in a polling mode until the information used for identifying the message sending success is received.
According to an embodiment of the present disclosure, before sending a message to one of at least two message queue servers, the method further includes:
network connections are respectively established between the application server and the at least two message queue servers.
According to an embodiment of the present disclosure, wherein respectively establishing network connections between the application server and the at least two message queue servers includes:
judging whether the network connection is normal or not;
under the condition that the network connection is normal, determining that the networks respectively established between the application server and the at least two message queue servers are normal;
in the case that the network connection is abnormal, the operation of establishing the network connection is re-performed until the network connection is normal.
According to the embodiment of the present disclosure, wherein, the application server includes a plurality;
establishing network connections between the application server and the at least two message queue servers respectively comprises:
network connection is respectively established between each application server in the plurality of application servers and at least two message queue servers by adopting a Cartesian product cross connection mode.
According to an embodiment of the disclosure, the method further comprises:
acquiring a request for processing a message sent by a user terminal; wherein, the request carries a message;
and responding to the request, and executing the operation of sending the message to one of the at least two message queue servers.
According to the embodiment of the disclosure, data in at least two message queue servers are stored in a distributed file sharing manner;
the method further comprises the following steps:
respectively performing receiving and reporting operations to at least two message queue servers according to a preset time interval;
and acquiring the target message in one of the at least two message queue servers.
According to the embodiment of the present disclosure, wherein, the application server includes a plurality;
the method further comprises the following steps:
in the case where the data in the message queue server is acquired by one of the plurality of application servers, the data is deleted in the message queue server so that the other application servers of the plurality of application servers cannot acquire the data.
Another aspect of the present disclosure also provides a data transmission apparatus, including:
the sending module is used for sending a message to one of the at least two message queue servers; and
and the polling module is used for sending the message to other message queue servers in at least two message queue servers in a polling mode under the condition of receiving the information which is sent by the message queue servers and used for identifying the message sending failure until the information used for identifying the message sending success is received.
Yet another aspect of the present disclosure provides a computer system comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data transmission method described above.
Yet another aspect of the present disclosure provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement the data transmission method described above.
Yet another aspect of the present disclosure provides a computer program product comprising a computer program comprising computer executable instructions for implementing the data transmission method described above when executed.
According to the embodiment of the disclosure, the message is sent to one message queue server of at least two message queue servers; and under the condition of receiving the information which is sent by the message queue server and used for identifying the message sending failure, sending the message to other message queue servers in at least two message queue servers in a polling mode until the information used for identifying the message sending success is received; therefore, the technical problem that the message sending fails due to the fault of downtime and the like of the message queue server in the prior art is at least partially solved, and the technical effect of ensuring that the message is not lost and can be processed in time is achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates a data transmission system schematic of an embodiment of the disclosure;
fig. 2 schematically illustrates an exemplary system architecture to which the data transmission method and apparatus of the present disclosure may be applied;
fig. 3 schematically shows a flow chart of a data transmission method according to an embodiment of the present disclosure;
fig. 4 schematically illustrates a block diagram of MQ connection pools, in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates an architecture diagram of an application data transmission system according to another embodiment of the present disclosure;
fig. 6 schematically shows a block diagram of a data transmission device according to an embodiment of the present disclosure; and
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing a data transfer method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a data transmission method. The method is applied to an application server and comprises the following steps: sending a message to one of at least two message queue servers; and under the condition of receiving the information which is sent by the message queue server and used for identifying the message sending failure, sending the message to other message queue servers in at least two message queue servers in a polling mode until the information used for identifying the message sending success is received.
Fig. 1 schematically illustrates a data transmission system 100 of an embodiment of the disclosure.
As shown in fig. 1, the data transmission system 100 according to the embodiment may include an application server and an MQ server.
The application server is not limited to one, and may be a plurality of application servers, such as the application servers 111, 112. The application servers can be arranged in a park and used as a main application server and a standby application server; however, the present invention is not limited to this, and a plurality of application servers may be provided in a plurality of parks. Each application server establishes a connection with at least two MQ servers. In the embodiment of the disclosure, each application server is provided with an MQ connection pool, a report master control module and the like, and is used for automatically establishing network connection with an MQ server when the service of the application server is started. In addition, when the message is sent, a polling mode can be adopted, and the safe and timely processing and transmission of the message can be realized.
The MQ servers, including at least 2, for example, MQ servers 121 and 122, use the message queues to temporarily store data packets. According to the embodiment of the disclosure, two message queues can be designed, wherein one message queue is a receiving queue and the other message queue is a sending queue.
According to the embodiment of the disclosure, network connections are respectively established between the application server and the plurality of MQ servers, and the application server can perform a report sending operation to the plurality of MQ servers and also can perform a report receiving operation from the plurality of MQ servers. The transmission of the service message of financial services such as transfer, payment and the like or services such as bank clearing and the like is realized.
It should be noted that fig. 1 is only an example of a data transmission system to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
Fig. 2 schematically illustrates an exemplary system architecture 200 to which the data transmission methods and apparatus may be applied, according to an embodiment of the disclosure.
It should be noted that fig. 2 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 2, the system architecture 200 according to this embodiment may include terminal devices 201, 202, 203, a network 204 and an application server 205. The network 204 serves as a medium for providing communication links between the terminal devices 201, 202, 203 and the application server 205. Network 204 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal device 201, 202, 203 to interact with the application server 205 via the network 204 to receive or send messages or the like. The terminal devices 201, 202, 203 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 201, 202, 203 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The application server 205 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 201, 202, 203. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data transmission method provided by the embodiment of the present disclosure may be generally executed by the application server 205. Accordingly, the data transmission apparatus provided by the embodiment of the present disclosure may be generally disposed in the application server 205. The data transmission method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the application server 205 and is capable of communicating with the terminal devices 201, 202, 203 and/or the application server 205. Accordingly, the data transmission apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the application server 205 and capable of communicating with the terminal devices 201, 202, 203 and/or the application server 205.
For example, the report master control module may be originally stored in any one of the terminal devices 201, 202, or 203 (for example, but not limited to, the terminal device 201), or stored on an external storage device and may be imported into the terminal device 201. Then, the terminal device 201 may send the total report control module to other terminal devices, servers, or server clusters, and execute the data transmission method provided by the embodiment of the present disclosure by the other servers or server clusters receiving the total report control module.
It should be understood that the number of terminal devices, networks, and servers in fig. 2 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the data transmission method, the data transmission device, the computer system, the computer readable storage medium, and the computer program product of the present disclosure may be used in the technical fields of information security and cloud computing, and may also be used in any fields other than the technical fields of information security and cloud computing.
Fig. 3 schematically shows a flow chart of a data transmission method according to an embodiment of the present disclosure.
As shown in fig. 3, applied to an application server, the method includes operations S310 to S320.
In operation S310, a message is transmitted to one of at least two message queue servers.
Message queue servers (MQ servers) are very popular, powerful message middleware known to support multiple cross-language clients and protocols quickly, so their application is very widespread, especially between message transmissions in financial systems, according to embodiments of the present disclosure.
According to the embodiment of the disclosure, the message queue server is adopted to perform operations such as transmission, storage and the like of the messages, and financial services such as transfer, payment and the like with higher and higher real-time requirements can be met. Furthermore, the application of the message queue server becomes important to whether the bank clearing system can meet high availability.
According to the embodiment of the disclosure, a deployment mode of at least two message queue servers is adopted, each application server is connected with the at least two message queue servers, and the at least two message queue servers simultaneously undertake transmission tasks. Through the embodiment of the disclosure, a high-availability connection mode is established between the application server and the message queue server, so that when one message queue server of at least two message queue servers fails, manual intervention is not needed, and normal transaction can still be ensured.
In operation S320, in the case of receiving the information for identifying the failure of message transmission, which is transmitted by the message queue server, the message is transmitted to other message queue servers of the at least two message queue servers in a polling manner until the information for identifying the successful transmission of the message is received.
According to the embodiment of the present disclosure, the information for identifying the failure of message transmission may be identification information agreed in advance by the application server and the message queue server, and may be characters, such as "fail" or "failure," but is not limited thereto, and may also be information such as two-dimensional codes, numbers, and the like. Any information that can be recognized by the application server and is predetermined may be used.
According to the embodiment of the present disclosure, the information for identifying the successful transmission of the message may be identification information agreed in advance by the application server and the message queue server, and may be characters, such as "success" or "success", but is not limited thereto, and may also be information such as two-dimensional codes, numbers, and the like. Any information that can be recognized by the application server and is predetermined may be used.
According to the embodiment of the disclosure, a report master control module can be deployed in an application server, and the report master control module realizes a polling report sending function. When a message needs to be sent, a polling message sending mode is adopted, a message sending master control module firstly sends the message to one message queue server (for example, MQ server A) of at least two message queue servers, and if the message sending fails, the message sent by the MQ server A and used for identifying the message sending failure is received. The message continues to be sent to another of the at least two message queue servers (e.g., MQ server B) until information identifying the message was successfully sent is received.
According to the embodiment of the disclosure, by adopting a polling message sending mode, the message can still be sent out in time under the condition that one or more (the plurality is less than the total number of the message queue servers) of at least two message queue servers is unavailable.
According to an optional embodiment of the present disclosure, the message sending failure is determined only when it is determined that all of the at least two message queue servers have failed to send messages.
According to the embodiment of the present disclosure, the polling manner may be performed based on a preset rule, for example, at least two message queue servers are sequentially encoded, and the messages are sequentially sent according to the encoding order during polling.
According to other embodiments of the disclosure, the availability of the message queue server can be diagnosed through heartbeat detection messages, and when the message is sent by matching with the route master controller, the available message queue server is selected to send the message according to the heartbeat detection result.
According to other embodiments of the present disclosure, the method of detecting heartbeat messages still has some disadvantages compared to the polling method, for example, when the heartbeat detection messages are sent, the message queue server is available, but when the service messages are sent, the message queue server is just down. In this case, a failure in service messaging may result. By adopting the heartbeat detection mode, the problem that the states are not matched due to time difference exists between the heartbeat detection result and the states of the actual message queue server.
According to the embodiment of the disclosure, the message is sent to the message queue server in a polling mode, so that the condition of message delay processing or message loss is avoided, and the message is guaranteed not to be lost and can be processed in time.
The method illustrated in fig. 3 is further described below with reference to fig. 4 in conjunction with specific embodiments.
According to the embodiment of the present disclosure, before sending a message to one of the at least two message queue servers, the data transmission method further includes establishing network connections between the application server and the at least two message queue servers, respectively.
Fig. 4 schematically illustrates a block diagram of MQ connection pools, according to an embodiment of the present disclosure.
According to the embodiment of the present disclosure, network connections are respectively established between the application server and at least two message queue servers, and a function of connecting MQ servers may be added to the application server by setting an MQ connection pool 400 inside the application server, and when the application server is started, the function simultaneously establishes connections with MQ server a and MQ server B and places them in the MQ connection pool, as shown in fig. 4, where MQ connection a410 is a connection of the application server with MQ server a, and MQ connection B420 is a connection of the application server with MQ server B.
According to the embodiment of the disclosure, the MQ connection pool is used for ensuring that the network connection is established between the application server and the message queue servers when the application server is started.
According to other embodiments of the present disclosure, in a case that the application server includes a plurality of application servers, network connections may be respectively established between each of the plurality of application servers and the at least two message queue servers in a cartesian product cross-connection manner.
According to an embodiment of the present disclosure, establishing network connections between the application server and the at least two message queue servers, respectively, may include the following operations.
Judging whether the network connection is normal or not; under the condition that the network connection is normal, determining that the networks respectively established between the application server and the at least two message queue servers are normal; in the case that the network connection is abnormal, the operation of establishing the network connection is re-performed until the network connection is normal.
According to an embodiment of the present disclosure, the above operation may be implemented by an MQ connection pool designed inside the application server. The MQ connection pool realizes that when the disconnection of the network connection between the application server and one MQ server is recognized, the connection is continuously tried to be reestablished until the network connection is normal.
According to an alternative embodiment of the present disclosure, whether the connection between the application server and the MQ server is disconnected or not may be implemented by an MQ jar package of ibm (international Business machines).
According to the embodiment of the disclosure, a connection pool intelligently connected with the MQ server is designed in the application server, so that network connection is established before the message is sent, technical support is provided for the message sending, and the smooth message sending is ensured.
In addition, after the network connection is disconnected, the operation of establishing the network connection can be executed again, the guarantee service is provided for the operation of sending the message, manual participation is not needed, and the intelligent degree is high.
According to an embodiment of the present disclosure, the data transmission method may further include the following operations.
Acquiring a request for processing a message sent by a user terminal; wherein, the request carries a message; and responding to the request, and executing the operation of sending the message to one of the at least two message queue servers.
According to the embodiment of the present disclosure, the message in the embodiment of the present disclosure may be, for example, a financial service message such as transfer, payment, or a service message such as bank clearing.
According to the embodiment of the disclosure, the application server executes the operation of sending the message under the condition of receiving the request for processing the message sent by the user terminal. The high availability between the application server and the MQ server is met, manual intervention is not needed, and the automatic processing capacity is high.
According to other embodiments of the present disclosure, the data transmission method may further include the following operations.
Respectively performing receiving and reporting operations to at least two message queue servers according to a preset time interval; and acquiring the target message in one of the at least two message queue servers.
According to the embodiment of the disclosure, after the network connection is established between the application server and the MQ server, the application server not only performs message sending operation, but also performs message receiving operation.
According to the embodiment of the disclosure, a module of a report receiving function may be set in the application server, and in the case of executing a report receiving operation, the application server is simultaneously connected to each report receiving queue of at least two MQ servers, and the report receiving function in the application server receives a message from the "report receiving queue" of at least two MQ servers at intervals.
Fig. 5 schematically shows an architecture diagram of a data transmission system according to another embodiment of the present disclosure.
As shown in fig. 5, data in at least two message queue servers (two message queue servers in this embodiment) are stored in a distributed file sharing manner.
According to embodiments of the present disclosure, application servers (application server a511 and application server B512) and MQ servers (MQ server a521 and MQ server B522) are deployed, for example. And the two MQ servers adopt an industry-sourced distributed file sharing storage mode to configure the data sharing stored by the MQ servers.
In accordance with embodiments of the present disclosure, in an abnormal situation, such as when MQ server a521 is down after a message enters the receiving queue, the connection between application server a511 and application server B512 to MQ server a521 is interrupted (fig. 5). In the embodiment of the present disclosure, by using a distributed file sharing manner for storage, that is, two MQ servers use a distributed file sharing technology, messages received in the receiving queue of MQ server a521 are also visible in the receiving queue of MQ server B522, that is, messages can be obtained from the receiving queue of MQ server B522. In this case, the application server a511 and the application server B512 may obtain the receipt message from the receipt queue of the MQ server B522.
By the embodiment of the disclosure, the message in the message queue server can be acquired and processed in time, and the problems of delay and loss of message processing are avoided.
According to an optional embodiment of the present disclosure, the number of the application server sides may also be multiple, and in a case that the application server a is down, all messages may still be received and processed by the application server B. Therefore, the received message can be processed in time and is not lost.
According to the embodiment of the disclosure, the data transmission method disclosed by the disclosure avoids the situation that when the message is not taken away in the receiving and reporting queue, the message queue server is down or the network is disconnected, and the message in the message queue server can be continuously processed only after the message queue server is restarted and recovered, so that the message processing is delayed, and even the message is possibly lost.
According to an embodiment of the present disclosure, the data transmission method may further include the following operations.
In the case where data (e.g., a message) in the message queue server is acquired by one of the plurality of application servers, the data is deleted in the message queue server so that other application servers in the plurality of application servers cannot acquire the data.
According to the embodiment of the disclosure, two application servers report in a report receiving queue, one application server obtains a message, and the other application server cannot obtain the message.
According to the embodiment of the disclosure, by adopting the mechanism, the message in the embodiment of the disclosure is processed only once, so that the problems of efficiency reduction and resource waste caused by repeated operation of a plurality of application servers due to repeated processing are avoided.
In summary, the data transmission method provided by the present disclosure provides a connection and deployment method for an application server and an MQ message queue server, which can ensure that all the reports and receptions can be processed normally regardless of whether the MQ server has a partial machine failure or the application server has a partial machine failure, and half of the transaction failures will not occur. And can practically ensure the timeliness of no report loss and transaction processing.
In addition, the deployment method can be conveniently extended to the condition that a plurality of application servers correspond to a plurality of MQ servers, so as to ensure higher system availability.
Fig. 6 schematically shows a block diagram of a data transmission device according to an embodiment of the present disclosure.
As shown in fig. 6, the data transmission apparatus 600 includes a sending module 610 and a polling module 620.
A sending module 610, configured to send a message to one of at least two message queue servers; and
and the polling module 620 is configured to send a message to other message queue servers of the at least two message queue servers in a polling manner until receiving information for identifying successful sending of the message, in a case of receiving information for identifying message sending failure sent by the message queue server.
According to an embodiment of the present disclosure, the data transmission apparatus 600 further includes a network connection module.
And the network connection module is used for respectively establishing network connection between the application server and the at least two message queue servers.
According to an embodiment of the present disclosure, the network connection module includes a determination unit, and a reconnection unit.
And the judging unit is used for judging whether the network connection is normal or not.
And the determining unit is used for determining that the networks respectively established between the application server and the at least two message queue servers are normal under the condition that the network connection is normal.
And the reconnection unit is used for re-executing the operation of establishing the network connection until the network connection is normal under the condition that the network connection is abnormal.
According to the embodiment of the present disclosure, wherein, the application server includes a plurality;
the network connection module further comprises a network connection unit.
And the network connection unit is used for respectively establishing network connection between each application server in the plurality of application servers and at least two message queue servers by adopting a Cartesian product cross connection mode.
According to the embodiment of the present disclosure, the data transmission apparatus 600 further includes a request acquisition module and a response module.
The request acquisition module is used for acquiring a request which is sent by a user terminal and used for processing a message; wherein, the request carries a message; and
and the response module is used for responding to the request and executing the operation of sending the message to one of the at least two message queue servers.
According to the embodiment of the disclosure, data in at least two message queue servers are stored in a distributed file sharing manner; the data transmission apparatus 600 further includes a message receiving module and a message obtaining module.
The message receiving module is used for respectively receiving messages from at least two message queue servers according to a preset time interval; and
and the message acquisition module is used for acquiring the target message from one of the at least two message queue servers.
According to the embodiment of the present disclosure, wherein, the application server includes a plurality; the data transmission device 600 also includes a deletion module.
And the deleting module is used for deleting the data in the message queue server under the condition that the data in the message queue server is acquired by one of the application servers so as to enable other application servers in the application servers not to acquire the data.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the sending module 610 and the polling module 620 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the sending module 610 and the polling module 620 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the sending module 610 and the polling module 620 may be implemented at least in part as computer program modules that, when executed, may perform corresponding functions.
It should be noted that the data transmission device portion in the embodiment of the present disclosure corresponds to the data transmission method portion in the embodiment of the present disclosure, and the description of the data transmission device portion specifically refers to the data transmission method portion, and is not repeated herein.
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method, according to an embodiment of the present disclosure. The computer system illustrated in FIG. 7 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 7, a computer system 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being adapted to cause the electronic device to carry out the data transmission method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 701, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A data transmission method is applied to an application server and comprises the following steps:
sending a message to one of at least two message queue servers; and
and under the condition of receiving the information which is sent by the message queue server and used for identifying the message sending failure, sending the message to other message queue servers in the at least two message queue servers in a polling mode until the information used for identifying the message sending success is received.
2. The method of claim 1, wherein prior to said sending the message to one of the at least two message queue servers, the method further comprises:
and respectively establishing network connection between the application server and the at least two message queue servers.
3. The method of claim 2, wherein the establishing network connections between the application server and at least two message queue servers respectively comprises:
judging whether the network connection is normal or not;
determining that the networks respectively established between the application server and the at least two message queue servers are normal under the condition that the network connection is normal;
in the case that the network connection is abnormal, the operation of establishing the network connection is re-performed until the network connection is normal.
4. The method of claim 2, wherein the application server comprises a plurality;
the establishing network connections between the application server and the at least two message queue servers respectively comprises:
and respectively establishing network connection between each application server in the plurality of application servers and the at least two message queue servers by adopting a Cartesian product cross connection mode.
5. The method of claim 1, further comprising:
acquiring a request for processing a message sent by a user terminal; wherein, the request carries the message;
and responding to the request, and executing the operation of sending the message to one of the at least two message queue servers.
6. The method of claim 1, wherein the data in the at least two message queue servers is stored in a distributed file sharing manner;
the method further comprises the following steps:
respectively performing receiving and reporting operations to the at least two message queue servers according to a preset time interval;
and acquiring the target message in one of the at least two message queue servers.
7. The method of claim 1, wherein the application server comprises a plurality;
the method further comprises the following steps:
and in the case that the data in the message queue server is acquired by one of the application servers, deleting the data in the message queue server so that other application servers in the application servers cannot acquire the data.
8. A data transmission apparatus comprising:
the sending module is used for sending a message to one of the at least two message queue servers; and
and the polling module is used for sending the message to other message queue servers in the at least two message queue servers in a polling mode under the condition of receiving the information which is sent by the message queue servers and used for identifying the message sending failure until the information for identifying the message sending success is received.
9. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202110186763.XA 2021-02-10 2021-02-10 Data transmission method, device, computer system and readable storage medium Active CN112953769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110186763.XA CN112953769B (en) 2021-02-10 2021-02-10 Data transmission method, device, computer system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110186763.XA CN112953769B (en) 2021-02-10 2021-02-10 Data transmission method, device, computer system and readable storage medium

Publications (2)

Publication Number Publication Date
CN112953769A true CN112953769A (en) 2021-06-11
CN112953769B CN112953769B (en) 2022-10-11

Family

ID=76245751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110186763.XA Active CN112953769B (en) 2021-02-10 2021-02-10 Data transmission method, device, computer system and readable storage medium

Country Status (1)

Country Link
CN (1) CN112953769B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285807A (en) * 2021-12-22 2022-04-05 中国农业银行股份有限公司 Message information management method, device, server and storage medium
CN117675720A (en) * 2024-01-31 2024-03-08 井芯微电子技术(天津)有限公司 Message transmission method and device, electronic equipment and storage medium
CN117675720B (en) * 2024-01-31 2024-05-31 井芯微电子技术(天津)有限公司 Message transmission method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209115A (en) * 2013-04-07 2013-07-17 北京京东世纪贸易有限公司 Message sending system
US9509641B1 (en) * 2015-12-14 2016-11-29 International Business Machines Corporation Message transmission for distributed computing systems
US9590885B1 (en) * 2013-03-13 2017-03-07 Sprint Communications Company L.P. System and method of calculating and reporting of messages expiring from a queue
CN108965164A (en) * 2017-05-17 2018-12-07 北京京东尚科信息技术有限公司 Service request repeating method, device and readable storage medium storing program for executing based on message queue
CN109905457A (en) * 2019-01-09 2019-06-18 广州视源电子科技股份有限公司 Principal and subordinate's server data synchronous method, device, computer equipment and storage medium
CN110247808A (en) * 2019-06-27 2019-09-17 深圳前海微众银行股份有限公司 Method for sending information, device, equipment and readable storage medium storing program for executing
CN110661849A (en) * 2019-08-30 2020-01-07 中国人民财产保险股份有限公司 Request processing method and device, electronic equipment and storage medium
CN111586171A (en) * 2020-05-07 2020-08-25 广州虎牙信息科技有限公司 Server operation method and device, electronic equipment and storage medium
CN111756811A (en) * 2020-05-29 2020-10-09 苏州浪潮智能科技有限公司 Method, system, device and medium for actively pushing distributed system
CN111787494A (en) * 2020-05-06 2020-10-16 浙江工业大学 Short message sending reliable method based on micro service

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9590885B1 (en) * 2013-03-13 2017-03-07 Sprint Communications Company L.P. System and method of calculating and reporting of messages expiring from a queue
CN103209115A (en) * 2013-04-07 2013-07-17 北京京东世纪贸易有限公司 Message sending system
US9509641B1 (en) * 2015-12-14 2016-11-29 International Business Machines Corporation Message transmission for distributed computing systems
CN108965164A (en) * 2017-05-17 2018-12-07 北京京东尚科信息技术有限公司 Service request repeating method, device and readable storage medium storing program for executing based on message queue
CN109905457A (en) * 2019-01-09 2019-06-18 广州视源电子科技股份有限公司 Principal and subordinate's server data synchronous method, device, computer equipment and storage medium
CN110247808A (en) * 2019-06-27 2019-09-17 深圳前海微众银行股份有限公司 Method for sending information, device, equipment and readable storage medium storing program for executing
CN110661849A (en) * 2019-08-30 2020-01-07 中国人民财产保险股份有限公司 Request processing method and device, electronic equipment and storage medium
CN111787494A (en) * 2020-05-06 2020-10-16 浙江工业大学 Short message sending reliable method based on micro service
CN111586171A (en) * 2020-05-07 2020-08-25 广州虎牙信息科技有限公司 Server operation method and device, electronic equipment and storage medium
CN111756811A (en) * 2020-05-29 2020-10-09 苏州浪潮智能科技有限公司 Method, system, device and medium for actively pushing distributed system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王小霞等: "一种消息队列中间件的设计与实现", 《计算机工程》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285807A (en) * 2021-12-22 2022-04-05 中国农业银行股份有限公司 Message information management method, device, server and storage medium
CN117675720A (en) * 2024-01-31 2024-03-08 井芯微电子技术(天津)有限公司 Message transmission method and device, electronic equipment and storage medium
CN117675720B (en) * 2024-01-31 2024-05-31 井芯微电子技术(天津)有限公司 Message transmission method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112953769B (en) 2022-10-11

Similar Documents

Publication Publication Date Title
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN111526049A (en) Operation and maintenance system, operation and maintenance method, electronic device and storage medium
CN115170321A (en) Method and device for processing batch transaction data
CN111611086A (en) Information processing method, information processing apparatus, electronic device, and medium
CN114760233A (en) Service processing method and device, electronic equipment and storage medium
CN113132400B (en) Business processing method, device, computer system and storage medium
CN112953769B (en) Data transmission method, device, computer system and readable storage medium
CN111478974A (en) Network connection method and device, electronic equipment and readable storage medium
CN112882895A (en) Health examination method, device, computer system and readable storage medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN116302561A (en) State control method, device, equipment and storage medium for application instance
CN115934378A (en) Service data processing method and device, electronic equipment and storage medium
CN113296911B (en) Cluster calling method, cluster calling device, electronic equipment and readable storage medium
CN113781154A (en) Information rollback method, system, electronic equipment and storage medium
CN113779021B (en) Data processing method, device, computer system and readable storage medium
CN111580882B (en) Application program starting method, device, computer system and medium
CN114244700A (en) Port processing method and device, electronic equipment and computer readable storage medium
CN113778631A (en) Distributed transaction compensation method and device, electronic equipment and readable storage medium
CN115250276A (en) Distributed system and data processing method and device
CN111130702A (en) Decoding method, decoding system, electronic device, and storage medium
CN114793232B (en) Service processing method, device, electronic equipment and storage medium
CN110572331B (en) Message processing method and system
CN115203334A (en) Data processing method and device, electronic equipment and storage medium
CN115103005A (en) Request response method and device, electronic equipment and storage medium
CN115373802A (en) Method and device for restarting agent system, electronic equipment and storage medium

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