CN114039981A - Message processing method, device, server and storage medium - Google Patents

Message processing method, device, server and storage medium Download PDF

Info

Publication number
CN114039981A
CN114039981A CN202111331709.6A CN202111331709A CN114039981A CN 114039981 A CN114039981 A CN 114039981A CN 202111331709 A CN202111331709 A CN 202111331709A CN 114039981 A CN114039981 A CN 114039981A
Authority
CN
China
Prior art keywords
server
transaction
transaction request
feedback message
client
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
CN202111331709.6A
Other languages
Chinese (zh)
Other versions
CN114039981B (en
Inventor
颜旭峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111331709.6A priority Critical patent/CN114039981B/en
Publication of CN114039981A publication Critical patent/CN114039981A/en
Application granted granted Critical
Publication of CN114039981B publication Critical patent/CN114039981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1012Server selection for load balancing based on compliance of requirements or conditions with available server resources

Landscapes

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

Abstract

The embodiment of the application discloses a message processing method, a message processing device, a server and a storage medium, wherein the method comprises the following steps: the first server responds to a transaction request from the client and generates a feedback message; based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the setting middleware, the first server sends the feedback message and the transaction request to the second server so that the second server stores the transaction request and the feedback message; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server. The set middleware completes the message forwarding process, thereby not only reducing the development and test difficulty, reducing the coding time and the experience requirements on the development personnel, but also meeting the stability requirement, being capable of carrying out dynamic load balancing and meeting the demand scene of rapid development and deployment.

Description

Message processing method, device, server and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a message processing method, an apparatus, a server, and a storage medium.
Background
In the big data fields of banking industry, insurance industry, e-commerce and the like, each application system generates massive transaction data every day. In program development, a large amount of data is often required to complete operation in a short time, and the complete data is transmitted to another independent system library within a limited time for daily staff to use in an off-line system. For example, in the micro-server cluster credit project system, the user interest data of the post-loan component is very large, so the operation based on the interest data is very frequent, and the obtained large amount of calculation results need to be transmitted to the collection system.
In the existing industry, a large amount of calculation results are transmitted to other independent systems through a third-party process. In the process, a message forwarding module is required to be introduced into a third-party process, various configurations of the module rely on the experience of developers to develop a program meeting transaction requirements in a short time and complete tests, and the requirements on the developers are high.
Disclosure of Invention
The embodiment of the application provides a message processing method, a message processing device, a server and a storage medium, which are used for reducing development and testing difficulty, reducing coding time and experience requirements on developers, meeting stability requirements, performing dynamic load balancing and meeting the demand scene of rapid development and deployment.
In a first aspect, an embodiment of the present application provides a message processing method, including:
the first server responds to a transaction request from the client and generates a feedback message;
based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the set middleware, the first server sends the feedback message and the transaction request to a second server so that the second server stores the transaction request and the feedback message;
wherein the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In some exemplary embodiments, the transaction forwarding module is configured with a business logic invocation parameter;
the transaction request is received by the first server through a service logic calling parameter configured by the transaction transfer module.
In some exemplary embodiments, if there are multiple transaction requests at the same time, starting the same number of processes as the transaction requests in the transaction forwarding module; wherein each process corresponds to a transaction request.
In some exemplary embodiments, after the first server responds to the transaction request from the client and generates the feedback message, the method further includes:
the first server sends the feedback message to the client.
In some exemplary embodiments, the load balancing mechanism is determined by dynamically adjusting the number of processes concurrently open between the client and the first server when the number of transaction requests changes.
In some exemplary embodiments, the data form of the transaction request is a transaction message, and the data form of the feedback message is a response message.
In a second aspect, an embodiment of the present application provides a message processing method, including:
the second server receives a transaction request sent by the first server and a feedback message of the transaction request; wherein the transaction request and the feedback message are sent by the first server based on a non-blocking communication application program interface, an inter-process communication mechanism and a load balancing mechanism which are included in the setting middleware;
the second server storing the transaction request and the feedback message;
wherein the feedback message is generated by the first server in response to a transaction request from a client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In a third aspect, an embodiment of the present application provides a message processing apparatus, which is integrated with a processor and includes:
the response unit is used for responding to the transaction request from the client and generating a feedback message;
the first sending unit is used for sending the feedback message and the transaction request to a second server based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the set middleware, so that the second server stores the transaction request and the feedback message;
wherein the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In some exemplary embodiments, the transaction forwarding module is configured with a business logic invocation parameter;
the transaction request is received by the first server through a service logic calling parameter configured by the transaction transfer module.
In some exemplary embodiments, the system further comprises a process starting unit, configured to start, in the transaction transit module, the same number of processes as the number of transaction requests when multiple transaction requests exist simultaneously; wherein each process corresponds to a transaction request.
In some exemplary embodiments, the system further includes a second sending unit, configured to, after the first server responds to a transaction request from a client and generates a feedback message, send the feedback message to the client by the first server.
In some exemplary embodiments, the load balancing mechanism is determined by dynamically adjusting the number of processes concurrently open between the client and the first server when the number of transaction requests changes.
In some exemplary embodiments, the data form of the transaction request is a transaction message, and the data form of the feedback message is a response message.
In a fourth aspect, an embodiment of the present application provides a message processing apparatus, integrated in a second server, including:
the receiving unit is used for receiving a transaction request sent by a first server and a feedback message of the transaction request; wherein the transaction request and the feedback message are sent by the first server based on a non-blocking communication application program interface, an inter-process communication mechanism and a load balancing mechanism which are included in the setting middleware;
the storage unit is used for storing the transaction request and the feedback message;
wherein the feedback message is generated by the first server in response to a transaction request from a client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In a fifth aspect, an embodiment of the present application further provides a server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement any of the methods as provided in the first and second aspects of the present application.
In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of a server, enable the server to perform any one of the methods as provided in the first and second aspects of the present application.
In a seventh aspect, an embodiment of the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement any of the methods as provided in the first and second aspects of the present application.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
because the middleware itself includes an inter-process communication mechanism and a load balancing mechanism, and provides an application program interface of non-blocking communication, in the embodiment of the application, the inter-process communication mechanism and the load balancing mechanism in the middleware are determined according to the number of processes which are simultaneously opened between the client and the first server, so that the middleware dynamically adjusts the processing capacity according to the transaction flow, on one hand, the requirement of low time consumption in the transaction sending process is met, and on the other hand, the instability caused by transaction load fluctuation is avoided, therefore, after the first server responds to the transaction request from the client, a feedback message including the transaction result is generated, and based on the application program interface of non-blocking communication, the inter-process communication mechanism and the load balancing mechanism which are set to be included by the middleware, the first server sends the feedback message and the transaction request to the second server, to cause the second server to store the transaction request and the feedback message. Therefore, the set middleware completes the message forwarding process, thereby not only reducing the development and test difficulty, reducing the coding time and the experience requirements on development personnel, but also meeting the stability requirement, being capable of carrying out dynamic load balancing and meeting the demand scene of rapid development and deployment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a message processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another message processing method according to an embodiment of the present application;
fig. 4 is a signaling flow chart of a message processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a system for forwarding a message by using middleware according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another message processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a first server according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a second server according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
For convenience of understanding, terms referred to in the embodiments of the present application are explained below:
(1) a middleware: software for providing connection between application software and a platform enables a plurality of software running on one or more machines to interact between networks through self-provided services. Middleware is often used as a connection bridge between a client and a server, and provides functions of service forwarding, load balancing and the like. Common middleware is Weblogic, Tuxedo, etc.
(2) Non-blocking communication: and the response mode when the process calls the function. When a process calls a function, if the process is in a waiting state before a processing result is returned, the call is blocked; and if the call returns immediately without waiting for the processing result, the call is a non-blocking call.
Any number of elements in the drawings are by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
In a specific practice process, in the big data fields of banking industry, insurance industry, e-commerce and the like, each application system generates massive transaction data every day. In program development, a large amount of data is often required to complete operation in a short time, and the complete data is transmitted to another independent system library within a limited time for daily staff to use in an off-line system. For example, in the micro-server cluster credit project system, the user interest data of the post-loan component is very large, so the operation based on the interest data is very frequent, and the obtained large amount of calculation results need to be transmitted to the collection system.
In the existing industry, when a client sends a message to a server in computer communication, the following method can be generally adopted:
firstly, a client process directly sends a message to a server; in this way, the sending action is directly completed by the client process, the time consumption of the whole sending link is superposed on the original transaction time consumption, and particularly, the network rate and the transaction load are fluctuated to cause very obvious influence.
Secondly, the client process sends a message to the server through the sub-process; in this way, if the sub-process is divided by the main process to perform the sending action, although the transaction flow of the main process is not affected, the management of the sub-process is increased, the complexity of the whole program and the difficulty of subsequent test and debugging are improved, and the requirement of rapid deployment is not easily met.
Thirdly, the client forwards the message to a local third-party process for subsequent processing; in the method, only message transmission action needs to be carried out in the client, the communication efficiency between local processes is high, the requirement that a message sending link does not influence a mainstream transaction process can be met, but developers need to have enough development experience, otherwise, a stable, reliable, high-robustness and quick-capacity-expansion server program meeting the transaction requirement on a bank line needs to be developed from scratch in a short time, and the test is very difficult to complete.
In a specific application process, after data is transmitted independently and operation is completed, a large number of calculation results are transmitted to other independent systems through a third-party process. In the process, a message forwarding module is required to be introduced into a third-party process, various configurations of the module rely on the experience of developers to develop a program meeting transaction requirements in a short time and complete tests, and the requirements on the developers are high.
In the prior art, a non-blocking forwarding logic of a transaction message needs to be added, a program of a server of a newly added message forwarding module receives the message, a program of a client of the newly added message forwarding module sends the transaction message to a message receiver, a process communication mechanism between the transaction forwarding module and the message forwarding module needs to be established and adjusted, a load balancing mechanism of the message forwarding module needs to be designed, and the two mechanisms need to be tested to verify stability and robustness. In the whole process, the core parameters of the operating system are adjusted, a large amount of coding and testing work is required to be invested greatly, and the requirement for rapid development and deployment cannot be met.
Therefore, the application provides a message processing method, wherein a first server responds to a transaction request from a client and generates a feedback message; based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the setting middleware, the first server sends the feedback message and the transaction request to the second server so that the second server stores the transaction request and the feedback message; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server. The set middleware completes the message forwarding process, thereby not only reducing the development and test difficulty, reducing the coding time and the experience requirements on the development personnel, but also meeting the stability requirement, being capable of carrying out dynamic load balancing and meeting the demand scene of rapid development and deployment.
After introducing the design concept of the embodiment of the present application, some simple descriptions are provided below for application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Fig. 1 is a schematic view of an application scenario of a message processing method according to an embodiment of the present application.
The application scenario includes a plurality of clients 101 (including client 101-1, client 101-2, … … client 101-n), a plurality of first servers 102 (including first server 102-1, … … first server 102-m), and a plurality of second servers 103 (including second server 103-1, … … second server 103-p). The client 101, the first server 102 and the second server 103 are connected through a wireless or wired network, and the client 101 includes but is not limited to servers such as a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, and a smart television. The first server 102 and the second server 103 may be a server, a server cluster composed of several servers, or a cloud computing center. The first server 102 and the second server 103 may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms.
Specifically, the client 101 sends a transaction request to the first server 102, and the first server 102 responds to the transaction request from the client 101 and generates a feedback message; based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the setting middleware, the first server 102 sends a feedback message and a transaction request to the second server 103, and the second server 103 receives the transaction request sent by the first server 102 and the feedback message of the transaction request; the second server 103 stores the transaction request and the feedback message, wherein the inter-process communication mechanism and the load balancing mechanism are determined according to the number of simultaneously opened processes between the client and the first server 102.
Of course, the method provided in the embodiment of the present application is not limited to be used in the application scenario shown in fig. 1, and may also be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described in the following method embodiments, and will not be described in detail herein.
To further illustrate the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide method steps as shown in the following embodiments or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application.
The following describes the technical solution provided in the embodiment of the present application with reference to the application scenario shown in fig. 1.
Referring to fig. 2, an embodiment of the present application provides a message processing method applied to a first server, including the following steps:
s201, the first server responds to a transaction request from the client and generates a feedback message.
S202, based on the non-blocking communication application program interface, the inter-process communication mechanism and the load balancing mechanism which are included in the setting middleware, the first server sends the feedback message and the transaction request to the second server so that the second server stores the transaction request and the feedback message.
The inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
Because the middleware comprises an interprocess communication mechanism and a load balancing mechanism, and provides an application program interface for non-blocking communication, in the embodiment of the application, the inter-process communication mechanism and the load balancing mechanism in the middleware are determined according to the number of processes which are simultaneously started between the client and the first server, thus, on one hand, the requirement of low time consumption in the transaction sending process is met, and on the other hand, instability caused by transaction load fluctuation is avoided, therefore, after the first server responds to a transaction request from a client, a feedback message including a transaction result is generated, and based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the set middleware, the first server sends the feedback message and the transaction request to the second server so that the second server stores the transaction request and the feedback message. Therefore, the set middleware completes the message forwarding process, thereby not only reducing the development and test difficulty, reducing the coding time and the experience requirements on development personnel, but also meeting the stability requirement, being capable of carrying out dynamic load balancing and meeting the demand scene of rapid development and deployment.
Referring to S201, the client receives a transaction triggering operation of the user, for example, a transaction initiating button on a display page of the client is clicked to trigger the transaction operation, the client generates a transaction request according to the transaction operation, and sends the transaction request to the first server, and the first server responds to the transaction request from the client to generate a feedback message.
For example, since the transaction is usually executed at high concurrency, a transaction forwarding module may be configured in the front-end system of the first server, and a service logic invocation parameter is configured in the transaction forwarding module, and the first server receives the transaction request from the client through the service logic invocation parameter configured by the transaction forwarding module.
For example, in a high concurrency scenario, if multiple transaction requests exist at the same time, processes with the same number as the transaction requests are started in the transaction forwarding module; wherein each process corresponds to a transaction request.
In a specific example, the data form of the transaction request is a transaction message, and the feedback message is a response message.
In an actual application process, in order to improve user experience, the first server sends the feedback message to the client after the transaction execution is finished, so that the user can timely acquire the execution condition of the transaction request.
Referring to S202, since the middleware itself includes an inter-process communication mechanism and a load balancing mechanism, and an Application Programming Interface (API) for non-blocking communication is provided, the middleware may be set, for example, the inter-process communication mechanism and the load balancing mechanism may be determined according to the number of processes simultaneously opened between the client and the first server, which meets the requirement of low transaction sending time consumption and avoids dynamic fluctuation of transaction load, thereby improving system stability. And further based on the non-blocking communication application program interface included in the setting middleware, combining with an inter-process communication mechanism and a load balancing mechanism, the first server sends the feedback message and the transaction request to the second server so that the second server stores the transaction request and the feedback message.
Taking the bank system as an example, the second server may be another independent system to which the complete data after a large amount of data is operated is transmitted, so that daily staff can use the system in an off-line manner. For example, the information charge data of the post-loan component user in the micro-server cluster credit project system is very large, so that the calculation based on the information charge data is very frequent, and the obtained large amount of calculation results need to be transmitted to the collection urging system, and the second server can be the collection urging system.
In a specific example, when the number of transaction requests changes, a process that is started simultaneously between the client and the first server is dynamically adjusted, and a load balancing mechanism is determined according to an adjustment result, so as to overcome the condition of transaction load fluctuation. And determining a load balancing mechanism according to the number of processes which are simultaneously started between the client and the first server, so that the requirement of low time consumption of transaction sending can be met.
Referring to fig. 3, an embodiment of the present application provides a message processing method, applied to a second server, including the following steps:
s301, the second server receives a transaction request sent by the first server and a feedback message of the transaction request; the transaction request and the feedback message are sent by the first server based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the setting middleware.
S302, the second server stores the transaction request and the feedback message.
Wherein the feedback message is generated by the first server in response to the transaction request from the client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In particular, the second server stores the transaction request and the transaction feedback message for application in a suitable scenario, such as a simulation environment, or a hasty system, etc.
In order to make the technical solution of the present application more complete, a specific example is used below to describe a complete process of message processing in the embodiment of the present application, and referring to fig. 4, fig. 4 shows a signaling flow chart of a message processing method.
S401, the client sends the transaction request to the first server through the service logic calling parameter configured by the transaction transfer module.
S402, the first server receives and responds to the transaction request from the client and generates a feedback message.
And S403, the first server returns the feedback message to the client.
S404, based on the non-blocking communication application program interface, the inter-process communication mechanism and the load balancing mechanism which are included in the setting middleware, the first server sends the feedback message and the transaction request to the second server.
S405, the second server stores the transaction request and the feedback message.
It should be noted that S403 and S404 have no obvious sequence, and fig. 4 is only an example.
Fig. 5 is a schematic diagram of a system for forwarding a message by using middleware. The transaction initiator is a client, for example, and the transaction receiver is a first server, for example, and is used for completing the transaction; the message recipient is for example a second server. The transaction transfer party is, for example, a server independent from the client and the server, the transaction initiator sends the transaction request to the transaction receiver through each process of the transaction transfer module, the transaction receiver responds to the transaction request, executes the transaction, and sends the transaction result (response message) and the transaction request (request message) to the message receiver through the middleware for standby.
Describing the processing process of the transaction in fig. 5 by using a specific example, the transaction initiator initiates the transaction, and the transaction transfer party invokes a system process to initiate a transaction request to the transaction receiver according to the service logic after receiving the transaction; after the transaction receiving party finishes processing, returning a transaction result to the transaction forwarding party; after receiving the transaction result (feedback message), the transaction transfer party sends the transaction result and the transaction request to the middleware in a non-blocking communication mode, continues to execute a subsequent processing flow after the transmission is finished, and returns the transaction result to the transaction initiator; after the middleware receives the transaction information, the application program interface, the interprocess communication mechanism and the load balancing mechanism which are configured in the middleware and are not blocked in communication are used for sending the transaction information (transaction request and transaction result) to the message receiver, and the flow is ended after the sending is finished.
In addition, the embodiment of the application can also be applied to the following scenes, and the transaction message needs to be copied and forwarded to another system for subsequent processing in the transaction process of the existing main transaction with large transaction amount. In this scenario, the forwarding process does not cause appreciable influence on the consumed time of the original transaction, and whether the forwarding process succeeds or not does not affect the normal operation of the original transaction. The capacity expansion can be conveniently carried out on the client side for transmitting the message.
For example, the middleware can dynamically adjust the processing capacity according to the transaction flow, the message sending link only adds about 2 milliseconds of processing time to the main transaction flow, and the processing condition of the subsequent flow does not affect the transaction throughput of the main transaction. The dependency on the encoding level of developers is low, and the code quality is easy to control; the influence on the original transaction flow is not sensible.
As shown in fig. 6, based on the same inventive concept as the message processing method, the embodiment of the present application further provides a message processing apparatus, which is integrated in the first server and includes a response unit 61 and a first sending unit 62.
A response unit 61, configured to respond to a transaction request from a client and generate a feedback message;
a first sending unit 62, configured to send the feedback message and the transaction request to the second server based on an application program interface, an inter-process communication mechanism, and a load balancing mechanism of non-blocking communication included in the setting middleware, so that the second server stores the transaction request and the feedback message;
the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
In some exemplary embodiments, the transaction forwarding module is configured with a business logic invocation parameter;
the transaction request is received by the first server through the service logic calling parameter configured by the transaction transfer module.
In some exemplary embodiments, the system further comprises a process starting unit, configured to start, in the transaction transit module, the same number of processes as the number of transaction requests when multiple transaction requests exist simultaneously; wherein each process corresponds to a transaction request.
In some exemplary embodiments, the system further includes a second sending unit, configured to send the feedback message to the client by the first server after the first server responds to the transaction request from the client and generates the feedback message.
In some exemplary embodiments, the load balancing mechanism is determined by dynamically adjusting the number of processes concurrently open between the client and the first server as the number of transaction requests changes.
In some exemplary embodiments, the data form of the transaction request is a transaction message, and the data form of the feedback message is a response message.
As shown in fig. 7, based on the same inventive concept as the above-described message processing method, the embodiment of the present application further provides a message processing apparatus, which is integrated in the second server and includes a receiving unit 71 and a storage unit 72.
A receiving unit 71, configured to receive a transaction request sent by a first server and a feedback message of the transaction request; the transaction request and the feedback message are sent by the first server based on a non-blocking communication application program interface, an inter-process communication mechanism and a load balancing mechanism which are included in the setting middleware;
a storage unit 72 for storing transaction requests and feedback messages;
wherein the feedback message is generated by the first server in response to the transaction request from the client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
The message processing device and the message processing method provided by the embodiment of the application adopt the same inventive concept, can obtain the same beneficial effects, and are not repeated herein.
Based on the same inventive concept as the message processing method, an embodiment of the present application further provides a server, which is the first server, and the server may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a server, and the like. As shown in fig. 8, the server may include a processor 801 and a memory 802.
The Processor 801 may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware components, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 802, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 802 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same inventive concept as the message processing method, an embodiment of the present application further provides a server, which is the second server described above, and the server may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a server, and the like. As shown in fig. 9, the server may include a processor 901 and a memory 902.
The Processor 901 may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 902, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 902 of the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; the computer storage media may be any available media or data storage device that can be accessed by a computer, including but not limited to: various media that can store program codes include a removable Memory device, a Random Access Memory (RAM), a magnetic Memory (e.g., a flexible disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical Memory (e.g., a CD, a DVD, a BD, an HVD, etc.), and a semiconductor Memory (e.g., a ROM, an EPROM, an EEPROM, a nonvolatile Memory (NAND FLASH), a Solid State Disk (SSD)).
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media that can store program codes include a removable Memory device, a Random Access Memory (RAM), a magnetic Memory (e.g., a flexible disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical Memory (e.g., a CD, a DVD, a BD, an HVD, etc.), and a semiconductor Memory (e.g., a ROM, an EPROM, an EEPROM, a nonvolatile Memory (NAND FLASH), a Solid State Disk (SSD)).
The above embodiments are only used to describe the technical solutions of the present application in detail, but the above embodiments are only used to help understanding the method of the embodiments of the present application, and should not be construed as limiting the embodiments of the present application. Modifications and substitutions that may be readily apparent to those skilled in the art are intended to be included within the scope of the embodiments of the present application.

Claims (17)

1. A message processing method, comprising:
the first server responds to a transaction request from the client and generates a feedback message;
based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the set middleware, the first server sends the feedback message and the transaction request to a second server so that the second server stores the transaction request and the feedback message;
wherein the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
2. The method of claim 1, wherein the transaction forwarding module is configured with a business logic invocation parameter;
the transaction request is received by the first server through a service logic calling parameter configured by the transaction transfer module.
3. The method according to claim 2, wherein if there are multiple transaction requests at the same time, starting the same number of processes as the transaction requests in the transaction forwarding module; wherein each process corresponds to a transaction request.
4. The method of claim 1, wherein after the first server responds to the transaction request from the client and generates the feedback message, further comprising:
the first server sends the feedback message to the client.
5. The method of claim 1, wherein the load balancing mechanism is determined by dynamically adjusting the number of processes concurrently open between the client and the first server when the number of transaction requests changes.
6. The method according to any one of claims 1 to 5, wherein the transaction request is in the form of a transaction message and the feedback message is in the form of a response message.
7. A message processing method, comprising:
the second server receives a transaction request sent by the first server and a feedback message of the transaction request; wherein the transaction request and the feedback message are sent by the first server based on a non-blocking communication application program interface, an inter-process communication mechanism and a load balancing mechanism which are included in the setting middleware;
the second server storing the transaction request and the feedback message;
wherein the feedback message is generated by the first server in response to a transaction request from a client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
8. A message processing apparatus integrated with a first server, comprising:
the response unit is used for responding to the transaction request from the client and generating a feedback message;
the first sending unit is used for sending the feedback message and the transaction request to a second server based on an application program interface, an inter-process communication mechanism and a load balancing mechanism of non-blocking communication included in the set middleware, so that the second server stores the transaction request and the feedback message;
wherein the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
9. The apparatus of claim 8, wherein the transaction forwarding module is configured with a service logic invocation parameter;
the transaction request is received by the first server through a service logic calling parameter configured by the transaction transfer module.
10. The apparatus according to claim 9, further comprising a process starting unit configured to start processes in the same number as the transaction requests in the transaction transit module when a plurality of transaction requests exist simultaneously; wherein each process corresponds to a transaction request.
11. The apparatus according to claim 8, further comprising a second sending unit, configured to send the feedback message to the client by the first server after the first server responds to the transaction request from the client and generates the feedback message.
12. The apparatus of claim 8, wherein the load balancing mechanism is determined by dynamically adjusting the number of processes concurrently open between the client and the first server when the number of transaction requests changes.
13. The apparatus according to any one of claims 8 to 12, wherein the transaction request is in the form of a transaction message and the feedback message is in the form of a response message.
14. A message processing apparatus integrated with a second server, comprising:
the receiving unit is used for receiving a transaction request sent by a first server and a feedback message of the transaction request; wherein the transaction request and the feedback message are sent by the first server based on a non-blocking communication application program interface, an inter-process communication mechanism and a load balancing mechanism which are included in the setting middleware;
the storage unit is used for storing the transaction request and the feedback message;
wherein the feedback message is generated by the first server in response to a transaction request from a client; the inter-process communication mechanism and the load balancing mechanism are determined according to the number of processes which are simultaneously started between the client and the first server.
15. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 8.
16. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a server, enable the server to perform the method of any of claims 1-8.
17. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the method of any of claims 1 to 8.
CN202111331709.6A 2021-11-11 2021-11-11 Message processing method, device, server and storage medium Active CN114039981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111331709.6A CN114039981B (en) 2021-11-11 2021-11-11 Message processing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111331709.6A CN114039981B (en) 2021-11-11 2021-11-11 Message processing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN114039981A true CN114039981A (en) 2022-02-11
CN114039981B CN114039981B (en) 2024-04-02

Family

ID=80137309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111331709.6A Active CN114039981B (en) 2021-11-11 2021-11-11 Message processing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN114039981B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370028A (en) * 2023-04-19 2024-01-09 哈尔滨商业大学 Electronic commerce information processing method containing threshold value

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1932875A (en) * 2006-10-09 2007-03-21 杭州东信金融技术服务有限公司 Prepositional system based on finance industry
CN107656784A (en) * 2016-07-25 2018-02-02 武汉票据交易中心有限公司 A kind of flow path processing method and device and server based on event
WO2021083281A1 (en) * 2019-10-31 2021-05-06 贵州白山云科技股份有限公司 Load balancing method and apparatus, and medium and device
CN112838964A (en) * 2021-01-06 2021-05-25 上海外国语大学 Bank-level soft load system and method
CN113065963A (en) * 2021-04-07 2021-07-02 上海金融期货信息技术有限公司 Futures chairman trading system
CN113163009A (en) * 2021-04-20 2021-07-23 平安消费金融有限公司 Data transmission method, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1932875A (en) * 2006-10-09 2007-03-21 杭州东信金融技术服务有限公司 Prepositional system based on finance industry
CN107656784A (en) * 2016-07-25 2018-02-02 武汉票据交易中心有限公司 A kind of flow path processing method and device and server based on event
WO2021083281A1 (en) * 2019-10-31 2021-05-06 贵州白山云科技股份有限公司 Load balancing method and apparatus, and medium and device
CN112838964A (en) * 2021-01-06 2021-05-25 上海外国语大学 Bank-level soft load system and method
CN113065963A (en) * 2021-04-07 2021-07-02 上海金融期货信息技术有限公司 Futures chairman trading system
CN113163009A (en) * 2021-04-20 2021-07-23 平安消费金融有限公司 Data transmission method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370028A (en) * 2023-04-19 2024-01-09 哈尔滨商业大学 Electronic commerce information processing method containing threshold value
CN117370028B (en) * 2023-04-19 2024-03-12 哈尔滨商业大学 Electronic commerce information processing method containing threshold value

Also Published As

Publication number Publication date
CN114039981B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
AU2019248524B2 (en) Cross-blockchain interaction method, apparatus, system, and electronic device
US10693816B2 (en) Communication methods and systems, electronic devices, and computer clusters
CN110933075B (en) Service calling method and device, electronic equipment and storage medium
CN112714158B (en) Transaction processing method, relay network, cross-link gateway, system, medium and equipment
CA3059719C (en) Payment processing method, device, medium and electronic device
CN114358921A (en) System switching method, apparatus, device, medium, and program product
CN112817694A (en) Automatic load balancing method and device for distributed system
CN112433863A (en) Micro-service calling method and device, terminal equipment and storage medium
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN114039981B (en) Message processing method, device, server and storage medium
CN111966653A (en) Data processing method, device, server and storage medium for micro-service call link
CN111427918A (en) Transaction detail data comparison method and device
CN109614271A (en) Control method, device, equipment and the storage medium of multiple company-data consistency
CN111930624A (en) Test link message data processing method and device
US20220276901A1 (en) Batch processing management
CN112565340B (en) Service scheduling method, device, computer system and medium for distributed application
CN111435320B (en) Data processing method and device
CN114170007A (en) Orthogonal easy return message assembly method, program product, medium, and electronic device
CN110336847B (en) Payment message transmission system and method
CN109067611B (en) Method, device, storage medium and processor for detecting communication state between systems
US11863649B2 (en) Systems and methods for context-aware event ordering protocol for distributed service systems
Nyström et al. High‐level distribution for the rapid production of robust telecoms software: comparing C++ and Erlang
US12019652B2 (en) Method and device for synchronizing node data
US20240163161A1 (en) Active network node resilience pattern for cloud service
WO2021052237A1 (en) Transaction processing method and apparatus, device, storage medium and database

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