CN103370917B - Message treatment method and server - Google Patents

Message treatment method and server Download PDF

Info

Publication number
CN103370917B
CN103370917B CN201280003447.3A CN201280003447A CN103370917B CN 103370917 B CN103370917 B CN 103370917B CN 201280003447 A CN201280003447 A CN 201280003447A CN 103370917 B CN103370917 B CN 103370917B
Authority
CN
China
Prior art keywords
action events
buffered
server
message
request message
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
CN201280003447.3A
Other languages
Chinese (zh)
Other versions
CN103370917A (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103370917A publication Critical patent/CN103370917A/en
Application granted granted Critical
Publication of CN103370917B publication Critical patent/CN103370917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

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

Abstract

The embodiment of the present invention provides a kind of message treatment method and server.Message treatment method comprises: the first request message that server receives client sends; According to the attribute information of the first request message, determine the first Action Events that the first request message is corresponding; The first Action Events is performed if started, first request message is buffered in the first buffered message queue, first buffered message queue is used for the different request messages that buffer memory different clients sends, and server needs to perform the first identical Action Events for the different request messages that the different clients in the first buffered message queue sends; When server is finished the first Action Events, server sends the response message of the first Action Events to each client that the different request messages in the first buffered message queue are corresponding, decrease the expense of server process same operation event, improve the treatment effeciency of server.

Description

Message treatment method and server
Technical field
The embodiment of the present invention relates to the Internet (IntemetTechnology is called for short IT) technology, particularly relates to a kind of message treatment method and server.
Background technology
Usually comprise two class communication entities in IT system, a class is client, and a class is server, and server is generally multiple client and provides service, is connected between client and server by messaging.
Under normal circumstances, client sporadically sends message to server, performs corresponding operation to make server according to this message; Correspondingly, server, after the message receiving client, can process message content, again result be returned to corresponding client after completing the process to message content.When a large amount of client sends message to server simultaneously, server will process the message of these clients simultaneously one by one, cause the expense of server very large, thus affect the Message Processing efficiency of server, even may occur the problem of the message that cannot accept new client.
Summary of the invention
The embodiment of the present invention provides a kind of message treatment method and server, with the settlement server problem that expense is larger when processing the message of a large amount of client.
Embodiment of the present invention first aspect provides a kind of message treatment method, comprising:
The first request message that server receives client sends;
Described server, according to the attribute information of described first request message, determines the first Action Events that described first request message is corresponding;
Described server determines self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and described server needs to perform identical described first Action Events for the different request messages that the different clients in described first buffered message queue sends;
When described server is finished described first Action Events, described server sends the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
In the first possible implementation of first aspect, described server, according to the attribute information of described first request message, is determined to comprise the first Action Events that described first request message is corresponding:
Described server, according to one of any or its combination in any in the operand of described first request message, content of operation or operating result, determines the first Action Events corresponding to described first request message.
In the implementation that the second of first aspect is possible, if described server is determined self not start to perform described first Action Events, described method also comprises:
Start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
In conjunction with arbitrary possible implementation in the implementation that the second of the first possible implementation of first aspect, first aspect, first aspect is possible, in the implementation that the third is possible, described server also comprises before described first request message is buffered in the first buffered message queue:
Described server determines whether described first Action Events is preset merging treatment event, if so, performs the described step described first request message being buffered in the first buffered message queue; If not, described server starts described first Action Events of execution for described first request message.
In conjunction with the implementation that the third is possible, in the 4th kind of possible implementation, described preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency.
In conjunction with the 4th kind of possible implementation, in the 5th kind of possible implementation, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
In conjunction with arbitrary possible implementation in the possible implementation of the second of the first possible implementation of first aspect, first aspect, first aspect, the third possible implementation, in implementation possible in the 6th, the described all clients corresponding to all request messages in described first buffered message queue also comprise after sending the response message of described first Action Events:
Delete described first buffered message queue.
Embodiment of the present invention second aspect provides a kind of server, comprising:
Receiver module, for receiving the first request message that client sends;
Determination module, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding;
Processing module, self whether start to perform described first Action Events for determining, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events;
Sending module, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
In the first possible implementation of second aspect, described determination module, specifically for one of any or its combination in any in the operand according to described first request message, content of operation or operating result, determine the first Action Events corresponding to described first request message.
In the implementation that the second of second aspect is possible, described processing module, also for after determining self not start to perform described first Action Events, start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
In conjunction with arbitrary possible implementation in the implementation that the second of the first possible implementation of second aspect, second aspect, second aspect is possible, in the implementation that the third is possible, also comprise:
Pretreatment module, for determining whether described first Action Events is preset merging treatment event, if so, then described processing module performs the described step described first request message being buffered in the first buffered message queue; If not, then described processing module starts described first Action Events of execution for described first request message.
In conjunction with the implementation that the third is possible, in the 4th kind of possible implementation, described preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency.
In conjunction with the 4th kind of possible implementation, in the 5th kind of possible implementation, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
In conjunction with in arbitrary possible implementation, implementation possible in the 6th in the possible implementation of the second of the first possible implementation of second aspect, second aspect, second aspect, the third possible implementation, also comprise:
Removing module, after sending the response message of described first Action Events, deletes described first buffered message queue for all clients corresponding to all request messages in described first buffered message queue at described sending module.
The embodiment of the present invention third aspect provides a kind of server, comprising:
Receiver, for receiving the first request message that client sends;
Processor, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding; Determine self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events;
Transmitter, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
In the first possible implementation of the third aspect, described processor, specifically for one of any or its combination in any in the operand according to described first request message, content of operation or operating result, determine the first Action Events corresponding to described first request message.
In the implementation that the second of the third aspect is possible, described processor is also for after determining self not start to perform described first Action Events, start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
In conjunction with arbitrary possible implementation in the implementation that the second of the first possible implementation of the third aspect, the third aspect, the third aspect is possible, in the implementation that the third is possible, described processor is also for determining whether described first Action Events is preset merging treatment event, if so, the described step described first request message being buffered in the first buffered message queue is performed; If not, described first Action Events of execution is started for described first request message.
In conjunction with the implementation that the third is possible, in the 4th kind of possible implementation, described preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency.
In conjunction with the 4th kind of possible implementation, in the 5th kind of possible implementation, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
In conjunction with arbitrary possible implementation in the possible implementation of the second of the first possible implementation of the third aspect, the third aspect, the third aspect, the third possible implementation, in implementation possible in the 6th, described processor deletes described first buffered message queue after also sending the response message of described first Action Events for all clients corresponding to all request messages in described first buffered message queue at described transmitter.
Embodiment of the present invention fourth aspect provides a kind of server, comprising:
Processor, communication interface and memory;
Wherein, described communication interface, for receiving request message and the response message of output to client of client; Described processor, for executive program; Described memory, for depositing program;
Described program is used for the first request message of the client that received communication interface forwards, and according to the attribute information of described first request message, determines the first Action Events that described first request message is corresponding; Determine self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and described server needs to perform identical described first Action Events for the different request messages that the different clients in described first buffered message queue sends; When described server is finished described first Action Events, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
In the first possible implementation of fourth aspect, described program also for, self do not start if determine to perform described first Action Events, start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
In the implementation that the second of fourth aspect is possible, described program also for, according to one of any or its combination in any in the operand of described first request message, content of operation or operating result, determine the first Action Events corresponding to described first request message.
In conjunction with arbitrary possible implementation in the implementation that the second of the first possible implementation of fourth aspect, fourth aspect, fourth aspect is possible, in the implementation that the third is possible, described program also for, after determining self not start to perform described first Action Events, start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
In conjunction with the implementation that the third is possible, in the 4th kind of possible implementation, described program also for, determine whether described first Action Events is preset merging treatment event, if so, the described step described first request message being buffered in the first buffered message queue is performed; If not, described first Action Events of execution is started for described first request message.
In conjunction with the 4th kind of possible implementation, in the 5th kind of possible implementation, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
In conjunction with arbitrary possible implementation in the possible implementation of the second of the first possible implementation of fourth aspect, fourth aspect, fourth aspect, the third possible implementation, in implementation possible in the 6th, described program deletes described first buffered message queue after also sending the response message of described first Action Events for all clients corresponding to all request messages in described first buffered message queue in described communication interface.
The message treatment method of the embodiment of the present invention and server, by performing to the first Action Events corresponding with the first request message the response message processing and obtain this first Action Events, this response message is sent to each client that the different request messages deposited in the first buffered message queue needing the different request messages performing the first identical Action Events are corresponding, therefore, server is for first Action Events corresponding with multiple client, only single treatment need be performed, thus decrease the expense of server process same operation event, improve the treatment effeciency of server, server is received and processes the message of more multi-client.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of message treatment method embodiment one of the present invention;
Fig. 2 is the flow chart of message treatment method embodiment two of the present invention;
Fig. 3 is the structural representation of server example one of the present invention;
Fig. 4 is the structural representation of server example two of the present invention;
Fig. 5 is the structural representation of server example three of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, although, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the flow chart of message treatment method embodiment one of the present invention, and as shown in Figure 1, the message treatment method of the present embodiment can comprise:
101, the first request message of server receives client transmission.
Particularly, server can receive the request message that at least one client sends to it, and this first request message is one of request message of server reception.
Be understandable that, this first request message is can the request message of any one occurrence of client-requested server process.
102, server is according to the attribute information of the first request message, determines the first Action Events that the first request message is corresponding.
Particularly, server can determine according to the attribute information comprised in this first request message that namely the operation that this first request message requests server performs determines the first Action Events.
Wherein, this attribute information can be such as the content of operation and operand that comprise in this first request message.
For example, if the operand that this first request message comprises is server info list, content of operation is inquiry, can determine that this first request message requests server performs " querying server information list " operation according to this operand and content of operation, namely the first Action Events is " querying server information list ".
103, server determines self whether to have started to perform the first Action Events.
Particularly, such as server can determine whether comprise the Action Events identical with this first Action Events in the current operation performed by modes such as the maintenance lists of inquiry self.
If 104 have started to perform the first Action Events, first request message is buffered in the first buffered message queue, first buffered message queue is used for the different request messages that buffer memory different clients sends, and server needs to perform the first identical Action Events for the different request messages that the different clients in the first buffered message queue sends.
Particularly, the process existed in the current operation processed this first Action Events if determined by querying server, this first request message is put into the first buffered message queue waiting for server to the result of the first Action Events that it is asked by server, this the first buffered message queue is the buffer zone of Servers installed, to perform the different request messages of the first identical Action Events for depositing different clients to this server of request that this server sends.Namely from server starts to perform this first Action Events, execute this first Action Events only to server, period all request servers of receiving of server request message of performing this first Action Events all put into this first buffered message queue waiting for server to the result of this first Action Events.
105, when server is finished the first Action Events, server sends the response message of the first Action Events to each client that the different request messages in the first buffered message queue are corresponding.
Particularly, after server process this first Action Events complete, from this first buffered message queue, obtain at least one corresponding client identification of at least one request message of this first buffered message queue for storing, and the response message of this first Action Events is sent to the corresponding client with this at least one client identification.
The message treatment method of the present embodiment, by performing to the first Action Events corresponding with the first request message the response message processing and obtain this first Action Events, this response message is sent to each client that the different request messages deposited in the first buffered message queue needing the different request messages performing the first identical Action Events are corresponding, therefore, server is for first Action Events corresponding with multiple client, only single treatment need be performed, thus decrease the expense of server process same operation event, improve the treatment effeciency of server, server is received and processes the message of more multi-client.
Further, if server is determined self not start to perform the first Action Events, start execution first Action Events, and create the first buffered message queue corresponding to the first Action Events.
Particularly, server such as can according to one of any or its combination in any in the operand of the first request message, content of operation or operating result, determine the first Action Events corresponding to the first request message, if server does not start to perform according to Action Events i.e. the first Action Events that this attribute information is determined, this startup of server performs this first Action Events, and creates a queue i.e. the first buffered message queue and deposit this first request message.
Further, before described first request message is buffered in the first buffered message queue by described server, described server can also determine whether described first Action Events is preset merging treatment event, if so, the described step described first request message being buffered in the first buffered message queue is performed; If not, described server starts described first Action Events of execution for described first request message.
Particularly, before first request message is buffered in the first buffered message queue by this server, can also determine whether first Action Events corresponding with the first request message is preset merging treatment event by searching corresponding recorded information, this preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency.
For example, the operational processes event of this increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
If the first Action Events is preset merging treatment event, then this first request message is buffered in the first buffered message queue, if the first Action Events is not preset merging treatment event, server can start this first Action Events of execution for this first request message.
Particularly, such as " inquiry A server " event is preset merging treatment event, " inquiry active user quantity " event is preset unconsolidated process event, if server knows with the Action Events corresponding to this request message to be " inquiring about A server " event according to the attribute information of the request message received, then this request message is buffered in the buffer queue needing to perform " inquiry A server " event, if server knows with the Action Events corresponding to this request message to be " inquiring about active user's quantity " event according to the attribute information of the request message received, server then performs this " inquiry active user quantity " event, like this, server is by judging whether the request received is preset merging treatment event, request message request server being performed preset merging treatment event carries out buffer memory, request message request server being performed non-preset merging treatment event directly processes, improve the treatment effeciency of server, the compatibility with existing server can also be improved, handled easily.
Further, on the basis of above-described embodiment, after all clients that all request messages in described first buffered message queue are corresponding send the response message of described first Action Events, also comprise: delete described first buffered message queue.
Particularly, server is to after all clients that all request messages in the first buffered message queue are corresponding send the response message of this first Action Events, this the first buffered message queue can also be deleted, with avoid having the first new request message to put into after the response message sending this first Action Events response that this first Action Events is waited in this first buffered message queue.
Fig. 2 is the flow chart of message treatment method embodiment two of the present invention, in order to describe the message treatment method of the embodiment of the present invention in detail, please refer to Fig. 2, Fig. 2 is that example makes an explanation to message treatment method with HTTP (Hypertexttransferprotocol is called for short http) service end process http client to its request message sent.
201, request message is received.
In 201, the interacting message module of http service end receives the request message that http client sends to it, and this http client can be multiple.
202, message managing module is sent a request message to.
In 202, the interacting message module of http service end http client is sent request message " gethttp: // 10.122.101.43:8080/hwm/server? name=name1 " be sent to the message managing module of http service end.
203, request message is put into message queue.
In 203, by the attribute of this request message, message managing module knows that this request message is query manipulation event, the attribute of this request message is Query Name is http: // the 10.122.101.43:8080/hwm/server of name1, http service end is by judging to know that this query manipulation event is preset merging treatment event, message managing module can also determine whether the processing module of http service end has started to perform " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event of this request message requests, if not this operation in the current Action Events performed of processing module, the newly-built message queue of message managing module deposits this request message, if message managing module determines there is this operation in the current Action Events performed of the processing module of this http service end, this request message is put into the message queue corresponding to this message, and the request http service end having different http clients to send deposited in this message queue performs the message of " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event.
204, notification message processing module process request message.
Message managing module notification message processing module processes first request message putting into newly-built message queue, and message managing module can also process by the request message to newly-built message queue medium priority the highest grade of notification message processing module.
205, request message is processed.
Message processing module processes " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event.
206, request message result is returned.
The response processing " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event is informed to message managing module by processing module.
207, client-side information is obtained.
Message managing module obtains the client-side information of all request messages to the message queue depositing request http service end execution " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event.
208, notification message interactive module returns request results.
Message managing module notification message interactive module to obtain all client return messages processing modules to the response message of " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event.
209, request results is returned.
Interacting message module returns above-mentioned response message to above-mentioned all clients.
Further, message managing module can also delete the message queue depositing the request message corresponding with " Query Name is the http of name1: // 10.122.101.43:8080/hwm/server " query manipulation event in interacting message module after above-mentioned all clients return above-mentioned response message.
In addition, the message treatment method of the embodiment of the present invention can also be applied to transmission control protocol/User Datagram Protoco (UDP) (TransmissionControlProtocol/UserDatagramProtocol, be called for short tcp/udp) message that sends to it of service end process tcp/udp client, implementation and beneficial effect and above-mentioned message treatment method embodiment two similar, see above-mentioned message treatment method embodiment two, can repeat no more herein.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that program command is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Fig. 3 is the structural representation of server example one of the present invention, as shown in Figure 3, the server of the present embodiment comprises: receiver module 301, determination module 302, processing module 303 and sending module 304, wherein, receiver module 301, for receiving the first request message that client sends; Determination module 302, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding; Processing module 303, self whether start to perform described first Action Events for determining, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events; Sending module 304, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
The server of the present embodiment, may be used for the technical scheme performing message treatment method embodiment one, it realizes principle and technique effect is similar, repeats no more herein.
On the basis of above-described embodiment, further, processing module 303, also for after determining self not start to perform described first Action Events, starts and performs described first Action Events, and create the first buffered message queue corresponding to described first Action Events
Further, described determination module 302 can also be used for one of any or its combination in any in operand, content of operation or the operating result according to described first request message particularly, determines the first Action Events corresponding to described first request message.
Further, the server of the embodiment of the present invention can also comprise pretreatment module, pretreatment module, before described first request message being buffered in the first buffered message queue in described processing module 303, determine whether described first Action Events is preset merging treatment event, if so, then described processing module 303 performs the described step described first request message being buffered in the first buffered message queue; If not, then described processing module 303 starts described first Action Events of execution for described first request message.
Particularly, pretreatment module is before the first request message is buffered in the first buffered message queue by described processing module 303, determine whether first Action Events corresponding with the first request message is preset merging treatment event by searching corresponding recorded information, described preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events: increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
Further, on the basis of above-described embodiment, the server of the embodiment of the present invention can also comprise removing module, removing module is used for, after all clients that described sending module 304 is corresponding to all request messages in described first buffered message queue send the response message of described first Action Events, deleting described first buffered message queue.
Fig. 4 is the structural representation of server example two of the present invention, and as shown in Figure 4, the server of the present embodiment comprises: receiver 401 and processor 402 and transmitter 403, and wherein, receiver 401, for receiving the first request message that client sends; Processor 402, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding; Determine self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events; Transmitter 403, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
The server of the present embodiment, may be used for the technical scheme performing message treatment method embodiment one, it realizes principle and technique effect is similar, repeats no more herein.
Further, described processor 402 can also be used for after determining self not start to perform described first Action Events, starts and performs described first Action Events, and creates the first buffered message queue corresponding to described first Action Events.
Further, if described processor 402 self not starting to perform described first Action Events specifically for determining, starting and performing described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
Further, described processor 402 can also be used for determining whether described first Action Events is preset merging treatment event, if so, performs the described step described first request message being buffered in the first buffered message queue; If not, described first Action Events of execution is started for described first request message.
Particularly, before first request message is buffered in the first buffered message queue by described processor 402, determine whether first Action Events corresponding with the first request message is preset merging treatment event by searching corresponding recorded information, described preset merging treatment event includes but not limited to the operational processes event increasing server CPU processing time and efficiency, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events: increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
Further, described processor 402 can also be used for, after all clients that described transmitter is corresponding to all request messages in described first buffered message queue send the response message of described first Action Events, deleting described first buffered message queue.
Fig. 5 is the structural representation of server example three of the present invention, and as shown in Figure 5, this server 500 comprises:
Processor (processor) 510, communication interface (CommunicationsInterface) 520, memory (memory) 530 and bus 540; Wherein, described processor 510, described communication interface 520 complete mutual communicating with described memory 530 by described bus 540.
Described communication interface 520, for receiving request message and the response message of output to client of client.
Described processor 510, for executive program 511.
Described memory 530, for depositing program 511.
Concrete, described program 511 can comprise program code, and described program code comprises computer-managed instruction.
Processor 510 may be a central processing unit (CPU), or specific integrated circuit ASIC (ApplicationSpecificIntegratedCircuit), or be configured to the one or more integrated circuits implementing the embodiment of the present invention.
Memory 530 is for depositing program 511.Memory 530 may comprise high-speed RAM memory, still may comprise nonvolatile memory (non-volatilememory), such as at least one magnetic disc store.Program 511 specifically can comprise one section of code.
First request message of the client that program 511 forwards for received communication interface, according to the attribute information of described first request message, determines the first Action Events that described first request message is corresponding; Determine self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and described server needs to perform identical described first Action Events for the different request messages that the different clients in described first buffered message queue sends; When described server is finished described first Action Events, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding.
Further, program 511 for, self do not start if determine to perform described first Action Events, start and perform described first Action Events, and create and correspond to the first buffered message queue of described first Action Events.
Further, program 511 for, according to one of any or its combination in any in the operand of described first request message, content of operation or operating result, determine the first Action Events corresponding to described first request message.
Further, program 511 for, after determining self not start to perform described first Action Events, start and perform described first Action Events, and create and correspond to the first buffered message queue of described first Action Events.
Further, program 511 for, determine whether described first Action Events is preset merging treatment event, if so, perform the described step described first request message being buffered in the first buffered message queue; If not, described first Action Events of execution is started for described first request message.Described preset merging treatment event comprises: the operational processes event increasing server CPU processing time and efficiency.The operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events: increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
Further, program 511 for, after all clients that described communication interface is corresponding to all request messages in described first buffered message queue send the response message of described first Action Events, delete described first buffered message queue.
The server of the present embodiment, the first request message of client is received by communication interface, program pair first Action Events corresponding with the first request message deposited in processor execute store performs the response message processing and obtain this first Action Events, this response message is sent to by communication interface each client that the different request messages deposited in the first buffered message queue needing the different request messages performing the first identical Action Events are corresponding, therefore, server is for first Action Events corresponding with multiple client, only single treatment need be performed, thus decrease the expense of server process same operation event, improve the treatment effeciency of server, server is received and processes the message of more multi-client.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (15)

1. a message treatment method, is characterized in that, comprising:
The first request message that server receives client sends;
Described server, according to the attribute information of described first request message, determines the first Action Events that described first request message is corresponding;
Described server determines self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and described server needs to perform identical described first Action Events for the different request messages that the different clients in described first buffered message queue sends;
When described server is finished described first Action Events, described server sends the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding;
Before described first request message is buffered in the first buffered message queue by described server, also comprise: described server determines whether described first Action Events is preset merging treatment event, if so, the described step described first request message being buffered in the first buffered message queue is performed; If not, described server starts described first Action Events of execution for described first request message;
Described preset merging treatment event comprises: the operational processes event increasing server CPU processing time and efficiency.
2. method according to claim 1, is characterized in that, described server, according to the attribute information of described first request message, is determined to comprise the first Action Events that described first request message is corresponding:
Described server, according to one of any or its combination in any in the operand of described first request message, content of operation or operating result, determines the first Action Events corresponding to described first request message.
3. method according to claim 1, is characterized in that, if described server is determined self not start to perform described first Action Events, described method also comprises:
Start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
4. method according to claim 1, is characterized in that, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
5. the method according to any one of claims 1 to 3, is characterized in that, the described all clients corresponding to all request messages in described first buffered message queue also comprise after sending the response message of described first Action Events:
Delete described first buffered message queue.
6. a server, is characterized in that, comprising:
Receiver module, for receiving the first request message that client sends;
Determination module, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding;
Processing module, self whether start to perform described first Action Events for determining, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events;
Sending module, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding;
Also comprise pretreatment module, for determining whether described first Action Events is preset merging treatment event, if so, then described processing module performs the described step described first request message being buffered in the first buffered message queue; If not, then described processing module starts described first Action Events of execution for described first request message;
Described preset merging treatment event comprises: the operational processes event increasing server CPU processing time and efficiency.
7. server according to claim 6, it is characterized in that, described determination module, specifically for one of any or its combination in any in the operand according to described first request message, content of operation or operating result, determines the first Action Events corresponding to described first request message.
8. server according to claim 6, it is characterized in that, described processing module, also for after determining self not start to perform described first Action Events, start and perform described first Action Events, and create the first buffered message queue corresponding to described first Action Events.
9. server according to claim 6, is characterized in that, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
10. the server according to any one of claim 6 ~ 8, is characterized in that, also comprises:
Removing module, after sending the response message of described first Action Events, deletes described first buffered message queue for all clients corresponding to all request messages in described first buffered message queue at described sending module.
11. 1 kinds of servers, is characterized in that, comprising:
Receiver, for receiving the first request message that client sends;
Processor, for the attribute information according to described first request message, determines the first Action Events that described first request message is corresponding; Determine self whether to have started to perform described first Action Events, described first Action Events is performed if started, described first request message is buffered in the first buffered message queue, described first buffered message queue is used for the different request messages that buffer memory different clients sends, and the different request messages sent for the different clients in described first buffered message queue need to perform identical described first Action Events;
Transmitter, for when be finished described first Action Events time, send the response message of described first Action Events to each client that the different request messages in described first buffered message queue are corresponding;
Described processor also for determining whether described first Action Events is preset merging treatment event, if so, performs the described step described first request message being buffered in the first buffered message queue; If not, described first Action Events of execution is started for described first request message;
Described preset merging treatment event comprises: the operational processes event increasing server CPU processing time and efficiency.
12. servers according to claim 11, it is characterized in that, described processor, specifically for one of any or its combination in any in the operand according to described first request message, content of operation or operating result, determines the first Action Events corresponding to described first request message.
13. servers according to claim 11, it is characterized in that, described processor, also for after determining self not start to perform described first Action Events, starts and performs described first Action Events, and creates the first buffered message queue corresponding to described first Action Events.
14. servers according to claim 11, is characterized in that, the operational processes event of described increase server CPU processing time and efficiency comprises at least one in following Action Events:
Increase operation, creation operation, deletion action, retouching operation, query manipulation, reboot operation, backup operation, start-up operation, shut-down operation.
15. servers according to any one of claim 11 ~ 13, it is characterized in that, described processor deletes described first buffered message queue after also sending the response message of described first Action Events for all clients corresponding to all request messages in described first buffered message queue at described transmitter.
CN201280003447.3A 2012-11-20 2012-11-20 Message treatment method and server Active CN103370917B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/084897 WO2014078989A1 (en) 2012-11-20 2012-11-20 Message processing method and server

Publications (2)

Publication Number Publication Date
CN103370917A CN103370917A (en) 2013-10-23
CN103370917B true CN103370917B (en) 2016-03-02

Family

ID=49370150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201280003447.3A Active CN103370917B (en) 2012-11-20 2012-11-20 Message treatment method and server

Country Status (2)

Country Link
CN (1) CN103370917B (en)
WO (1) WO2014078989A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677844B (en) * 2013-12-20 2017-02-01 国云科技股份有限公司 Lightweight class data processing method based on message chain
CN105656853B (en) * 2014-11-14 2018-11-20 华为技术有限公司 A kind of message delivery method and relevant apparatus
CN104618517B (en) * 2015-03-05 2018-08-07 国家电网公司 A kind of method, system and device of PUSH message
CN104683731B (en) * 2015-03-20 2019-02-19 苏州科达科技股份有限公司 A kind of method and system for being communicated between heterogeneous platform
CN105049240B (en) * 2015-06-26 2018-08-21 大唐移动通信设备有限公司 A kind of message treatment method and server
CN108694075B (en) * 2017-04-12 2021-03-30 北京京东尚科信息技术有限公司 Method and device for processing report data, electronic equipment and readable storage medium
CN110020271A (en) * 2017-08-04 2019-07-16 北京京东尚科信息技术有限公司 Method and system for cache management
CN107592556B (en) * 2017-08-08 2020-02-04 福建星网视易信息系统有限公司 Control information synthesis method based on mobile terminal, controlled terminal and mobile terminal
CN110505257A (en) * 2018-05-17 2019-11-26 北京国双科技有限公司 Request message processing method and processing device
CN111917617B (en) * 2020-07-31 2022-03-29 宁波奥克斯电气股份有限公司 Intelligent household electrical appliance control method and device, server and storage medium
CN112199215B (en) * 2020-10-13 2024-01-19 恒生电子股份有限公司 Message processing method, device, equipment and storage medium
CN114598894A (en) * 2020-12-03 2022-06-07 北京字节跳动网络技术有限公司 Interactive message processing method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447981A (en) * 2008-04-03 2009-06-03 中兴通讯股份有限公司 Client-server interaction method based on LDAP protocol and system thereof
CN101998682A (en) * 2009-08-27 2011-03-30 中兴通讯股份有限公司 Device and method for acquiring service content by personal network equipment and related device thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7482164B2 (en) * 2006-07-14 2009-01-27 Exxonmobil Research And Engineering Company Rapid serial experimentation of catalysts and catalyst systems
US9009187B2 (en) * 2006-12-19 2015-04-14 Ianywhere Solutions, Inc. Assigning tasks to threads requiring limited resources using programmable queues
CN101639792B (en) * 2008-07-29 2016-04-06 阿里巴巴集团控股有限公司 A kind of concurrent data disposal route, device and a kind of electronic accounting system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447981A (en) * 2008-04-03 2009-06-03 中兴通讯股份有限公司 Client-server interaction method based on LDAP protocol and system thereof
CN101998682A (en) * 2009-08-27 2011-03-30 中兴通讯股份有限公司 Device and method for acquiring service content by personal network equipment and related device thereof

Also Published As

Publication number Publication date
CN103370917A (en) 2013-10-23
WO2014078989A1 (en) 2014-05-30

Similar Documents

Publication Publication Date Title
CN103370917B (en) Message treatment method and server
US10735345B2 (en) Orchestrating computing resources between different computing environments
US9729488B2 (en) On-demand mailbox synchronization and migration system
CN111970315A (en) Method, device and system for pushing message
CN112788074B (en) Data transmitting method, processing method, receiving method, apparatus thereof, and storage medium
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
KR101416280B1 (en) Event handling system and method
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN113517985B (en) File data processing method and device, electronic equipment and computer readable medium
CN111427701A (en) Workflow engine system and business processing method
CN105516086A (en) Service processing method and apparatus
CN112118352A (en) Method and device for processing notification trigger message
US20120102168A1 (en) Communication And Coordination Between Web Services In A Cloud-Based Computing Environment
CN113742389A (en) Service processing method and device
CN107483637B (en) NFS-based client link management method and device
US20160344806A1 (en) System and method for automatic migration of poller proxy services in a service bus environment
CN106899652B (en) Method and device for pushing service processing result
CN110149232B (en) Distributed storage block upgrading iscsi service method, system, device and storage medium
CN103795810A (en) Data distribution system and method and central server of data distribution system
CN110049065B (en) Attack defense method, device, medium and computing equipment of security gateway
CN113726885A (en) Method and device for adjusting flow quota
CN110764882B (en) Distributed management method, distributed management system and device
CN113765871A (en) Fortress management method and device
CN102724080B (en) Network management system and network management method
CN109388536B (en) Data collection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220215

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right