CN110928704B - Message processing method, message processing system, server and computer storage medium - Google Patents

Message processing method, message processing system, server and computer storage medium Download PDF

Info

Publication number
CN110928704B
CN110928704B CN201811103287.5A CN201811103287A CN110928704B CN 110928704 B CN110928704 B CN 110928704B CN 201811103287 A CN201811103287 A CN 201811103287A CN 110928704 B CN110928704 B CN 110928704B
Authority
CN
China
Prior art keywords
server
information
message processing
operation information
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811103287.5A
Other languages
Chinese (zh)
Other versions
CN110928704A (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.)
Guangzhou Huya Information Technology Co Ltd
Original Assignee
Guangzhou Huya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Information Technology Co Ltd filed Critical Guangzhou Huya Information Technology Co Ltd
Priority to CN201811103287.5A priority Critical patent/CN110928704B/en
Publication of CN110928704A publication Critical patent/CN110928704A/en
Application granted granted Critical
Publication of CN110928704B publication Critical patent/CN110928704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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

Abstract

The application provides a message processing method, a message processing system, a server and a computer storage medium. The message processing method is applied to a message processing system, and the message processing system comprises at least one client, a first server and at least one second server; the method comprises the steps that a client establishes communication connection with a first server, and the first server establishes communication connection with a second server; the message processing method comprises the following steps: the second server subscribes to the theme of the first server; the client sends a message related to the theme to a first server, wherein the message comprises operation information; when the second server monitors the operation information received by the first server, the second server sends request information to the first server; the first server sends the operation information to the second server according to the request information. By the message processing method, the expansion and deployment of the third party message queue are omitted, and the cost is reduced.

Description

Message processing method, message processing system, server and computer storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a message processing method, a message processing system, a server, and a computer storage medium.
Background
In computer science, a message queue is a way of inter-process communication or communication between different threads of the same process. The message queue model provides an asynchronous communication protocol that allows communication participants to be decoupled in space and time. The producer and consumer of the message need not communicate directly, and the message is sent to a queue for storage, knowing that the consumer is taking the message from the queue. In the message team model, each message will only be consumed by one consumer, i.e., one message is consumed only once and only once.
By adopting the communication mode of message queues, a third party needs to be added into the message queues. In the prior art, most of third party message queues are designed and constructed heavily, the expansion and deployment thresholds are high, the cross-platform calling is troublesome, and the use cost and the maintenance cost are high.
Disclosure of Invention
The application provides a message processing method, a message processing system, a server and a computer storage medium, and mainly solves the technical problem of reducing the cost of message processing in communication.
In order to solve the technical problems described above, the present application provides a message processing method, which is applied to a message processing system, wherein the message processing system includes at least one client, a first server and at least one second server; the client establishes communication connection with the first server, and the first server establishes communication connection with the second server;
the message processing method comprises the following steps:
the second server subscribes to the theme of the first server;
the client sends a message related to the theme to the first server, wherein the message comprises operation information;
when the second server monitors the operation information received by the first server, the second server sends request information to the first server;
and the first server sends the operation information to the second server according to the request information.
In order to solve the technical problem, the application also provides a message processing system, which comprises at least one client, a first server and at least one second server; the client establishes communication connection with the first server, and the first server establishes communication connection with the second server;
the second server is used for subscribing to the theme of the first server;
the client is used for sending a message related to the theme to the first server, wherein the message comprises operation information;
the second server is further configured to monitor the operation information received by the first server, and send request information to the first server;
and the first server sends the operation information to the second server according to the request information.
In order to solve the technical problem, the application also provides another message processing method, wherein the message processing method is applied to the first server; the first server establishes communication connection with at least one client and at least one second server respectively;
the message processing method comprises the following steps:
the first server sets at least one theme;
the first server receives a message related to the theme sent by the client, wherein the message comprises operation information;
the first server receives the request information of the second server and sends the operation information to the second server according to the request information, wherein the second server successfully subscribes to the theme of the first server.
To solve the above technical problems, the present application further provides a server, the server including a communicator and a processor, wherein the communicator is coupled with the processor;
the communicator is used for connecting at least one client and at least one second server in a communication way;
the processor is configured to:
setting at least one theme;
receiving a message related to the theme sent by the client, wherein the message comprises operation information;
and receiving request information of the second server, and sending the operation information to the second server according to the request information, wherein the second server successfully subscribes to the theme of the first server.
To solve the above technical problem, the present application also provides a computer storage medium storing program data that can be executed to implement the above message processing method.
Compared with the prior art, the beneficial effects of this application are: the second server subscribes to the theme of the first server; the client sends a message related to the theme to a first server, wherein the message comprises operation information; when the second server monitors the operation information received by the first server, the second server sends request information to the first server, and when the first server receives the operation information, the second server actively sends the request information to the first server to request to execute the corresponding operation information; the first server sends the operation information to the second server according to the request information. By the message processing method, the expansion and deployment of the third party message queue can be omitted, and the cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow diagram of a first embodiment of a message processing method of the present application;
FIG. 2 is a schematic diagram of the message processing system of FIG. 1;
FIG. 3 is a flow chart of a second embodiment of a message processing method of the present application;
FIG. 4 is a flow chart of a third embodiment of a message processing method of the present application;
FIG. 5 is a flow chart of a fourth embodiment of a message processing method of the present application;
FIG. 6 is a schematic diagram illustrating the structure of one embodiment of a message processing system of the present application;
FIG. 7 is a schematic diagram of an embodiment of a server of the present application;
FIG. 8 is a schematic diagram of a further embodiment of a server of the present application;
fig. 9 is a schematic structural view of an embodiment of the computer storage medium of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic flow chart of a first embodiment of a message processing method of the present application; fig. 2 is a schematic diagram of the message processing system of fig. 1.
The message processing method of the present embodiment is applied to a message processing system 20, and as shown in fig. 2, the message processing system 20 includes at least one client 21, a first server 22, and at least one second server 23. Wherein the client 21 establishes a communication connection with the first server 22, and the first server 22 establishes a communication connection with the second server 23.
In this embodiment, the client 21 is a mobile phone, a computer, a palm computer or other intelligent devices as a producer of the message. The user inputs a user instruction through the client 21, thereby selecting a desired service function, and the client 21 generates a message according to the user instruction and transmits it to the first server 22.
The first server 22 acts as a message manager for managing messages of the client 21 and transmitting the messages to the corresponding second server 23.
The second server 23 is used as a consumer of the message, and is configured to consume the message of the client 21 and directly feed back the consumption result to the corresponding client 21, or feed back the consumption result to the corresponding client 21 through the first server 22.
As shown in fig. 1, the message processing method includes the steps of:
s11: the second server subscribes to the topic of the first server.
Wherein the second server 23 subscribes to one or more topics of the first server 22.
Specifically, the message processing system 20 includes a plurality of second servers 23, where each of the plurality of second servers 23 establishes a communication connection with the first server 22. The first server 22 sets up a plurality of topics, each second server 23 can subscribe to one or more topics, and likewise, a plurality of second servers 23 can subscribe to the same topic.
When the second server 23 successfully subscribes to one or more topics of the first server 22, the second server 23 and the subscribed topics form a subscription relationship, and the second server 23 listens to the operation information related to the subscribed topics in the first server 22. Specifically, when the first server 22 receives the operation information related to the subscribed topic, the first server 22 does not need to send information to notify the second server 23, and the corresponding second server 23 can learn about the situation in time through the listening method, which can effectively improve the working efficiency of the message processing system 20.
S12: the client sends a message related to the topic to the first server, wherein the message includes the operation information.
Wherein the client 21 sends the operation information related to the theme to the first server 22.
For example, when the user needs to perform service consumption, the client 21 receives a corresponding user instruction and generates corresponding operation information according to the user instruction. The client 21 transmits the operation information to the first server 22.
The first server 22 receives the operation information, matches the operation information with the theme information, and determines the theme corresponding to the operation information sent by the client 21.
S13: when the second server monitors the operation information received by the first server, the second server sends request information to the first server.
When the second server 23 subscribes to the theme corresponding to the operation information, the second server 23 can monitor the operation information received by the first server 22.
When the second server 23 is in an idle state, that is, the second server 23 can perform an operation corresponding to the operation information, the second server 23 sends request information to the first server 22 requesting permission to consume the operation information.
S14: the first server sends the operation information to the second server according to the request information.
After the first server 22 receives the request information of the second server 23, the first server 22 sends the operation information to the second server 23 according to the request information, and the second server 23 is allowed to consume the operation information, that is, execute the operation corresponding to the operation information.
In the message processing method of the present embodiment, the second server 23 directly establishes communication connection with the first server 22 by subscribing to one or more topics in the first server 22, and does not need to connect through a third party message queue, so that expansion and deployment of the third party message queue are omitted, and the construction cost and occupation space of the message processing system 20 are effectively reduced. Further, after the second server 23 establishes a subscription relationship with the first server 22, when the operation information enters the first server 22, the second server 23 can immediately obtain a response, so as to consume the operation information, thereby effectively improving the working efficiency of the message processing system 20 and realizing millisecond consumption.
The present application proposes another message processing method, and in particular, please refer to fig. 3, fig. 3 is a schematic flow chart of a second embodiment of the message processing method of the present application. The message processing method of the present embodiment is also applied to the message management system 20, please refer to fig. 2, and details thereof are not repeated here.
As shown in fig. 3, on the basis of the message processing method disclosed in the first embodiment, step S13 and step S14 further include the steps of:
s31: at least one second server sends first request information to the first server.
When it is monitored that operation information related to a subscription topic is received in the first server 22, the second server 23 sends first request information to the first server 22, and requests to obtain permission information for consuming the operation information.
In particular, since the plurality of second servers 23 are allowed to subscribe to the same topic in the message processing system 20, the first server 22 sets a consumption lock in the case of a distributed deployment of the plurality of second servers 23. The consumption lock corresponds to the permission information of the consumption subscription theme.
The implementation mechanism of the consumption lock is specifically as follows: for example, server a, server B, and server C have subscribed to the same topic at the same time, and when operational information related to the topic is received in the first server 22, server a, server B, and server C compete for the consumption lock. The first server 22 assigns the consumption lock to one of the servers (e.g., server a). When the server A obtains the consumption lock, the server B and the server C cannot consume the operation information under the theme, the consumption lock is released after the consumption of the server A is completed, and the server A, the server B and the server C compete again for the consumption lock related to the theme. When server A spends time out, message processing system 20 automatically releases the spending lock, server A, server B, and server C re-compete for the spending lock associated with the topic. The mechanism of consuming locks can effectively avoid multiple servers from repeatedly consuming the same operation information, and improve the utilization rate of the message processing system 20.
S32: the first server sends permission information to the second server according to the first request information.
The first server 22 receives the first request information of the plurality of second servers 23, and sends the authority information to one of the second servers 23 according to a preset rule.
For example, the first server 22 records the times when the plurality of second servers 23 transmit the first request information, then sorts the recorded times to obtain the earliest time, and the first server 22 transmits the authority information to the second server 23 corresponding to the earliest time; the first server 22 receives status information of the plurality of second servers 23. Wherein the states of the second servers 23 include an idle state, a busy state, and an offline state, and the first server 22 transmits the authority information to one second server 23 in the idle state; the first server 22 receives the available memory information of the plurality of second servers 23, and transmits the authority information to one second server 23 having the largest available memory. In other embodiments, the first server 22 may also send the authority information to one of the second servers 23 according to other preset rules, which will not be described herein.
S33: the second server sends second request information to the first server according to the authority information.
Wherein the second server 23 that receives the authority information obtains the authority to consume the operation information, and the second server 23 sends second request information to the first server 22 to request to obtain the operation information.
S34: the first server sends the operation information to the second server according to the second request information.
Wherein the first server 22 transmits the operation information to the second server 23 according to the second request information.
S35: and the second server executes the operation corresponding to the operation information according to the operation information.
Wherein, after receiving the operation information, the second server 23 consumes the operation information, that is, performs an operation corresponding to the operation information.
Taking the recharging order processing as an example, the message processing method of the embodiment is as follows:
the client 21 is recharged by the message processing system 20 and the second server 23 needs to ship props to the client 21. Since the event of recharging the client 21 occurs at any time, and in order to decouple the client 21 and the second server 23, the message processing method of the present embodiment is adopted to perform topic subscription consumption.
Specifically, when the client 21 performs recharging, the first server 22 invokes the subscription service, and writes a recharging record of the client 21 in the recharging theme. The first server 22 processes the recharge record and writes it to the cache by subject type. The second server 23 subscribes to the recharging topic preset in the first server 22, and monitors the recharging topic in real time. When it is monitored that the cache stores the recharge records corresponding to the recharge subjects, the second server 23 immediately initiates message consumption.
Since the second server 23 adopts a cluster deployment manner, in order to avoid repeated consumption, the subscription service provides a consumption lock competition mechanism. Specifically, the second server 23, which first competes successfully, obtains the consumption lock and performs the top-up record consumption, and performs prop shipment to the client 21. After the shipping logic process is complete, the message processing system 20 releases the consumption lock, the plurality of second servers 23 re-listens to the topic, and prepares for consumption competition.
In the message processing method of the present embodiment, after the second server 23 monitors the operation information received by the first server 22, the second server 23 needs to request to obtain the authority information of the operation information; the first server 22 sends the authority information to one of the second servers 23 according to a preset rule, so that the operation information is ensured not to be consumed repeatedly, and the utilization rate of the message processing system 20 is improved. Further, since the client 21 and the second server 23 do not establish a direct communication relationship, for the message processing system 20, there is no need to distinguish between the language platform or the architecture platform of the client 21 and the second server 23, and only the operation information needs to be forwarded through the first server 22, which is easy to use.
The present application proposes yet another message processing method, and in particular, please refer to fig. 4, fig. 4 is a schematic flow chart of a third embodiment of the message processing method of the present application. The message processing method of the present embodiment is also applied to the message management system 20, please refer to fig. 2, and details thereof are not repeated here.
Further, the first server 22 in the message management system 20 includes a database (not shown in the figure) for storing topic information corresponding to a plurality of topics set by the first server 22 and operation information sent by the client 21.
In this embodiment, the database is a Redis database. In other embodiments, the database may also be an Hbase database, a Mysql database, a Sybase database, or the like.
As shown in fig. 4, the message processing method of the present embodiment includes the steps of:
s41: the second server sends a subscription request to the first server, wherein the subscription request includes topic information.
Wherein the second server 23 sends a subscription request to the first server 22, wherein the subscription request comprises topic information.
Specifically, when the second server 23 needs to consume operation information related to a certain topic, the second server 23 sends a subscription request to the first server 22 to request to subscribe to the topic corresponding to the topic information.
S42: when the first server acquires the theme corresponding to the theme information in the database according to the theme information, the first server generates subscription information and sends the subscription information to the second server.
After receiving the topic information in the subscription request, the first server 22 obtains the topic corresponding to the topic information in the database. The first server 22 generates subscription information according to the topic corresponding to the topic information, and sends the subscription information to the second server 23, where the subscription information includes at least a topic IP address.
S43: the second server successfully subscribes to the topics of the database according to the subscription information.
Wherein the second server 23 receives the subscription information and establishes a subscription relationship with the first server 22 according to the topic IP address in the subscription information.
After the second server 23 successfully subscribes to the topic of the database, the second server 23 monitors the topic IP address in the database in real time. When the operation information is written in the subject IP address, the second server 23 can immediately get a response, and consume the operation information.
S44: and when the second server monitors the operation information of the database, the second server sends request information to the first server.
When the second server 23 monitors the write operation information of the buffer space corresponding to the subject IP address, the second server 23 sends request information to the first server 22 to request to consume the operation information.
S45: the first server sends the operation information to the second server according to the request information.
Step S45 of the present embodiment is the same as step S14 of the first embodiment, and will not be described herein.
In the message processing method of the present embodiment, the second server 23 establishes a subscription relationship with the database of the first server 22 by subscribing to one or more topics in the first server 22; after the subscription relationship is successfully established, the second server 23 can monitor the database in real time; when the database writes the operation information related to the theme, the second server 23 can immediately respond, so as to consume the operation information, and improve the working efficiency of the consumption management system 20; further, the message processing system 20 only needs to cache the database, so that the establishment of the third party message queue is omitted, and the system establishment cost is effectively reduced.
Referring to fig. 5, fig. 5 is a schematic flow chart of a fourth embodiment of the message processing method of the present application. The message processing method of the present embodiment is also applied to the message management system 20, please refer to fig. 2, and details thereof are not repeated here.
On the basis of the message processing method disclosed in the above embodiment, the message processing method of this embodiment further includes:
s51: the first server periodically detects whether the state of the database is in a normal working state.
In the message processing method of this embodiment, the cache database is used as a carrier of the operation information, so that when the database is down or updated in real time, the normal operation of the message processing system 20 may be affected.
In this regard, the message processing system 20 sets an automatic recovery procedure, and the mechanism of the automatic recovery procedure is referred to as step S52. Before starting the automatic recovery program, the first server 22 periodically detects whether the state of the database is in a normal operation state, and if the state of the database is detected to be in the normal operation state, the message processing system 20 operates normally; if it is detected that the database is not in a normal operation state, the process proceeds to step S52.
S52: the first server refreshes the database and recovers the subject information and the operation information in the database.
The database of this embodiment is deployed by using master-slave multi-AZ (Available Zone). Specifically, the first server 22 is deployed with a master database and at least one slave database, the master database being accessed to the message processing system 20, the slave database being backed up with subject information and operation information of the master database.
When the first server 22 detects that the main database is not available, the first server 22 immediately performs refreshing of the main database, and realizes the second-level restoration service by copying the subject information and the operation information from the database to the refreshed main database. Wherein the primary database refresh includes DNS refresh, primary database pull-up, and the like.
In the message processing method of the present embodiment, the message processing system 20 sets an automatic recovery program; the first server 22 periodically detects whether the database is able to function properly, improving the usability of the message processing system 20; when the database cannot work normally, the first server 22 starts an automatic recovery program, and immediately refreshes the database to realize second-level recovery service.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a message processing system of the present application.
The message processing system 60 of the present embodiment includes at least one client 61, a first server 62, and at least one second server 63. Wherein the client 61 establishes a communication connection with the first server 62, and the first server 62 also establishes a communication connection with the second server 63.
The client 41 is configured to send a service request instruction to the first server 42, where the service request instruction includes at least service function information and user information;
the second server 63 is used for subscribing to the subject of the first server 62;
the client 61 is configured to send a message related to a topic to the first server 62, where the message includes operation information;
the second server 63 is further configured to monitor the operation information received by the first server 62, and send request information to the first server 62;
the first server 62 transmits the operation information to the second server 63 according to the request information.
The present application further provides a server, and in particular, please refer to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of the server of the present application.
The server 700 is the first server 22 disclosed in the above embodiment, and the server 700 establishes communication connection with the client and the first server, respectively. As shown in fig. 7, the server 700 includes a transceiver module 71 and a processing module 72, wherein the transceiver module 71 establishes a connection with the processing module 72.
Wherein the processing module 72 is configured to set at least one theme.
The transceiver module 71 is configured to receive a message related to a topic sent by a client, where the message includes operation information.
The transceiver module 71 is further configured to receive the request information of the second server, and send the operation information to the second server according to the request information, where the second server successfully subscribes to the topic of the server 700.
The present application further provides another server, and specifically please refer to fig. 8, fig. 8 is a schematic structural diagram of another embodiment of the server of the present application.
The server 800 is the first server 22 disclosed in the above embodiment, and the server 700 establishes communication connection with the client and the first server, respectively. As shown in fig. 7, the server 700 includes a communicator 81 and a processor 82, wherein the communicator 81 establishes a connection with the processor 82.
Wherein the communicator 81 is configured to communicatively connect at least one client and at least one second server;
the processor 82 is configured to:
setting at least one theme;
receiving a message related to the theme sent by the client, wherein the message comprises operation information;
and receiving request information of the second server, and sending the operation information to the second server according to the request information, wherein the second server successfully subscribes to the theme of the first server.
In the present embodiment, the processor 82 may also be referred to as a CPU (Central Processing Unit ). The processor 82 may be an integrated circuit chip having signal processing capabilities. The processor 82 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The general purpose processor may be a microprocessor or the processor 82 may be any conventional processor or the like.
The present application also provides a computer storage medium, as shown in fig. 9, in which a computer storage medium 900 stores program data that can be executed to implement a method as described in the message processing method embodiments of the present application.
The methods referred to in the message processing method embodiments of the present application, when implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in the apparatus 900, for example, in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art, or in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the patent application, and all equivalent structures or equivalent processes using the descriptions and the contents of the present application or other related technical fields are included in the scope of the patent application.

Claims (9)

1. A message processing method, wherein the message processing method is applied to a message processing system, and the message processing system comprises at least one client, a first server and at least one second server; the client establishes communication connection with the first server, and the first server establishes communication connection with the second server;
the message processing method comprises the following steps:
the second server subscribes to the theme of the first server;
the client sends a message related to the theme to the first server, wherein the message comprises operation information;
when a plurality of the second servers monitor the operation information received by the first server,
a plurality of second servers send first request information to the first server;
the first server receives first request information of a plurality of second servers and sends authority information to one of the second servers according to a preset rule;
the second server sends second request information to the first server according to the authority information;
and the first server sends the operation information to one of the second servers according to the second request information.
2. The message processing method of claim 1, wherein the second server subscribes to the topic of the first server, further comprising:
the second server sends a subscription request to the first server, wherein the subscription request comprises topic information;
when the first server acquires a theme corresponding to the theme information according to the theme information, the first server generates subscription information and sends the subscription information to the second server;
the second server successfully subscribes to the theme of the first server according to the subscription information.
3. The message processing method according to claim 2, wherein the first server includes a database for storing subject information corresponding to the subject and the operation information;
and when the second server monitors the operation information received by the first server, the step of sending request information to the first server by the second server further comprises the following steps:
when the second server monitors the operation information of the database, the second server sends request information to the first server;
the step of the second server successfully subscribing to the topic of the first server according to the subscription information further comprises:
the second server successfully subscribes to the subject of the database according to the subscription information.
4. A message processing method according to claim 3, characterized in that the message processing method further comprises:
the first server periodically detects whether the state of the database is in a normal working state or not;
if not, the first server refreshes the database and recovers the subject information and the operation information in the database.
5. The message processing method according to claim 1, wherein after the step of the first server transmitting the operation information to the second server according to the request information, the message processing method further comprises:
and the second server executes the operation corresponding to the operation information according to the operation information.
6. A message processing system, comprising at least one client, a first server, and at least one second server; the client establishes communication connection with the first server, and the first server establishes communication connection with the second server;
the second server is used for subscribing to the theme of the first server;
the client is used for sending a message related to the theme to the first server, wherein the message comprises operation information;
the plurality of second servers are also used for monitoring the operation information received by the first server and sending first request information to the first server;
the first server is used for sending the authority information to one of the second servers according to the first request information and a preset rule;
the second server is used for sending second request information to the first server according to the authority information;
the first server is used for sending the operation information to one of the second servers according to the second request information.
7. A message processing method, wherein the message processing method is applied to a first server; the first server establishes communication connection with at least one client and at least one second server respectively;
the message processing method comprises the following steps:
the first server sets at least one theme;
the first server receives a message related to the theme sent by the client, wherein the message comprises operation information;
the first server receives first request information of a plurality of second servers, sends authority information to one of the second servers according to preset rules, receives second request information of the one of the second servers, and sends operation information to the one of the second servers according to the second request information, wherein the one of the second servers successfully subscribes to the theme of the first server.
8. A server comprising a communicator and a processor, wherein the communicator is coupled to the processor;
the communicator is used for connecting at least one client and at least one second server in a communication way;
the processor is configured to:
setting at least one theme;
receiving a message related to the theme sent by the client, wherein the message comprises operation information;
receiving first request information of a plurality of second servers, sending permission information to one of the second servers according to a preset rule according to the first request information, receiving the second request information of the one of the second servers, and sending the operation information to the one of the second servers according to the second request information, wherein the one of the second servers successfully subscribes to the theme of the server.
9. A computer storage medium storing program data executable to implement the message processing method of any one of claims 1 to 5 or claim 7.
CN201811103287.5A 2018-09-20 2018-09-20 Message processing method, message processing system, server and computer storage medium Active CN110928704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811103287.5A CN110928704B (en) 2018-09-20 2018-09-20 Message processing method, message processing system, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811103287.5A CN110928704B (en) 2018-09-20 2018-09-20 Message processing method, message processing system, server and computer storage medium

Publications (2)

Publication Number Publication Date
CN110928704A CN110928704A (en) 2020-03-27
CN110928704B true CN110928704B (en) 2023-06-23

Family

ID=69855585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811103287.5A Active CN110928704B (en) 2018-09-20 2018-09-20 Message processing method, message processing system, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN110928704B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711663A (en) * 2020-05-26 2020-09-25 北京金山云网络技术有限公司 Processing method and device for publishing and subscribing services and electronic equipment
CN112035231A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 Data processing system, method and server group
CN113315839B (en) * 2021-05-28 2023-05-02 武汉悦学帮网络技术有限公司 Message processing method, system, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079614A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Method and system for orderly obtaining messages of distributed publishing subscription system
CN106572146A (en) * 2015-10-13 2017-04-19 腾讯科技(深圳)有限公司 Message sending method and message sending device
CN107273224A (en) * 2017-06-15 2017-10-20 北京大生在线科技有限公司 Based on the message queue control system for subscribing to triggering

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7836123B2 (en) * 2008-05-13 2010-11-16 International Business Machines Corporation System and method for non-HTTP session based publish/subscribe support using pre-emptive subscriptions
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
KR101705279B1 (en) * 2010-06-01 2017-02-09 삼성전자 주식회사 Server and method for providing device management service and device to be provided the service
CN103685363A (en) * 2012-09-07 2014-03-26 中国科学院计算机网络信息中心 Efficient and reliable method and system for multitask processing
CN104811459A (en) * 2014-01-23 2015-07-29 阿里巴巴集团控股有限公司 Processing method, processing device and system for message services and message service system
CN104092767B (en) * 2014-07-21 2017-06-13 北京邮电大学 A kind of publish/subscribe system and its method of work for increasing message queue model
US20160210313A1 (en) * 2015-01-16 2016-07-21 Futurewei Technologies, Inc. System for high-throughput handling of transactions in a data-partitioned, distributed, relational database management system
CN107872473B (en) * 2016-09-23 2021-01-19 阿里巴巴集团控股有限公司 Message processing method, device and system
CN106953901B (en) * 2017-03-10 2020-04-07 重庆邮电大学 Cluster communication system and method for improving message transmission performance
CN108494815A (en) * 2018-02-06 2018-09-04 北京极智感科技有限公司 A kind of method and system of transmission message

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104079614A (en) * 2013-03-29 2014-10-01 国际商业机器公司 Method and system for orderly obtaining messages of distributed publishing subscription system
CN106572146A (en) * 2015-10-13 2017-04-19 腾讯科技(深圳)有限公司 Message sending method and message sending device
CN107273224A (en) * 2017-06-15 2017-10-20 北京大生在线科技有限公司 Based on the message queue control system for subscribing to triggering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Dimitris Dedousis等.On the Fly Load Balancing to Address Hot Topics in Topic-Based Pub/Sub Systems.《2018 IEEE 38th International Conference on Distributed Computing Systems (ICDCS)》.2018,第76-86页. *
李政等.基于分布式消息队列的企业级全文检索模型研究.《计算机应用与软件》.2017,第34卷(第6期),第292-295页. *

Also Published As

Publication number Publication date
CN110928704A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN108449410B (en) Message management method, system and related device in cloud platform
CN110928704B (en) Message processing method, message processing system, server and computer storage medium
US8015249B2 (en) Mitigating data usage in messaging applications
CN105338086A (en) Distributed message forwarding method
US7870425B2 (en) De-centralized nodal failover handling
WO2020259354A1 (en) Queue adjustment method, apparatus and device, and computer-readable storage medium
CN113285884B (en) Flow control method and system
CN110719311B (en) Distributed coordination service method, system and computer readable storage medium
CN110968603B (en) Data access method and device
CN104506584A (en) Request processing method and request processing device
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN111541762B (en) Data processing method, management server, device and storage medium
CN112069266A (en) Data synchronization method and service node
CN114844809A (en) Multi-factor arbitration method and device based on network heartbeat and kernel disk heartbeat
CN105830029B (en) system and method for supporting adaptive busy-wait in a computing environment
CN102970355A (en) Management of capacity in data center through suspended state of renter
CN111427689B (en) Cluster keep-alive method and device and storage medium
CN112631756A (en) Distributed regulation and control method and device applied to space flight measurement and control software
CN111835809B (en) Work order message distribution method, work order message distribution device, server and storage medium
CN116455830A (en) Method for realizing high-availability distributed QOS of storage gateway
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
CN115190052A (en) Long connection management method, system and control unit
CN111367932B (en) Database form change notification method, device, computer equipment and storage medium
CN114827171A (en) Information synchronization method and device, computer equipment and storage medium
CN113190624A (en) Asynchronous-to-synchronous calling method and device based on distributed cross-container

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