CN109660451A - A kind of method, apparatus and messaging system sending message - Google Patents

A kind of method, apparatus and messaging system sending message Download PDF

Info

Publication number
CN109660451A
CN109660451A CN201811594347.8A CN201811594347A CN109660451A CN 109660451 A CN109660451 A CN 109660451A CN 201811594347 A CN201811594347 A CN 201811594347A CN 109660451 A CN109660451 A CN 109660451A
Authority
CN
China
Prior art keywords
message
sent
unique identity
transmission
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811594347.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.)
Beijing Cloud In Faith Network Technology Co Ltd
Original Assignee
Beijing Cloud In Faith Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Cloud In Faith Network Technology Co Ltd filed Critical Beijing Cloud In Faith Network Technology Co Ltd
Priority to CN201811594347.8A priority Critical patent/CN109660451A/en
Publication of CN109660451A publication Critical patent/CN109660451A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0036Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems

Landscapes

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

Abstract

This application provides a kind of method, apparatus and messaging system for sending message, this method is applied to send client, include: the message to be sent according to user's input, using Universally Unique Identifier technology, generates message unique identity for the message to be sent;Store the message to be sent and the message unique identity;The message to be sent and the message unique identity are sent to external server, and when the response of the server is response failure, retransmits the message to be sent for sending storage and the message unique identity.The re-scheduling efficiency for being sent to the message for receiving client can effectively be promoted.

Description

A kind of method, apparatus and messaging system sending message
Technical field
This application involves technical field of information processing, in particular to a kind of method, apparatus and message for sending message Receive-transmit system.
Background technique
Message is a kind of important information carrier that interactive both sides link up, wherein instant messaging (IM, Instant Messaging) message is one kind of message, is the internet message for referring to send and receive immediately.It is fast with IM technology Speed development, function becomes increasingly abundant, currently, IM has no longer been a simple interactive tool, has developed into collection exchange, money The synthesization information platform that news, amusement, search, e-commerce, office cooperation and corporate client service etc. are integrated.
The system architecture of information receiving and transmitting uses the mode of client/server, by taking IM message as an example, sends client to clothes Be engaged in device send IM message after, server be received IM message generate message unique identity, then, server to send client Response confirmation is returned, and the IM message for carrying message unique identity is sent to reception client, so as to receive client foundation Received message unique identity carries out re-scheduling processing, to avoid storing and showing duplicate IM message.
But the message method issues IM message when sending client, and server receives IM message and generates message After unique identification, if the communication network for sending client and server is abnormal, server is had not enough time to transmission client Response confirmation is returned, the response confirmation of server is not received due to sending client, thus, restore normal in communication network, After transmission client establishes connection with server again, the IM message will be retransmitted, and server is due to having generated a upper IM The message unique identity of message, thus, the IM message is received, will be considered that it is a new information, and it is unique to generate new message Mark.In this way, the IM message of the same content of two or more pieces can be received by receiving client, but each not phase of message unique identity Together, the IM message that can be considered as different is stored and is shown, so that repeating IM according to the exclusion that the message method carries out Message it is inefficient.
Summary of the invention
In view of this, the application's is designed to provide a kind of method, apparatus and messaging system for sending message, mention Rise the re-scheduling efficiency for being sent to the message for receiving client.
In a first aspect, the embodiment of the present application provides a kind of method for sending message, this method comprises:
It is generated according to the message to be sent of user's input using Universally Unique Identifier technology for the message to be sent Message unique identity;
Store the message to be sent and the message unique identity;
The message to be sent and the message unique identity are sent to external server, and in the response of the server When failing for response, the message to be sent for sending storage and the message unique identity are retransmitted.
Optionally, message to be sent and message unique identity described in database purchase are utilized.
Optionally, the method also includes:
After using database purchase message to be sent and message unique identity, mark this to be sent in the database The transmission state of message is not sent;
After sending the message to be sent and the message unique identity to external server, more new database acceptance of the bid note The message to be sent transmission state be send in.
Optionally, when the response of the server is response failure, the message to be sent and the institute for sending storage are retransmitted State message unique identity, comprising:
Confirm that the response unsuccessfully fails to send, the transmission state of the message to be sent of more new database acceptance of the bid note To send failure, the heavy transmission times of record is read;
If the heavy transmission times is less than preset repeating transmission and send frequency threshold value, retransmit the message to be sent for sending storage and The transmission state of the message to be sent of the message unique identity, more new database acceptance of the bid note is to send failure, updates note The heavy transmission times of record;
If the heavy transmission times send frequency threshold value not less than the repeating transmission, in the transmission client and the server Between communication it is normal when, to the transmission state recorded in database be send in the heavy transmission times of message be zeroed out, Retransmit send the transmission state be send in message to be sent and message unique identity, more new database acceptance of the bid remember it is described to The transmission state for sending message is the heavy transmission times of more new record in sending.
Optionally, when the response of the server is response failure, the message to be sent and the institute for sending storage are retransmitted State message unique identity, comprising:
Confirm that the response is unsuccessfully no response, the transmission state of the message to be sent of more new database acceptance of the bid note is Send failure;
When communication between the transmission client and the server is normal, to the transmission state recorded in database It is zeroed out for the heavy transmission times of message in sending, retransmitting and sending the transmission state be message to be sent in transmission and disappear Unique identification is ceased, the transmission state of the message to be sent of more new database acceptance of the bid note is the repeating transmission of more new record in sending Send number.
Optionally, the method also includes:
When the response of the server is that response confirms, the transmission of the message to be sent of more new database acceptance of the bid note State is to be sent completely.
It is optionally, described to send the message to be sent and the message unique identity to external server, comprising:
According to preset coding rule, bytecode coding is carried out to the message to be sent and the message unique identity, Obtain encoded information;
By the long interface channel established with server, the server is sent by the encoded information.
Second aspect, the embodiment of the present application provide a kind of device for sending message, which includes:
Identifier generation module, for the message to be sent according to user's input, using Universally Unique Identifier technology, for institute It states message to be sent and generates message unique identity;
Memory module, for storing the message to be sent and the message unique identity;
Message sends processing module, for uniquely marking to the external server transmission message to be sent and the message Know, and when the response of the server is response failure, repeating transmission send the message to be sent of storage and the message unique Mark.
The third aspect, the embodiment of the present application provide a kind of messaging system, which includes:
Client is sent, the message to be sent for inputting according to user is described using Universally Unique Identifier technology Message to be sent generates message unique identity;Store the message to be sent and the message unique identity;It is sent to server The message to be sent and the message unique identity, and when the response of the server is response failure, storage is sent in repeating transmission The message to be sent and the message unique identity;
Server, for the received message to be sent and the message unique identity to be forwarded to reception client;
It receives client and detects local database for receiving the message to be sent and the message unique identity In whether there is the message unique identity, if it does not exist, save the received message to be sent and message unique identity arrive Database, and if it exists, abandon the received message to be sent and message unique identity.
Optionally, the reception client includes:
Receiving module, for receiving the message to be sent and the message unique identity that the server forwards;
Message re-scheduling module, for detecting with the presence or absence of the message unique identity in local database, if it does not exist, The received message to be sent and message unique identity are saved to database, and if it exists, abandon received described to be sent disappear Breath and message unique identity.
Fourth aspect, the embodiment of the present application provide a kind of computer equipment, including memory, processor and are stored in institute The computer program that can be run on memory and on the processor is stated, the processor executes real when the computer program The step of existing above method.
5th aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Computer program is stored on medium, the computer program executes above-mentioned method when being run by processor the step of.
A kind of method, apparatus and messaging system sending message provided by the embodiments of the present application, by according to user The message to be sent of input generates message unique identity using Universally Unique Identifier technology for the message to be sent;Storage The message to be sent and the message unique identity;The message to be sent is sent to external server and the message is unique Mark, and when the response of the server is response failure, retransmit the message to be sent for sending storage and the message only One mark.In this way, generating message unique identity according to Universally Unique Identifier technology by transmission client, every message is carried out only One mark, when needing repeating transmission to send message, the message and corresponding message unique identity are given in repeating transmission, disappear without what is sent for the repeating transmission Breath regenerates message unique identity, so that being sent to the message message having the same for receiving multiple identical contents of client Unique identification, re-scheduling can be carried out according to message unique identity by receiving client, effectively improved and be sent to reception client The re-scheduling efficiency of message.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the method flow schematic diagram provided by the embodiments of the present application for sending message;
Fig. 2 is the method another flow diagram provided by the embodiments of the present application for sending message;
Fig. 3 is that the method flow that reception client provided by the embodiments of the present application carries out re-scheduling to received message is illustrated Figure;
Fig. 4 is the apparatus structure schematic diagram provided by the embodiments of the present application for sending message;
Fig. 5 is messaging system structural schematic diagram provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of computer equipment 600 provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application Middle attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only It is some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is real The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, below to the application's provided in the accompanying drawings The detailed description of embodiment is not intended to limit claimed scope of the present application, but is merely representative of the selected reality of the application Apply example.Based on embodiments herein, those skilled in the art institute obtained without making creative work There are other embodiments, shall fall in the protection scope of this application.
Fig. 1 is the method flow schematic diagram provided by the embodiments of the present application for sending message.Applied to client is sent, such as scheme Shown in 1, this method comprises:
Step 101, the message to be sent according to user's input is described to be sent using Universally Unique Identifier technology Message generates message unique identity;
In the embodiment of the present application, client is sent in the needs for receiving user's input and is sent to the pending of reception client After sending message, the generation according to Universally Unique Identifier (UUID, Universally Unique Identifier) technology is advised Then, message unique identity is generated for the message to be sent.Wherein, UUID technology using current date and time, clock sequence with And globally unique American Institute of Electrical and Electronics Engineers (IEEE, Institute of Electrical and Electronics Engineers) machine recognition number generation identification information, so as to realize all members in distributed system Element, for example, each information that each client in communication system exports, can have unique identification information, without passing through Server centered controls the identification information of each element, to distinguish to each element.In this way, using UUID technology, it can be true Each message one message unique identity of corresponding generation is protected, realizes the unique identification of message.
In the embodiment of the present application, by sending client as message to be sent generation message unique identity and being sent out to server The message to be sent for carrying message unique identity is sent, so that server is accordingly forwarded.In this way, the generation of message unique identity Independent of server, can disappear to avoid the extremely caused message for sending client repetition transmission is respectively configured of communication network Cease unique identification, so as to cause receive client receive a plurality of identical content message and can not re-scheduling situation, be able to ascend Receive the re-scheduling efficiency of client;Further, server forwarding carries the message to be sent of message unique identity, without to disappear Breath configuration message unique identity, can effectively reduce the resource overhead of server, improve the response speed of server.
In the embodiment of the present application, as an alternative embodiment, message includes but is not limited to: IM message, picture, text, text Part etc..
Step 102, the message to be sent and the message unique identity are stored;
In the embodiment of the present application, message to be sent and message unique identity are one-to-one relationship.As an optional implementation Example, utilizes database purchase message to be sent and message unique identity.In this way, can be made using database purchase corresponding information The information persistence that must be stored.Certainly, in practical application, other modes also be can use, for example, the mode of table or text is deposited Message to be sent and message unique identity are stored up, the embodiment of the present application is not construed as limiting this.
Step 103, the message to be sent and the message unique identity are sent to external server, and in the service When the response of device is response failure, the message to be sent for sending storage and the message unique identity are retransmitted.
In the embodiment of the present application, due to the exception of communication network, need to be related to the retransmission mechanism of message, it can be to pending The transmission state of message is sent to be marked, so as to which weight can be determined the need for according to the transmission state of label in subsequent applications The message to be sent is sent out, thus, as an alternative embodiment, this method further include:
A11, after using database purchase message to be sent and message unique identity, label should be in the database It is not sent for sending the transmission state of message;
In the embodiment of the present application, while storing message to be sent and message unique identity, to the message to be sent Transmission state is marked.As an alternative embodiment, transmission state include: it is not sent, send in, send failure, sent At.
In the embodiment of the present application, message, message unique identity and transmission state to be sent form corresponding relationship.For example, disappearing It is not sent to cease A-1000-.
A12, after sending the message to be sent and the message unique identity to external server, in more new database The transmission state of the message to be sent of label is in sending.
In the embodiment of the present application, after sending message to be sent and the message unique identity, to what is marked in database The transmission state of the message to be sent is accordingly updated.
In the embodiment of the present application, response unsuccessfully may be due to the packet loss in message transmitting procedure or to receive incorrect cause Transmission failure, it is also possible to due to Network Abnormal, for example, without response caused by network failure.Thus, as an optional implementation Example, when the response of the server is response failure, repeating transmission send the message to be sent of storage and the message uniquely to mark Know, comprising:
Confirm that the response unsuccessfully fails to send, the transmission state of the message to be sent of more new database acceptance of the bid note To send failure, the heavy transmission times of record is read;
If the heavy transmission times is less than preset repeating transmission and send frequency threshold value, retransmit the message to be sent for sending storage and The transmission state of the message to be sent of the message unique identity, more new database acceptance of the bid note is to send failure, updates note The heavy transmission times of record;
If the heavy transmission times send frequency threshold value not less than the repeating transmission, in the transmission client and the server Between communication it is normal when, to the transmission state recorded in database be send failure news heavy transmission times carry out clearly Zero, the message to be sent and message unique identity for sending that the transmission state is transmission failure of laying equal stress on, more new database acceptance of the bid note The message to be sent transmission state be send in, the heavy transmission times of more new record.
In the embodiment of the present application, by marking the transmission state of message to be sent in the database, in this way, can be waited at this Send message send failure when, according to the transmission state of the message to be sent, retransmit the message to be sent, without be this Message to be sent generates message unique identity again, it is possible to prevente effectively from receiving client storage and showing disappearing for identical content Breath.
In the embodiment of the present application, if weight transmission times send frequency threshold value not less than repeating transmission, show to send client and service There is exception in communication network between device, terminates and sends the message to be sent stored and message unique identity, in more new database The transmission state for the message to be sent that the termination of label is sent is transmission failure, and logical between client and server sending After letter restores normal, the message to be sent and message unique identity for sending storage are retransmitted, the heavy transmission times of more new record updates number The transmission state for the message to be sent sent according to the repeating transmission marked in library is in transmission.
In the embodiment of the present application, retransmitted as another alternative embodiment when the response of the server is response failure Send storage the message to be sent and the message unique identity, comprising:
Confirm that the response is unsuccessfully no response, the transmission state of the message to be sent of more new database acceptance of the bid note is Send failure;
When communication between the transmission client and the server is normal, to the transmission state recorded in database For send failure news heavy transmission times be zeroed out, retransmit send the transmission state be transmission in message to be sent with The transmission state of the message to be sent of message unique identity, more new database acceptance of the bid note is the weight of more new record in sending Transmission times.
In the embodiment of the present application, no response refers to that sending client is not received by clothes in scheduled response time threshold value Any message of business device shows to send the communication between client and server and exception occurs.
In the embodiment of the present application, as an alternative embodiment, this method further include:
When the response of the server is that response confirms, the transmission of the message to be sent of more new database acceptance of the bid note State is to be sent completely.
In the embodiment of the present application, as an alternative embodiment, the message to be sent and described is sent to external server Message unique identity, comprising:
B11 carries out bytecode volume to the message to be sent and the message unique identity according to preset coding rule Code, obtains encoded information;
In the embodiment of the present application, as an alternative embodiment, the encoded information that progress bytecode can also be encoded It is serialized, and is exported into the data structure UpStreamMessage for sending message.
B12 sends the server for the encoded information by the long interface channel established with server.
In the embodiment of the present application, by the encoded information in data structure UpStreamMessage, by being established with server Long interface channel, be sent to server.
In the embodiment of the present application, since transmission client is when sending message, need to carry message unique identity, thus, It needs to modify to the data structure of message, i.e., the encoded information in data structure is serialized.
In the embodiment of the present application, the serializing that client send message is sent, client is received and carries out reception message Unserializing.Wherein, it as an alternative embodiment, utilizes Google agreement buffer area (Google Protocol Buffer) Serializing and unserializing are carried out, " backward " good compatibility of Google agreement buffer area, not having to the original program of destruction can With the upgrading to data structure.In this way, will not because of data structure change and cause large-scale code refactoring or migration Problem.
In the embodiment of the present application, as an alternative embodiment, the data structure definition for sending message and reception message is as follows:
In the embodiment of the present application, by all increasing a field in receiving message and two data structures for sending message ClientMsgUId, for carrying message unique identity, for example, optional string clientMsgUId=as above 14, any change of release process will not be caused, and newly-increased field will not carry out apparent expense to program tape.
In the embodiment of the present application, the message to be sent and message unique identity that receive are forwarded to and receive client by server End, receiving in the local database of client detection whether there is the message unique identity, is not present, then saves message to be sent With message unique identity to database, if had existed, message to be sent and message unique identity are not saved, abandons and receives Message to be sent and message unique identity, to reach exclusion repetition message, i.e. the purpose of re-scheduling.In this way, by sending client End generates message unique identity according to UUID technology, and every message carries out unique identification, and when needs are retransmitted and send message, repeating transmission is sent The message and corresponding message unique identity, the message without sending for the repeating transmission regenerate message unique identity, so that sending To the message message unique identity having the same for the multiple identical contents for receiving client, receiving client can be according to message Unique identification, to message exclude repeat can accomplish it is accurate, efficient, effectively improve receive client re-scheduling efficiency;Into one Step ground, it is possible to reduce server generates the operation of message unique identity, improves response speed.
Fig. 2 is the method another flow diagram provided by the embodiments of the present application for sending message.As shown in Fig. 2, with client Holding A is to send client, and customer end B is for receiving client, which includes:
Step 201, customer end A receives the message transmission request that user sends messages to customer end B, sends out for the message The message carried in request is sent to generate message unique identity;
In the embodiment of the present application, user inputs in customer end A needs the message that sends, clicks send button, trigger to The message that customer end A output carries message sends request.
Step 202, message and message unique identity are saved in local data base, and by the transmission state mark of the message It is denoted as not sent;
In the embodiment of the present application, storage is for the ease of subsequent retransmissions.
Step 203, according to preset coding rule, message and message unique identity is subjected to bytecode coding, compiled Code information;
Step 204, by coded information sequences into the data structure for sending message;
In the embodiment of the present application, message and message unique identity are subjected to bytecode coding and serialized to transmission message In data structure UpStreamMessage.
Step 205, by the long interface channel established with server, the encoded information serialized in data structure is sent To server, the transmission state for updating the message in local data base is in sending;
In the embodiment of the present application, customer end A updates the transmission state of corresponding message after issuing encoded information.
Step 206, customer end A judges the response that server whether is received in scheduled response time threshold value, if receiving The response returned to server, executes step 207, if not receiving the response of server passback, executes step 211;
In the embodiment of the present application, different type according to response determines that communication network is normal or abnormal, so that it is determined that Corresponding processing strategie.
Step 207, judge whether received response is response confirmation, if so, step 208 is executed, if it is not, executing step 209;
It in the embodiment of the present application, responds and confirms for response, indicate that present communications network is normal.
Step 208, the transmission state of the message in local data base is updated to send successfully;
In the embodiment of the present application, communication network under normal circumstances, customer end A can receive clothes in scheduled time threshold value The response confirmation of business device.
In the embodiment of the present application, as an alternative embodiment, this method can also include:
Store in deletion database is more than the message and message unique identity for presetting storage time threshold value.
Step 209, the weight transmission times of the message is added 1, the transmission state of the message of more new database acceptance of the bid note is Failure is sent, judges that adding 1 heavy transmission times whether to be less than repeating transmission send frequency threshold value, if so, step 210 is executed, if it is not, executing Step 211;
It,, can not also more new database acceptance of the bid note when needing to retransmit as an alternative embodiment in the embodiment of the present application The message transmission state be send failure, even customer end A do not receive server passback response confirmation, by the message Weight transmission times adds 1, in the case where weight transmission times is less than scheduled sending times threshold value, retransmits message and message only One mark.
Step 210, the message and message unique identity for sending storage, the hair of the message of more new database acceptance of the bid note are retransmitted State is sent to return to step 206 in transmission;
It step 211, is hair to the transmission state recorded in database after waiting the communication of customer end A and server normal The heavy transmission times of failure news is sent to be zeroed out, it is unique to send failure news and message that the transmission state is sent in repeating transmission Mark, the transmission state for the message that the repeating transmission of more new database acceptance of the bid note is sent are in sending, to return to step 206.
In the embodiment of the present application, if customer end A does not receive the response confirmation of server passback, retransmits and carry out bytecode The message and message unique identity of coding, if weight transmission times is more than scheduled sending times threshold value, confirmation communication network is abnormal, Then after subsequent client A and server re-establish channel, then successful message not sent in local data base weighed one by one It is new to send.
In the embodiment of the present application, under communication network abnormal conditions, if there are no receptions being more than scheduled time threshold value The response confirmation returned to server, then retransmit the message and message unique identity of the carry out bytecode coding.
Fig. 3 is that the method flow that reception client provided by the embodiments of the present application carries out re-scheduling to received message is illustrated Figure.As shown in figure 3, the process includes: so that customer end B is to receive client as an example
Step 301, it after customer end B receives the encoded information of server push, is solved according to preset decoding rule Simultaneously unserializing obtains message and message unique identity into DownStreamMessage to code;
Step 302, it retrieves with the presence or absence of the message unique identity obtained in local data base, if so, executing step 303, if it is not, executing step 304;
Step 303, the encoded information received is abandoned;
Step 304, the message and message unique identity are saved in local data base, and user is notified to have received New information.
It, will if there is no the message unique identities obtained in local data base in the embodiment of the present application Message and message unique identity in DownStreamMessage are saved in local data base, and after saving successfully, notice User has received new information, if it is present not saving.In this way, can effectively and accurately message be carried out by receiving client Re-scheduling.
Fig. 4 is the apparatus structure schematic diagram provided by the embodiments of the present application for sending message.As shown in figure 4, the device includes:
Identifier generation module 401, for the message to be sent according to user's input, using Universally Unique Identifier technology, Message unique identity is generated for the message to be sent;
In the embodiment of the present application, as an alternative embodiment, message includes but is not limited to: IM message, picture, text, text Part etc..
Memory module 402, for storing the message to be sent and the message unique identity;
In the embodiment of the present application, as an alternative embodiment, memory module 402 is database, utilizes database purchase institute State message to be sent and message unique identity.
In the embodiment of the present application, as an alternative embodiment, memory module 402 is also used to:
After using database purchase message to be sent and message unique identity, mark this to be sent in the database The transmission state of message is not sent;After sending the message to be sent and the message unique identity to external server, The transmission state of the message to be sent of more new database acceptance of the bid note is in sending.
Message sends processing module 403, for unique to the external server transmission message to be sent and the message Mark, and when the response of the server is response failure, retransmit the message to be sent for sending storage and the message only One mark.
In the embodiment of the present application, as an alternative embodiment, when the response of the server is response failure, repeating transmission is sent The message to be sent of storage and the message unique identity, comprising:
Confirm that the response unsuccessfully fails to send, the transmission state of the message to be sent of more new database acceptance of the bid note To send failure, the heavy transmission times of record is read;
If the heavy transmission times is less than preset repeating transmission and send frequency threshold value, retransmit the message to be sent for sending storage and The transmission state of the message to be sent of the message unique identity, more new database acceptance of the bid note is to send failure, updates note The heavy transmission times of record;
If the heavy transmission times send frequency threshold value not less than the repeating transmission, in the transmission client and the server Between communication it is normal when, to the transmission state recorded in database be send in the heavy transmission times of message be zeroed out, Retransmit send the transmission state be send in message to be sent and message unique identity, more new database acceptance of the bid remember it is described to The transmission state for sending message is the heavy transmission times of more new record in sending.
In the embodiment of the present application, retransmitted as another alternative embodiment when the response of the server is response failure Send storage the message to be sent and the message unique identity, comprising:
Confirm that the response is unsuccessfully no response, the transmission state of the message to be sent of more new database acceptance of the bid note is Send failure;
When communication between the transmission client and the server is normal, to the transmission state recorded in database It is zeroed out for the heavy transmission times of message in sending, retransmitting and sending the transmission state be message to be sent in transmission and disappear Unique identification is ceased, the transmission state of the message to be sent of more new database acceptance of the bid note is the repeating transmission of more new record in sending Send number.
In the embodiment of the present application, as an alternative embodiment, it is described to external server send the message to be sent and The message unique identity, comprising:
According to preset coding rule, bytecode coding is carried out to the message to be sent and the message unique identity, Obtain encoded information;
By the long interface channel established with server, the server is sent by the encoded information.
In the embodiment of the present application, as an alternative embodiment, message sends processing module 403 and is also used to:
When the response of the server is that response confirms, the transmission of the message to be sent of more new database acceptance of the bid note State is to be sent completely.
Fig. 5 is messaging system structural schematic diagram provided by the embodiments of the present application.As shown in figure 5, the information receiving and transmitting system System includes:
Client 501 is sent, for being using Universally Unique Identifier technology according to the message to be sent of user's input The message to be sent generates message unique identity;Store the message to be sent and the message unique identity;To server The message to be sent and the message unique identity are sent, and when the response of the server is response failure, repeating transmission is sent The message to be sent of storage and the message unique identity;
In the embodiment of the present application, the specific structure of client is sent as shown in figure 5, details are not described herein.
Server 502 receives client for the received message to be sent and the message unique identity to be forwarded to End;
It receives client 503 and detects local data for receiving the message to be sent and the message unique identity It whether there is the message unique identity in library, if it does not exist, save the received message to be sent and message unique identity To database, and if it exists, abandon the received message to be sent and message unique identity.
In the embodiment of the present application, as an alternative embodiment, receiving client 501 includes: receiving module and message row Molality block (not shown), wherein
Receiving module, for receiving the message to be sent and the message unique identity that the server forwards;
In the embodiment of the present application, after receiving the encoded information that client receives server push, according to preset decoding Rule is decoded and unserializing is into DownStreamMessage, obtains message to be sent and message unique identity.
Message re-scheduling module, for detecting with the presence or absence of the message unique identity in local database, if it does not exist, The received message to be sent and message unique identity are saved to database, and if it exists, abandon received described to be sent disappear Breath and message unique identity.
As shown in fig. 6, one embodiment of the application provides a kind of computer equipment 600, for executing Fig. 1 into Fig. 3 The method for sending message, the equipment include memory 601, processor 602 and are stored on the memory 601 and can be in the processing The computer program run on device 602, wherein above-mentioned processor 602 realizes that above-mentioned transmission disappears when executing above-mentioned computer program The step of method of breath.
Specifically, above-mentioned memory 601 and processor 602 can be general memory and processor, do not do have here Body limits, when the computer program of 602 run memory 601 of processor storage, the method that is able to carry out above-mentioned transmission message.
Corresponding to the method for transmission message of the Fig. 1 into Fig. 3, computer-readable deposited the embodiment of the present application also provides a kind of Storage media is stored with computer program on the computer readable storage medium, execution when which is run by processor The step of method of above-mentioned transmission message.
Specifically, which can be general storage medium, such as mobile disk, hard disk, on the storage medium Computer program when being run, the method for being able to carry out above-mentioned parsing portable document format document table.
In embodiment provided herein, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the present application can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, the only specific embodiment of the application, to illustrate the application Technical solution, rather than its limitations, the protection scope of the application is not limited thereto, although with reference to the foregoing embodiments to this Shen It please be described in detail, those skilled in the art should understand that: anyone skilled in the art Within the technical scope of the present application, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of the embodiment of the present application technical solution.The protection in the application should all be covered Within the scope of.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.

Claims (10)

1. a kind of method for sending message, which is characterized in that it is applied to send client, this method comprises:
According to the message to be sent of user's input, using Universally Unique Identifier technology, message is generated for the message to be sent Unique identification;
Store the message to be sent and the message unique identity;
The message to be sent and the message unique identity are sent to external server, and is to ring in the response of the server When should fail, the message to be sent for sending storage and the message unique identity are retransmitted.
2. the method as described in claim 1, which is characterized in that unique using message and message to be sent described in database purchase Mark.
3. method according to claim 2, which is characterized in that the method also includes:
After using database purchase message to be sent and message unique identity, the message to be sent is marked in the database Transmission state be it is not sent;
After sending the message to be sent and the message unique identity to external server, the institute of more new database acceptance of the bid note The transmission state of message to be sent is stated as in transmission.
4. method as claimed in claim 3, which is characterized in that when the response of the server is response failure, repeating transmission is sent The message to be sent of storage and the message unique identity, comprising:
The response is confirmed unsuccessfully to send failure, and the transmission state of the message to be sent of more new database acceptance of the bid note is hair Failure is sent, the heavy transmission times of record is read;
If the heavy transmission times is less than preset repeating transmission and send frequency threshold value, the message to be sent for sending storage and described is retransmitted The transmission state of the message to be sent of message unique identity, more new database acceptance of the bid note is to send failure, more new record Weight transmission times;
If the heavy transmission times send frequency threshold value not less than the repeating transmission, between the transmission client and the server Communication it is normal when, to the transmission state recorded in database be send in the heavy transmission times of message be zeroed out, repeating transmission Sending the transmission state is the message to be sent and message unique identity in sending, and the acceptance of the bid of more new database is remembered described to be sent The transmission state of message is the heavy transmission times of more new record in sending.
5. method as claimed in claim 3, which is characterized in that when the response of the server is response failure, repeating transmission is sent The message to be sent of storage and the message unique identity, comprising:
Confirm that the response is unsuccessfully no response, the transmission state of the message to be sent of more new database acceptance of the bid note is to send Failure;
It is hair to the transmission state recorded in database when communication between the transmission client and the server is normal The heavy transmission times of message in sending is zeroed out, retransmit send the transmission state be transmission in message and message to be sent only One identifies, and the transmission state of the message to be sent of more new database acceptance of the bid note is in sending, and the repeating transmission of more new record is sent secondary Number.
6. such as method described in any one of claim 1 to 5, which is characterized in that the method also includes:
When the response of the server is that response confirms, the transmission state of the message to be sent of more new database acceptance of the bid note To be sent completely.
7. such as method described in any one of claim 1 to 5, which is characterized in that described described pending to external server transmission Send message and the message unique identity, comprising:
According to preset coding rule, bytecode coding is carried out to the message to be sent and the message unique identity, is obtained Encoded information;
By the long interface channel established with server, the server is sent by the encoded information.
8. a kind of device for sending message, which is characterized in that the device includes:
Identifier generation module, for the message to be sent according to user's input, using Universally Unique Identifier technology, for it is described to It sends message and generates message unique identity;
Memory module, for storing the message to be sent and the message unique identity;
Message sends processing module, for sending the message to be sent and the message unique identity to external server, and When the response of the server is response failure, the message to be sent for sending storage and the message unique identity are retransmitted.
9. a kind of messaging system, which is characterized in that the messaging system includes:
Client is sent, the message to be sent for inputting according to user is described pending using Universally Unique Identifier technology Message is sent to generate message unique identity;Store the message to be sent and the message unique identity;To described in server transmission Message to be sent and the message unique identity, and when the response of the server is response failure, retransmit the institute for sending storage State message to be sent and the message unique identity;
Server, for the received message to be sent and the message unique identity to be forwarded to reception client;
Client is received, for receiving the message to be sent and the message unique identity, detecting in local database is No there are the message unique identities, if it does not exist, save the received message to be sent and message unique identity to data Library, and if it exists, abandon the received message to be sent and message unique identity.
10. messaging system as claimed in claim 9, which is characterized in that the reception client includes:
Receiving module, for receiving the message to be sent and the message unique identity that the server forwards;
Message re-scheduling module if it does not exist, is saved for detecting with the presence or absence of the message unique identity in local database The received message to be sent and message unique identity are to database, and if it exists, abandon the received message to be sent and Message unique identity.
CN201811594347.8A 2018-12-25 2018-12-25 A kind of method, apparatus and messaging system sending message Pending CN109660451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811594347.8A CN109660451A (en) 2018-12-25 2018-12-25 A kind of method, apparatus and messaging system sending message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811594347.8A CN109660451A (en) 2018-12-25 2018-12-25 A kind of method, apparatus and messaging system sending message

Publications (1)

Publication Number Publication Date
CN109660451A true CN109660451A (en) 2019-04-19

Family

ID=66116271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811594347.8A Pending CN109660451A (en) 2018-12-25 2018-12-25 A kind of method, apparatus and messaging system sending message

Country Status (1)

Country Link
CN (1) CN109660451A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971512A (en) * 2019-12-09 2020-04-07 北京仿真中心 Communication method and system
CN111131001A (en) * 2019-12-25 2020-05-08 南京甄视智能科技有限公司 Message sending method, device, storage medium and server
CN111245706A (en) * 2020-01-03 2020-06-05 湖南省梦网科技发展有限公司 Information processing method, device, server and medium
CN111858100A (en) * 2020-07-28 2020-10-30 浪潮电子信息产业股份有限公司 BMC message transmission method and related device
CN112187903A (en) * 2020-09-22 2021-01-05 华云数据控股集团有限公司 Message pushing method and device and message service system
CN112788793A (en) * 2019-11-07 2021-05-11 维沃移动通信有限公司 Reconstruction failure processing method and related equipment
CN113079112A (en) * 2021-03-25 2021-07-06 北京达佳互联信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN113132063A (en) * 2021-04-02 2021-07-16 天津瑞发科半导体技术有限公司 Physical layer retransmission control method
CN113794622A (en) * 2021-08-17 2021-12-14 北京达佳互联信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN114116262A (en) * 2021-12-02 2022-03-01 北京宇信科技集团股份有限公司 Processing method, device, medium and equipment for distributed asynchronous data communication

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378334A (en) * 2008-09-25 2009-03-04 卡斯柯信号有限公司 Communication method base on dual-network redundant universal network model
CN105120495A (en) * 2015-09-09 2015-12-02 北京京东尚科信息技术有限公司 Information push method and system for smart mobile terminal
CN108631955A (en) * 2018-05-15 2018-10-09 网易(杭州)网络有限公司 It is a kind of to ensure that message sends reachable mthods, systems and devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378334A (en) * 2008-09-25 2009-03-04 卡斯柯信号有限公司 Communication method base on dual-network redundant universal network model
CN105120495A (en) * 2015-09-09 2015-12-02 北京京东尚科信息技术有限公司 Information push method and system for smart mobile terminal
CN108631955A (en) * 2018-05-15 2018-10-09 网易(杭州)网络有限公司 It is a kind of to ensure that message sends reachable mthods, systems and devices

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788793A (en) * 2019-11-07 2021-05-11 维沃移动通信有限公司 Reconstruction failure processing method and related equipment
CN110971512A (en) * 2019-12-09 2020-04-07 北京仿真中心 Communication method and system
CN111131001A (en) * 2019-12-25 2020-05-08 南京甄视智能科技有限公司 Message sending method, device, storage medium and server
CN111245706A (en) * 2020-01-03 2020-06-05 湖南省梦网科技发展有限公司 Information processing method, device, server and medium
CN111858100A (en) * 2020-07-28 2020-10-30 浪潮电子信息产业股份有限公司 BMC message transmission method and related device
CN112187903A (en) * 2020-09-22 2021-01-05 华云数据控股集团有限公司 Message pushing method and device and message service system
CN113079112A (en) * 2021-03-25 2021-07-06 北京达佳互联信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN113132063A (en) * 2021-04-02 2021-07-16 天津瑞发科半导体技术有限公司 Physical layer retransmission control method
CN113794622A (en) * 2021-08-17 2021-12-14 北京达佳互联信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN114116262A (en) * 2021-12-02 2022-03-01 北京宇信科技集团股份有限公司 Processing method, device, medium and equipment for distributed asynchronous data communication

Similar Documents

Publication Publication Date Title
CN109660451A (en) A kind of method, apparatus and messaging system sending message
Kimbleton et al. Computer communication networks: Approaches, objectives, and performance considerations
JP5499019B2 (en) File folder transmission over the network
CN104601436B (en) Generation method, terminal and the background server of a kind of account
EP3402136B1 (en) Information interaction method, client and device
CN103841111A (en) Method for preventing data from being submitted repeatedly and server
CN102387482A (en) Method, system and mobile phone for acquiring mobile phone service information
CN109981349A (en) Call chain information query method and equipment
CN103547342A (en) Information sending method, information reading and notifying method, information receiving method and device
CN104917586A (en) Verification method, device and system of transmitted data
CN109039876B (en) Mail processing method and device
CN104980450A (en) Message transmission method and system and message-oriented middleware
CN104238819A (en) Detection method and system for display screen state in mobile terminal
CN111162880B (en) Data transmission method, device, equipment and storage medium
CN106657187A (en) Message processing method and apparatus thereof
CN103595611B (en) The realization method and system and equipment of instant messaging application
CN104967527A (en) Recovering method of communication recording, recovering device of communication recording and server
CN108650170A (en) A kind of display methods and device of information
JP5961471B2 (en) Output comparison method in multiple information systems
JP2013017094A (en) Information processing device, and information processing method
CN108600255B (en) Mock service management method, device, computer equipment and storage medium
US8161146B2 (en) Method, system, and program product for assigning device identifiers
US20100027563A1 (en) Evolution codes (opportunistic erasure coding) platform
CN104333515A (en) Method and device for processing SWIFT messages
KR102055273B1 (en) Method and Apparatus for Push service provided using the integration of the mobile device operating system conversion

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: 20190419