CN107770034A - A kind of message treatment method and device - Google Patents

A kind of message treatment method and device Download PDF

Info

Publication number
CN107770034A
CN107770034A CN201610675119.8A CN201610675119A CN107770034A CN 107770034 A CN107770034 A CN 107770034A CN 201610675119 A CN201610675119 A CN 201610675119A CN 107770034 A CN107770034 A CN 107770034A
Authority
CN
China
Prior art keywords
message
terminal
server
distributed
udp
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.)
Pending
Application number
CN201610675119.8A
Other languages
Chinese (zh)
Inventor
郭勐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications 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 China Mobile Communications Group Co Ltd, China Mobile Communications Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201610675119.8A priority Critical patent/CN107770034A/en
Publication of CN107770034A publication Critical patent/CN107770034A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements

Landscapes

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

Abstract

The application is related to communication service field and internet arena, more particularly to a kind of message treatment method and device, to solve the problems, such as that message efficiency of transmission present in prior art is low;The method that the embodiment of the present application provides includes:Server establishes terminal list;Wherein, the internet protocol address and port numbers of multiple terminal devices are included in the terminal list;The server receives the message to be distributed transmitted from transmission terminal based on UDP UDP;The server determines receiving terminal according to the terminal list of foundation, sends the message to be distributed to the receiving terminal based on UDP, the program can effectively improve message efficiency of transmission and ensure that the reliability that message transmission is carried out based on UDP.

Description

A kind of message treatment method and device
Technical field
The application is related to communication service field and internet arena, more particularly to a kind of message treatment method and device.
Background technology
Message queue is formed after message is added into queue according to the order of reception.As shown in figure 1, Virtual network operator Server is added into message queue after the message of the message producer (producer) transmission is received, meanwhile, according to team The sequencing of message sink takes out message and is sent to corresponding consumer (consumer) successively in row.
At present, the communication protocol that the transmission of message mainly uses includes HTTP (HyperText Transfer Protocol, HTTP) and transmission control protocol (Transmission Control Protocol, TCP).It is based on The reliability that HTTP and TCP carry out message transmission is higher, but this transmission means need to safeguard server and electronic equipment it Between long connection, can thus increase the load of server, cause the reduction of message efficiency of transmission, not be suitable for that real-time is high to disappear Breath transmission.
To sum up, there is the problem of message efficiency of transmission is relatively low in prior art.
The content of the invention
The embodiment of the present application provides a kind of message treatment method and device, message transmission effect be present to solve prior art The problem of rate is relatively low.
A kind of message treatment method that the embodiment of the present application provides, including:
Server establishes terminal list;Wherein, the Internet protocol IP of multiple terminal devices is included in the terminal list Address and port numbers;
The server receives the message to be distributed transmitted from transmission terminal based on UDP UDP;
The server determines receiving terminal according to the terminal list of foundation, is sent out based on UDP to the receiving terminal Send the message to be distributed.
A kind of message treatment method that another embodiment of the application provides, including:
Send terminal and be based on UDP UDP to server transmission registration request, so that the server is established Terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, the end are carried in the registration request End list is used for the IP address and port numbers for inquiring about the transmission terminal;
The message to be distributed is sent to server based on UDP.
A kind of message treatment method that the another embodiment of the application provides, including:
Receiving terminal is based on UDP UDP and sends registration request to server, so that the server is established Terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, the end are carried in the registration request End list is used for the IP address and port numbers for inquiring about the receiving terminal;
The subscription message is sent to server based on UDP.
A kind of message processing apparatus that the embodiment of the present application provides, including:
Module is established, for establishing terminal list;Wherein, the internet of multiple terminal devices is included in the terminal list Protocol IP address and port numbers;
Receiving module, for receiving the message to be distributed transmitted from transmission terminal based on UDP UDP;
Sending module, receiving terminal is determined for the terminal list according to foundation, based on UDP to the receiving terminal Send the message to be distributed.
A kind of message processing apparatus that another embodiment of the application provides, including:
Registering modules, for sending registration request to server based on UDP UDP, so as to the server Establish terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, institute are carried in the registration request State IP address and port numbers that terminal list is used to inquire about the transmission terminal;
Sending module, the message to be distributed is sent to server for UDP.
A kind of message processing apparatus that the another embodiment of the application provides, including:
Registering modules, for sending registration request to server based on UDP UDP, so as to the server Establish terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, institute are carried in the registration request State IP address and port numbers that terminal list is used to inquire about the receiving terminal;
Sending module, for sending the subscription message to server based on UDP.
In the embodiment of the present application, server realizes message transfer mechanism and terminal based on UDP by establishing terminal list Message transmission is carried out between equipment, improves the efficiency of message transmitting procedure.In addition, in the application preferred embodiment, lead to The characteristic information that message to be sent is set is crossed, server is selectively carried out Message Processing based on the characteristic information, for real-time Message, server are written into the position for being capable of priority treatment in message queue, priority treatment real-time messages, disappeared for important Breath, server will reply confirmation message to corresponding terminal device, the reliable of message transmission carried out based on UDP so as to improve Property.
Brief description of the drawings
Fig. 1 is typical message queue schematic diagram in the prior art;
Fig. 2 is the message treatment method flow chart that the embodiment of the present application one provides;
Fig. 3 is the message treatment method flow chart that the embodiment of the present application two provides;
Fig. 4 is the message treatment method flow chart that the embodiment of the present application three provides;
Fig. 5 is the message treatment method flow chart that the embodiment of the present application four provides;
Fig. 6 is the message processing apparatus structure chart that the embodiment of the present application five provides;
Fig. 7 is the message processing apparatus structure chart that the embodiment of the present application six provides;
Fig. 8 is the message processing apparatus structure chart that the embodiment of the present application seven provides.
Embodiment
The application applies the message transmission based on UDP (User Datagram Protocol, UDP) Mechanism.UDP is as one kind in open system interconnection (Open System Interconnection, OSI) reference model without even The transport layer protocol connect, the efficiency for carrying out message transmission are higher.
The application realizes that the UDP between server and terminal is transmitted by establishing terminal list in server, in addition, being Ensure to carry out the reliability of message transmission based on UDP between server and terminal, proposed in the application preferred embodiment A kind of server is based on the transmission that the characteristic information (including ageing feature and importance characteristic) selectively carries out Message Processing Mechanism.
The embodiment of the present application is described in further detail with reference to Figure of description.
Embodiment one
As shown in Fig. 2 the message treatment method flow chart provided for the embodiment of the present application one, comprises the following steps:
S201:Server establishes terminal list.
Here, the IP address and port numbers of multiple terminal devices are included in terminal list, wherein record has each terminal to set The information of the standby interaction between server, IP address and port numbers of any terminal equipment etc. can be inquired about using these information.
As shown in Table 1, a kind of terminal list is listed.The terminal list includes sequence number, Termination ID, terminal device IP address, port numbers, issue and the message subject of subscription message and the renewal time of terminal list.Wherein, sequence number is used to mark Remember the terminal device in terminal list, the corresponding terminal device of each sequence number;The IP address and port numbers of terminal device are used In it is determined that the terminal device that server is received and replied message.
Table one
The information included in the terminal device of serial number 1 is have recorded in the terminal list, its Termination ID is " hw46 ", IP The message subject that location is " 218.10.0.4 ", port numbers are " 6784 ", is given out information is " T1, T2, T3 ", the message for subscribing to message Theme is that " H1, H2, H3 ", the renewal time of terminal list are " 2016-09-07-12:34:56”.
S202:Server receives the message to be distributed transmitted from transmission terminal based on UDP.
Here, the characteristic information is carried in message to be distributed, the characteristic information includes ageing feature and importance is special Sign.And the ageing feature and importance characteristic in the characteristic information that message to be distributed carries can be set by application service side Fixed, or setting is consulted by application service side and Virtual network operator.
In specific implementation, server determines message to be distributed in message team according to the ageing feature of message to be distributed Position in row;According to position of the message to be distributed of determination in message queue, the message to be distributed is write into message queue In;And according to the importance characteristic of the message to be distributed, judge whether to need to carry out message back.
If message to be distributed is real-time messages, message to be distributed is write in message queue to the position for being capable of priority treatment Put, such as team's head of message queue, if message to be distributed is non-real-time messages, message to be distributed is write in message queue not By the tail of the queue of the position of priority treatment, such as message queue.Here, server meeting priority treatment is arranged in message queue squadron head Message.
If message to be distributed is important messages, server is needed to terminal replies confirmation message is sent, if to be distributed disappear Breath is non-important messages, then server need not be to transmission terminal replies confirmation message.
Based on this, server can just select in message processing procedure is carried out according to the characteristic information of message to be distributed To the processing mode of message.For real-time messages, server can be handled preferentially, and for important messages, server is to transmission Terminal replies confirmation message, the safe and complete arrival server of message to be distributed is learnt to send terminal, improves and is based on UDP carries out the reliability of message transmission.
S203:Server determines receiving terminal according to the terminal list of foundation, to be distributed to receiving terminal transmission based on UDP Message.
In specific implementation, server message subject matched in the terminal list according to where message to be distributed, The IP address and port numbers of corresponding receiving terminal are found, and message to be distributed is taken out from team's head of message queue, by this message It is sent to the receiving terminal to match.
Embodiment two
As shown in figure 3, the message treatment method flow chart provided for the embodiment of the present application two, comprises the following steps:
S301:Send terminal and be based on UDP to server transmission registration request, so that server establishes terminal list.
Here, the IP address and port numbers for sending terminal are carried in registration request, terminal list can be used for inquiring about transmission The IP address and port numbers of terminal.
Above-mentioned transmission terminal can be any terminal equipment, and any terminal equipment both can be to send terminal, also may be used It to be receiving terminal, namely can both give out information, message can also be received.
S302:Message to be distributed is sent to server based on UDP.
Here, the characteristic information is carried in message to be distributed, the characteristic information includes ageing feature and importance characteristic.
In specific implementation, send terminal can according to the importance characteristic of message to be sent come judge whether periodically to Server sends the message to be distributed.
If the message to be distributed is important messages, sends terminal periodic and send the message to be distributed to server, directly To the confirmation message for receiving server reply or until beyond time threshold corresponding to real-time messages (if message to be distributed is real When message, then message is effective in the time threshold);If message to be distributed is non-important messages, sends terminal and only send one The secondary message to be distributed.Here, if the message to be distributed is real-time messages, a time threshold can be set by sending terminal, entered During row Message Processing, if exceeding this time threshold, the message to be distributed is invalid message, and transmission terminal does not retransmit this and treated Dispatch messages.
Embodiment three
As shown in figure 4, the message treatment method flow chart provided for the embodiment of the present application three, comprises the following steps:
S401:Receiving terminal is based on UDP and sends registration request to server, so that the server establishes terminal list.
S402:The subscription message is sent to server based on UDP.
Here, the message subject that receiving terminal subscription is carried in message and the characteristic information for subscribing to message are subscribed to, is ordered Readding the characteristic information of message includes ageing feature and importance characteristic;
In specific implementation, server can according to the importance characteristic of subscription message received, judge whether to need to Receiving terminal carries out reply confirmation message.
The application thought is described further below by a detailed embodiment.
Example IV
As shown in figure 5, the message treatment method flow chart provided for the embodiment of the present application four, comprises the following steps:
S501A:Send terminal and registration request is sent to server based on UDP, the transmission is carried in the registration request The internet protocol address and port numbers of terminal.After server receives the registration request of the transmission terminal, sent out to terminal is sent Registration confirmation message is sent, wherein server is carried to send the identification information of terminal distribution, by the identification information, registration request In IP address and port numbers the write-in terminal list of the transmission terminal of middle carrying.Into S502A and S503A.
Here, enumerating a kind of form for the registration message for sending terminal to server transmission is:{ " type of message (type)”:" registration (register) ", " the characteristic information (feature) ":" non real-time and important (10) " are (here using two Binary number identifies the characteristic information, and high-order binary number identifies ageing feature, wherein 0 represents real-time messages, 1 represent it is non- Real-time messages, the binary number mark importance characteristic of low level, wherein 0 represents important messages, 1 represents insignificant message.), " disappear Breath numbering (rnumber) ":" 123456789 ", " message content (contents) ":{ " text 1 (text1) ":" b ", " text 2 (text2)”:" d ", " text 3 (text3) ":" f " }, " other (others) ":" hello world (hello world) " };
The form of registration confirmation message that corresponding server is replied is:{“type”:" succeeding in registration (registerok) ", “feature”:" 10 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" ab ", " text2 ":" dd ", “text3”:" ff " }, " response results (results) ":" success (ok) ", " id ":“hw46”}.
S502A:Send terminal and new information is sent to server based on UDP, new information includes the transmission terminal Identification information, IP address and port numbers.Server updates the mark with the transmission terminal in terminal list according to the new information IP address corresponding to information and port numbers.
Alternatively, send terminal and be based on UDP to server transmission new information, including:
The new information is sent to server with sending terminal periodic, until the confirmation for receiving server reply disappears Breath.
Enumerating a kind of form for the new information for sending terminal to server transmission is:{“type”:" renewal (update) ", " feature ":" non real-time and inessential (11) ", " rnumber ":" 123456789 ", " id ":" hw46 " }, Because the characteristic information of above-mentioned message is non real-time and insignificant, then server need not confirm to disappear to the transmission terminal replies Breath, only update IP address and port numbers corresponding with the identification information of the terminal device in terminal list.
Enumerating another form for sending terminal to the new information that server is sent is:{“type”:" update ", “feature”:" 10 ", " rnumber ":" 123456789 ", " id ":“hw46”};Because the characteristic information of above-mentioned message is non- It is real-time and important, then IP address corresponding with the identification information of the terminal device in the complete terminal list of server update and port Number, it is also necessary to the transmission terminal replies confirmation message, the form for the renewal confirmation message that the server is sent is: {“type”:" being updated successfully (updateok) ", " feature ":" 10 ", " rnumber ":" 123456789 ", " results ": " ok ", " id ":“hw46”}.
S503A:Send terminal and be based on UDP to server transmission message to be distributed;Carry and disappear in the message to be distributed Breath feature and message subject, the characteristic information include ageing feature and importance characteristic.
Enumerating a kind of form for sending terminal to server transmission message is:{“type”:" issue (messpub) ", “feature”:" 10 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", " text2 ":" d ", “text3”:" f " }, " message subject (topics) ":" computer (computer) ", " id ":“hw46”};Due to above-mentioned message The characteristic information is non real-time and important, then server is needed to the transmission terminal replies confirmation message, the confirmation message of issue Form is:{“type”:" issuing successfully (messpubok) ", " feature ":" 10 ", " rnumber ":" 123456789 ", “contents”:{“text1”:" ab ", " text2 ":" dd ", " text3 ":" ff " }, " topics ":" computer ", “results”:" ok ", " id ":“hw46”};
Enumerating another form for sending terminal to server transmission message is:{“type”:" subscribing to (messsub) ", “feature”:" 10 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", " text2 ":" d ", “text3”:" f " }, " topics ":" computer ", " id ":“hw46”};Because the characteristic information of above-mentioned message is non real-time And it is important, then server need be to the transmission terminal replies confirmation message, the form of the confirmation message of transmission:{“type”: " subscribing to successfully (messsubok) ", " feature ":" 10 ", " rnumber ":" 123456789 ", " contents ": {“text1”:" b ", " text2 ":" d ", " text3 ":" f " }, " topics ":" computer ", " results ":" ok ", “id”:“hw46”}。
S504B:Server determines the message to be distributed in message team according to the ageing feature of the message to be distributed Position in row;According to position of the message to be distributed of determination in message queue, the message write-in to be distributed is disappeared Cease in queue;And according to the importance characteristic of the message to be distributed, judge whether to need to carry out message back.
S505C:Receiving terminal is based on UDP and sends registration request to server, and the reception is carried in the registration request The internet protocol address and port numbers of terminal.After server receives the registration request of the receiving terminal, sent out to receiving terminal Registration confirmation message is sent, wherein the identification information that server is receiving terminal distribution is carried, by the identification information, registration request In IP address and port numbers the write-in terminal list of the receiving terminal of middle carrying.Into S506C and S507C.
S506C:Receiving terminal is based on UDP and sends new information to server, and new information includes the receiving terminal Identification information, IP address and port numbers.Server updates the mark with the receiving terminal in terminal list according to the new information IP address corresponding to information and port numbers.
S507C:Receiving terminal is based on UDP and sends the subscription message to server.Carried in the subscription message The message subject and the characteristic information for subscribing to message, the characteristic information for stating receiving terminal subscription include ageing feature And importance characteristic.
S508B:Server takes out message to be distributed, the query subscription message to be distributed from team's head of the message queue Message subject receiving terminal, the message to be distributed is sent to receiving terminal.
In specific implementation, server can judge whether to need periodically according to the importance characteristic of the message to be distributed Send the message to be distributed to receiving terminal, correspondingly, receiving terminal after the message to be distributed that server is sent is received, It can be determined the need for carrying out reply confirmation message to server according to the importance characteristic of the message to be distributed.
Here, enumerating a kind of form for sending terminal to server transmission message is:{“type”:" send (messsend) ", " feature ":" 11 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", “text2”:" d ", " text3 ":" f " }, " topics ":" computer ", " theme numbers (topicnumber) ":" 18 ", “id”:“hw46”};Because the characteristic information of above-mentioned message is non real-time and insignificant, then server need not be whole to the transmission Confirmation message is replied at end, according only to message subject matched in terminal list where this message, finds corresponding receive eventually The IP address and port numbers at end, send the message to the receiving terminal to match.The shape for the message that the server is sent Formula is:{“type”:" push (messpush) ", " feature ":" 11 ", " rnumber ":" 123456789 ", “contents”:{“text1”:" b ", " text2 ":" d ", " text3 ":" f " }, " topics ":" computer ", “topicnumber”:" 18 ", " id ":“hw46”}.
Enumerating another form for sending terminal to server transmission message is:{“type”:" messsend ", “feature”:" real-time and insignificant (01) ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", “text2”:" d ", " text3 ":" f " }, " topics ":" computer ", " topicnumber ":" 16 ", " id ":“hw46”}; Because the importance characteristic of the characteristic information of above-mentioned message is insignificant, then server need not confirm to the transmission terminal replies Message, and because its it is ageing be characterized as real-time, server writes the message on team's head of message queue.Then root Message subject matched in terminal list where message accordingly, the IP address and port numbers of corresponding receiving terminal are found, Send the message to the receiving terminal to match.The form for the message that the server is sent is:{“type”: " messpush ", " feature ":" 01 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", “text2”:" d ", " text3 ":" f " }, " topics ":" computer ", " topicnumber ":" 16 ", " id ":“hw46”}.
Enumerating another form for sending terminal to the message that server is sent is:{“type”:" messsend ", “feature”:" real-time and important (00) ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", “text2”:" d ", " text3 ":" f " }, " topics ":" computer ", " topicnumber ":" 10 ", " id ":“hw46”}; Because the importance characteristic of the characteristic information of above-mentioned message is important, then server needs to confirm to disappear to the transmission terminal replies Breath.Again because its it is ageing be characterized as real-time, server is by team's head of message write-in message queue.Then basis Matched message subject in terminal list where this message, the IP address and port numbers of corresponding receiving terminal are found, will The message is sent to the receiving terminal to match.The form for the message that the server is sent is:{“type”: " messpush ", " feature ":" 00 ", " rnumber ":" 123456789 ", " contents ":{“text1”:" b ", “text2”:" d ", " text3 ":" f " }, " topics ":" computer ", " topicnumber ":" 10 ", " id ":“hw46”}; Corresponding receiving terminal is after this message is received, it is necessary to reply confirmation message to server.It is possible to enumerate a kind of receiving terminal Reply confirmation message form be:{“type”:" pushing successfully (messpushok) ", " feature ":" 00 ", " rnumber ": " 123456789 ", " contents ":{“text1”:" b ", " text2 ":" d ", " text3 ":" f " }, " topics ": " computer ", " topicnumber ":" 10 ", " id ":" hw46 ", " results ":“ok”}.
In summary, by establishing terminal list in server, terminal device is realized based on UDP message transfer mechanism Message transmission between server, improve the efficiency of message transmitting procedure.In addition, server disappearing based on message to be distributed Breath feature discriminatively carries out Message Processing, i.e., for real-time messages, server, which is written into message queue, preferentially to be located The position of reason, priority treatment real-time messages, for important messages, server will reply confirmation message to corresponding terminal device, So as to ensure that the reliability that message transmission is carried out based on UDP.
Based on same inventive concept, Message Processing dress corresponding with message treatment method is additionally provided in the embodiment of the present application Put, because the principle of following device solution problem is similar to the message treatment method of the embodiment of the present application, therefore following device Implementation may refer to the implementation of method, repeats part and repeats no more.
Embodiment five
As shown in fig. 6, the message processing apparatus structure chart provided for the embodiment of the present application five, including:
Module 61 is established, for establishing terminal list;Wherein, the interconnection of multiple terminal devices is included in the terminal list FidonetFido IP address and port numbers;
Receiving module 62, for receiving the message to be distributed transmitted from transmission terminal based on UDP;
Sending module 63, receiving terminal is determined for the terminal list according to foundation, received eventually to described based on UDP End sends the message to be distributed.
Alternatively, the message to be distributed carries the characteristic information, and the characteristic information includes ageing feature and important Property feature;
Alternatively, described device also includes:
Ageing Treatment module 64, for the ageing feature according to the message to be distributed, determine the message to be distributed Position in message queue;According to position of the message to be distributed of determination in message queue, to be distributed disappear described In breath write-in message queue;
Message back processing module 65, for the importance characteristic according to the message to be distributed, judge whether to need into Row message back.
Alternatively, the Ageing Treatment module 64 is specifically used for:
If the message to be distributed is real-time messages, the message to be distributed is write to team's head of message queue, if institute It is non-real-time messages to state message to be distributed, then the message to be distributed is write to the tail of the queue of message queue;
Alternatively, the sending module 63 is additionally operable to:
Message to be distributed is taken out from team's head of the message queue, is sent to the reception end for subscribing to the message to be distributed End.
Alternatively, the module 61 of establishing is specifically used for:
Receive the registration request that any terminal equipment is sent based on UDP;
The internet protocol address of any terminal equipment carried in the registration request and port numbers are write In terminal list.
Alternatively, the module 61 of establishing is additionally operable to:
For any terminal equipment allocation identification information, the identification information of distribution, the IP address and port numbers are write Enter in terminal list;
Alternatively, described device also includes:
Update module 66, the new information sent for receiving any terminal equipment;The new information includes Identification information, IP address and the port numbers of any terminal equipment;
Update IP address and port numbers corresponding with the identification information of any terminal equipment in terminal list.
Alternatively, the receiving module 62 is additionally operable to:
Receive the subscription message that any receiving terminal is sent based on UDP;Described receive eventually is carried in the subscription message Hold the message subject subscribed to and the characteristic information for subscribing to message;
Alternatively, the sending module 63 is additionally operable to:
When taking out the message to be distributed for matching the message subject in the message queue, the message to be distributed is sent out Give the receiving terminal.
Embodiment six
As shown in fig. 7, the message processing apparatus structure chart provided for the embodiment of the present application six, including:
Registering modules 71, for sending registration request to server based on UDP UDP, so as to the service Device establishes terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal are carried in the registration request, The terminal list is used for the IP address and port numbers for inquiring about the transmission terminal;
Sending module 72, the message to be distributed is sent to server for UDP.
Alternatively, the message to be distributed carries the characteristic information, and the characteristic information includes ageing feature and important Property feature;
Alternatively, the sending module 72 is specifically used for:
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as real-time message, then institute State and send the message to be distributed to the server with sending terminal periodic, replied really until receiving the server Recognize message, or more than default time threshold;
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as non real-time nature message, then The message to be distributed is sent to the transmission terminal periodic to the server, until receiving the server reply Confirmation message.
Alternatively, the Registering modules 71 are specifically used for:
The registration request periodically is sent to the server, until the registration for receiving the server reply is true Recognize message.
Alternatively, described device also includes:
Receiving module 73, for receiving the registration confirmation message of the server transmission, wrapped in the registration confirmation message Identification information containing the transmission terminal;
Alternatively, the sending module 72 is additionally operable to:
New information is sent to server based on UDP, the new information includes the identification information of the transmission terminal, IP Address and port numbers.
Alternatively, the sending module 72 is specifically used for:
The new information periodically is sent to the server, the confirmation replied until receiving the server disappears Breath.
Embodiment seven
As shown in figure 8, the message processing apparatus structure chart provided for the embodiment of the present application seven, including:
Registering modules 81, for sending registration request to server based on UDP UDP, so as to the service Device establishes terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal are carried in the registration request, The terminal list is used for the IP address and port numbers for inquiring about the receiving terminal;
Sending module 82, for sending the subscription message to server based on UDP.
Alternatively, the message of subscribing to carries message subject that the receiving terminal subscribes to and the message of subscribing to The characteristic information, the characteristic information include ageing feature and importance characteristic.
Alternatively, Registering modules 81 are specifically used for:
The registration request periodically is sent to the server, until the registration for receiving the server reply is true Recognize message.
Alternatively, described device also includes:
Receiving module 83, for receiving the registration confirmation message of the server transmission, wrapped in the registration confirmation message Identification information containing the transmission terminal;
Alternatively, the sending module 82 is additionally operable to:
New information is sent to server based on UDP, the new information includes the identification information of the transmission terminal, IP Address and port numbers.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, the application can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the application can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The application is with reference to according to the method, apparatus (system) of the embodiment of the present application and the flow of computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent Select embodiment and fall into having altered and changing for the application scope.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the application to the application God and scope.So, if these modifications and variations of the application belong to the scope of the application claim and its equivalent technologies Within, then the application is also intended to comprising including these changes and modification.

Claims (30)

1. a kind of message treatment method, it is characterised in that this method includes:
Server establishes terminal list;Wherein, the internet protocol address of multiple terminal devices is included in the terminal list And port numbers;
The server receives the message to be distributed transmitted from transmission terminal based on UDP UDP;
The server determines receiving terminal according to the terminal list of foundation, and institute is sent to the receiving terminal based on UDP State message to be distributed.
2. the method as described in claim 1, it is characterised in that the message to be distributed carries the characteristic information, the message Feature includes ageing feature and importance characteristic;
It is described the message to be distributed is sent to the receiving terminal based on UDP before, in addition to:
According to the ageing feature of the message to be distributed, position of the message to be distributed in message queue is determined;According to Position of the message to be distributed determined in message queue, by the message write-in message queue to be distributed;And
According to the importance characteristic of the message to be distributed, judge whether to need to carry out message back.
3. method as claimed in claim 2, it is characterised in that according to the ageing feature of the message to be distributed, determine institute Position of the message to be distributed in message queue is stated, including:
If the message to be distributed is real-time messages, the message to be distributed is write to team's head of message queue, if described treat Dispatch messages are non-real-time messages, then the message to be distributed is write to the tail of the queue of message queue;
Methods described also includes:
The server takes out message to be distributed from team's head of the message queue, is sent to and subscribes to the message to be distributed Receiving terminal.
4. the method as described in claim 1, it is characterised in that server establishes terminal list, including:
The server receives the registration request that any terminal equipment is sent based on UDP;
By the internet protocol address of any terminal equipment carried in the registration request and port numbers write-in terminal In list.
5. method as claimed in claim 4, it is characterised in that server receives the note that any terminal equipment is sent based on UDP After volume request, in addition to:
For any terminal equipment allocation identification information, the identification information of distribution, the IP address and port numbers are write eventually Hold in list;
Methods described also includes:
The server receives the new information that any terminal equipment is sent;The new information includes any terminal Identification information, IP address and the port numbers of equipment;
Update IP address and port numbers corresponding with the identification information of any terminal equipment in terminal list.
6. the method as described in claim 1, it is characterised in that methods described also includes:
The server receives the subscription message that any receiving terminal is sent based on UDP;Carried in the subscription message described The message subject and the characteristic information for subscribing to message that receiving terminal is subscribed to;
When taking out the message to be distributed for matching the message subject in the message queue, the message to be distributed is sent to The receiving terminal.
7. a kind of message treatment method, it is characterised in that this method includes:
Send terminal and be based on UDP UDP to server transmission registration request, so that the server establishes terminal List;Wherein, the internet protocol address and port numbers of the transmission terminal, the terminal row are carried in the registration request Table is used for the IP address and port numbers for inquiring about the transmission terminal;
The message to be distributed is sent to server based on UDP.
8. method as claimed in claim 7, it is characterised in that the message to be distributed carries the characteristic information, the message Feature includes ageing feature and importance characteristic;
The transmission terminal is based on UDP and sends message to be distributed to server, including:
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as real-time message, then the hair End make arrangements for his funeral periodically to the server transmission message to be distributed, the confirmation replied until receiving the server disappears Breath, or more than default time threshold;
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as non real-time nature message, then it is described The message to be distributed is sent to the server with sending terminal periodic, the confirmation replied until receiving the server Message.
9. method as claimed in claim 7, it is characterised in that the transmission terminal is based on UDP please to server transmission registration Ask, including:
The registration request is sent to the transmission terminal periodic to the server, is replied until receiving the server Registration confirmation message.
10. method as claimed in claim 7, it is characterised in that the transmission terminal is based on UDP please to server transmission registration After asking, in addition to:
The registration confirmation message that the server is sent is received, the mark of the transmission terminal is included in the registration confirmation message Information;
Methods described also includes:
The transmission terminal is based on UDP and sends new information to server, and the new information includes the mark of the transmission terminal Know information, IP address and port numbers.
11. method as claimed in claim 10, it is characterised in that the transmission terminal is based on UDP and sends renewal to server Message, including:
The new information is sent to the transmission terminal periodic to the server, is replied until receiving the server Confirmation message.
12. a kind of message treatment method, it is characterised in that this method includes:
Receiving terminal is based on UDP UDP and sends registration request to server, so that the server establishes terminal List;Wherein, the internet protocol address and port numbers of the transmission terminal, the terminal row are carried in the registration request Table is used for the IP address and port numbers for inquiring about the receiving terminal;
The subscription message is sent to server based on UDP.
13. method as claimed in claim 12, it is characterised in that the message of subscribing to carries what the receiving terminal was subscribed to Message subject and the characteristic information for subscribing to message, the characteristic information include ageing feature and importance characteristic.
14. method as claimed in claim 12, it is characterised in that the receiving terminal is based on UDP and sends registration to server Request, including:
The receiving terminal periodically sends the registration request to the server, is replied until receiving the server Registration confirmation message.
15. method as claimed in claim 12, it is characterised in that the receiving terminal is based on UDP and sends registration to server After request, in addition to:
The registration confirmation message that the server is sent is received, the mark of the transmission terminal is included in the registration confirmation message Information;
Methods described also includes:
The receiving terminal is based on UDP and sends new information to server, and the new information includes the mark of the transmission terminal Know information, IP address and port numbers.
16. a kind of message processing apparatus, it is characterised in that the device includes:
Module is established, for establishing terminal list;Wherein, the Internet protocol of multiple terminal devices is included in the terminal list IP address and port numbers;
Receiving module, for receiving the message to be distributed transmitted from transmission terminal based on UDP UDP;
Sending module, receiving terminal is determined for the terminal list according to foundation, is sent based on UDP to the receiving terminal The message to be distributed.
17. device as claimed in claim 16, it is characterised in that the message to be distributed carries the characteristic information, described to disappear Breath feature includes ageing feature and importance characteristic;
Described device also includes:
Ageing Treatment module, for the ageing feature according to the message to be distributed, determine the message to be distributed in message Position in queue;According to position of the message to be distributed of determination in message queue, the message to be distributed is write In message queue;
Message back processing module, for the importance characteristic according to the message to be distributed, judge whether to need to carry out message Reply.
18. device as claimed in claim 17, it is characterised in that the Ageing Treatment module is specifically used for:
If the message to be distributed is real-time messages, the message to be distributed is write to team's head of message queue, if described treat Dispatch messages are non-real-time messages, then the message to be distributed is write to the tail of the queue of message queue;
The sending module is specifically used for:
Message to be distributed is taken out from team's head of the message queue, is sent to the receiving terminal for subscribing to the message to be distributed.
19. device as claimed in claim 16, it is characterised in that the module of establishing is specifically used for:
Receive the registration request that any terminal equipment is sent based on UDP;
By the internet protocol address of any terminal equipment carried in the registration request and port numbers write-in terminal In list.
20. device as claimed in claim 19, it is characterised in that the module of establishing is additionally operable to:
For any terminal equipment allocation identification information, the identification information of distribution, the IP address and port numbers are write eventually Hold in list;
Described device also includes:
Update module, the new information sent for receiving any terminal equipment;It is any that the new information includes this Identification information, IP address and the port numbers of terminal device;
Update IP address and port numbers corresponding with the identification information of any terminal equipment in terminal list.
21. device as claimed in claim 16, it is characterised in that the receiving module is additionally operable to:
Receive the subscription message that any receiving terminal is sent based on UDP;The receiving terminal is carried in the subscription message to order The message subject and the characteristic information for subscribing to message read;
The sending module is additionally operable to:
When taking out the message to be distributed for matching the message subject in the message queue, the message to be distributed is sent to The receiving terminal.
22. a kind of message processing apparatus, it is characterised in that the device includes:
Registering modules, for sending registration request to server based on UDP UDP, so that the server is established Terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, the end are carried in the registration request End list is used for the IP address and port numbers for inquiring about the transmission terminal;
Sending module, the message to be distributed is sent to server for UDP.
23. device as claimed in claim 22, it is characterised in that the message to be distributed carries the characteristic information, described to disappear Breath feature includes ageing feature and importance characteristic;
The sending module is specifically used for:
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as real-time message, then the hair End make arrangements for his funeral periodically to the server transmission message to be distributed, the confirmation replied until receiving the server disappears Breath, or more than default time threshold;
If the importance characteristic of the message to be distributed is important messages, and it is ageing be characterized as non real-time nature message, then it is described The message to be distributed is sent to the server with sending terminal periodic, the confirmation replied until receiving the server Message.
24. device as claimed in claim 22, it is characterised in that the Registering modules are specifically used for:
The registration request periodically is sent to the server, the accreditation verification replied until receiving the server disappears Breath.
25. device as claimed in claim 22, described device also include:
Receiving module, for receiving the registration confirmation message of the server transmission, included in the registration confirmation message described Send the identification information of terminal;
The sending module is additionally operable to:
New information is sent to server based on UDP, the new information includes the identification information of the transmission terminal, IP address And port numbers.
26. device as claimed in claim 25, it is characterised in that the sending module is specifically used for:
The new information periodically is sent to the server, the confirmation message replied until receiving the server.
27. a kind of message processing apparatus, it is characterised in that the device includes:
Registering modules, for sending registration request to server based on UDP UDP, so that the server is established Terminal list;Wherein, the internet protocol address and port numbers of the transmission terminal, the end are carried in the registration request End list is used for the IP address and port numbers for inquiring about the receiving terminal;
Sending module, for sending the subscription message to server based on UDP.
28. device as claimed in claim 27, it is characterised in that the message of subscribing to carries what the receiving terminal was subscribed to Message subject and the characteristic information for subscribing to message, the characteristic information include ageing feature and importance characteristic.
29. device as claimed in claim 27, it is characterised in that the Registering modules are specifically used for:
The registration request periodically is sent to the server, the accreditation verification replied until receiving the server disappears Breath.
30. device as claimed in claim 27, it is characterised in that described device also includes:
Receiving module, for receiving the registration confirmation message of the server transmission, included in the registration confirmation message described Send the identification information of terminal;
The sending module is additionally operable to:
New information is sent to server based on UDP, the new information includes the identification information of the transmission terminal, IP address And port numbers.
CN201610675119.8A 2016-08-16 2016-08-16 A kind of message treatment method and device Pending CN107770034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610675119.8A CN107770034A (en) 2016-08-16 2016-08-16 A kind of message treatment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610675119.8A CN107770034A (en) 2016-08-16 2016-08-16 A kind of message treatment method and device

Publications (1)

Publication Number Publication Date
CN107770034A true CN107770034A (en) 2018-03-06

Family

ID=61260979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610675119.8A Pending CN107770034A (en) 2016-08-16 2016-08-16 A kind of message treatment method and device

Country Status (1)

Country Link
CN (1) CN107770034A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968434A (en) * 2018-09-30 2020-04-07 武汉斗鱼网络科技有限公司 Method for managing machine and related device
WO2020164363A1 (en) * 2019-02-15 2020-08-20 浙江吉利汽车研究院有限公司 Real-time message bus system and processing method
CN111585808A (en) * 2020-04-30 2020-08-25 中国科学院空天信息创新研究院 Message processing method, device, equipment and computer readable storage medium
CN112187876A (en) * 2020-09-10 2021-01-05 交控科技股份有限公司 Communication list establishing method, communication method and cloud platform
CN114846774A (en) * 2019-12-25 2022-08-02 华为技术有限公司 Communication method and device
CN114968611A (en) * 2021-07-13 2022-08-30 中移互联网有限公司 Message transmission method, message server, terminal and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2267500A (en) * 1998-12-17 2000-07-03 Michael Peter Groves An auction system
CN101159711A (en) * 2007-11-27 2008-04-09 航天东方红卫星有限公司 Self-adaptive real time message subscribing and issuing system and method
CN102917082A (en) * 2012-10-10 2013-02-06 青岛海信传媒网络技术有限公司 Information push method and system of transit-network address translation
CN105323205A (en) * 2014-05-30 2016-02-10 中兴通讯股份有限公司 Message pushing processing method, message pushing processing device, pushing server and application server
CN106059953A (en) * 2016-05-09 2016-10-26 乐视控股(北京)有限公司 Message routing method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2267500A (en) * 1998-12-17 2000-07-03 Michael Peter Groves An auction system
CN101159711A (en) * 2007-11-27 2008-04-09 航天东方红卫星有限公司 Self-adaptive real time message subscribing and issuing system and method
CN102917082A (en) * 2012-10-10 2013-02-06 青岛海信传媒网络技术有限公司 Information push method and system of transit-network address translation
CN105323205A (en) * 2014-05-30 2016-02-10 中兴通讯股份有限公司 Message pushing processing method, message pushing processing device, pushing server and application server
CN106059953A (en) * 2016-05-09 2016-10-26 乐视控股(北京)有限公司 Message routing method, device and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968434A (en) * 2018-09-30 2020-04-07 武汉斗鱼网络科技有限公司 Method for managing machine and related device
CN110968434B (en) * 2018-09-30 2022-12-02 武汉斗鱼网络科技有限公司 Method and related device for managing machine
WO2020164363A1 (en) * 2019-02-15 2020-08-20 浙江吉利汽车研究院有限公司 Real-time message bus system and processing method
CN114846774A (en) * 2019-12-25 2022-08-02 华为技术有限公司 Communication method and device
CN111585808A (en) * 2020-04-30 2020-08-25 中国科学院空天信息创新研究院 Message processing method, device, equipment and computer readable storage medium
CN112187876A (en) * 2020-09-10 2021-01-05 交控科技股份有限公司 Communication list establishing method, communication method and cloud platform
CN114968611A (en) * 2021-07-13 2022-08-30 中移互联网有限公司 Message transmission method, message server, terminal and electronic equipment
CN114968611B (en) * 2021-07-13 2023-10-27 中移互联网有限公司 Message transmission method, message server, terminal and electronic equipment

Similar Documents

Publication Publication Date Title
CN107770034A (en) A kind of message treatment method and device
US11908013B2 (en) Methods, apparatus, and systems for processing data transactions
CN104702696B (en) The cross-platform instant data interactive method of one kind, device and system
CN104468401B (en) A kind of message processing method and device
CN110191031A (en) Network resource access method, device, electronic equipment
CN109076024A (en) data control method and terminal device
CN105939335A (en) Method and system for managing channel ownership in a publish-subscribe data processing environment
CN110650202B (en) Communication interaction method and device and electronic equipment
CN106254206A (en) A kind of information processing method and equipment
CN109245993A (en) Instant communication method and device based on block chain
CN106790221A (en) A kind of safe ipsec protocol encryption method of internet protocol and the network equipment
CN105809817B (en) A kind of ATM failure monitoring method and device
CN107247629A (en) Cloud computing system and cloud computing method and device for controlling server
CN106789876A (en) The authentication method and its device of a kind of cloud terminal server
CN109345242A (en) Key storage, update method, device, equipment and medium based on block chain
CN110728558A (en) Virtual article package sending method, device, equipment and storage medium
CN111162880B (en) Data transmission method, device, equipment and storage medium
CN113452778B (en) Session holding method, device, equipment, system and storage medium
CN104142882B (en) Test method and device, system based on data processing
CN104754015B (en) A kind of methods, devices and systems for establishing remote session
CN110324302B (en) IOT equipment communication method
CN115348333B (en) Data transmission method, system and equipment based on UDP double-end communication interaction
CN111741014A (en) Message sending method, device, server and storage medium
WO2019242279A1 (en) Message processing method and device
CN102165484A (en) Role-independent context exchange

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180306