CN110912803B - IM message transmission method and terminal - Google Patents

IM message transmission method and terminal Download PDF

Info

Publication number
CN110912803B
CN110912803B CN201911114684.7A CN201911114684A CN110912803B CN 110912803 B CN110912803 B CN 110912803B CN 201911114684 A CN201911114684 A CN 201911114684A CN 110912803 B CN110912803 B CN 110912803B
Authority
CN
China
Prior art keywords
message
forwarding
data
target message
receiving end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911114684.7A
Other languages
Chinese (zh)
Other versions
CN110912803A (en
Inventor
叶金成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Futuo Network Technology Shenzhen Co ltd
Original Assignee
Futuo Network Technology Shenzhen 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 Futuo Network Technology Shenzhen Co ltd filed Critical Futuo Network Technology Shenzhen Co ltd
Priority to CN201911114684.7A priority Critical patent/CN110912803B/en
Publication of CN110912803A publication Critical patent/CN110912803A/en
Application granted granted Critical
Publication of CN110912803B publication Critical patent/CN110912803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • 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
    • H04L51/066Format adaptation, e.g. format conversion or compression

Abstract

The application provides an IM message transmission method and a terminal, which belong to the technical field of communication and comprise the following steps: after receiving the merging and forwarding instruction, carrying out serialization processing on the target message to be merged and forwarded according to a protocol agreed with the receiving terminal to obtain serialized data which can be identified by the receiving terminal; generating a communication message containing the serialized data; and sending the communication message carrying the serialized data to a receiving end. According to the method and the device, the target message is serialized into the data which can be identified by the receiving terminal, so that the receiving terminal can restore the original meaning of the target message.

Description

IM message transmission method and terminal
Technical Field
The present application relates to the field of communications technologies, and in particular, to an IM message transmission method and a terminal.
Background
Forwarding IM (Instant Messaging) messages is a common means for information synchronization and information sharing, and is also a common user operation, so the breadth and depth of message forwarding must become the primary considerations.
The existing IM message forwarding methods are generally divided into two categories according to the forwarding direction of the message.
Firstly, in-application forwarding, namely message forwarding between clients of the same application program;
and secondly, external application forwarding, namely message forwarding between clients of different application programs.
However, the prior art has the following problems:
1. the prior art cannot realize the external application forwarding at present.
2. When forwarding is carried out in an application, the message types capable of supporting forwarding are few, and the original message style cannot be restored after forwarding, for example, the emoticons may be displayed instead of characters or pictures after forwarding.
3. When merging and forwarding, generally, data selected by a user is directly merged and then forwarded to a receiving end in the form of a communication message. However, when the receiving end parses the data of the general message, it may not be able to identify the specific meaning of some data, thereby causing an error in the forwarded message. For example: the original message is a structured card, and clicking the structured card can jump to a webpage corresponding to the structured card, but in the prior art, after the original message is combined and forwarded, the structured card is clicked again when a user looks at a history record, and the user cannot jump to the corresponding webpage.
Disclosure of Invention
An object of the embodiments of the present application is to provide an IM message transmission method and a terminal, so as to solve the technical problem that some characteristics are lost after an IM message is forwarded. The specific technical scheme is as follows:
in a first aspect, the present application provides an IM message transmission method, where the method is applied to a sending end of an IM message, and the method includes:
after receiving the merging and forwarding instruction, carrying out serialization processing on a target message to be merged and forwarded according to a protocol agreed with a receiving terminal to obtain serialized data which can be identified by the receiving terminal;
generating a communication message containing the serialized data;
and sending the communication message carrying the serialized data to the receiving end.
Optionally, the serializing the target message to be merged and forwarded according to the communication protocol of the receiving end to obtain the serialized data recognizable by the receiving end includes:
adding target messages needing to be merged and forwarded to a merged forwarding data structure to generate a message list;
and according to a protocol agreed with a receiving end, carrying out serialization processing on the message list to obtain serialized data which can be identified by the receiving end.
Optionally, the adding the target message to be merged and forwarded to the merge-and-forward data structure to generate the message list includes:
judging whether the merging forwarding data structure supports the data type of the target message;
if not, packaging the data type of the target message according to the preset packaging rule of the merged forwarding data;
and generating a message list for each target message according to the original data type of each target message.
Optionally, the serialized data is binary data.
Optionally, the method further comprises:
determining a receiving end corresponding to the target message;
if the sending end and the receiving end are clients of the same application program, executing the step of performing serialization processing on the target message to be combined and forwarded according to a protocol agreed with the receiving end after receiving the combination and forwarding instruction to obtain serialized data which can be identified by the receiving end;
if the sending end and the receiving end are clients of different application programs, after receiving a forwarding instruction, generating a picture containing a target message, and sending the picture to the receiving end.
Optionally, after the generating the picture containing the target message, the method further includes:
and adding preset identification information in the picture, wherein the preset identification information is used for identifying the source of the picture.
In a second aspect, the present application provides an IM message transmission method, where the method is applied to a receiving end of an IM message, and the method includes:
receiving a general message which is sent by a first sending end and carries serialized data, wherein the serialized data is obtained after the first sending end carries out serialization processing according to a protocol agreed with a receiving end;
extracting serialized data in the general message, and performing deserialization on the serialized data according to the agreed protocol to obtain a target message;
and displaying the target message through a display model.
Optionally, the displaying the target message through a display model includes:
detecting whether each message contained in the target message contains a combined forwarding message;
if the target message comprises a combined forwarding message, adding the target message to a first display model for displaying, wherein the first display model is used for displaying the combined forwarding message and a non-combined forwarding message in the target message;
and if the target message does not contain the merged forwarding message, adding the target message to a second display model for displaying, wherein the second display model is used for displaying the non-merged forwarding message in the target message.
Optionally, the method further comprises:
and receiving a picture sent by a second sending end, wherein the picture is generated by combining the forwarded target messages according to the requirements when a receiving end and the second sending end are clients of different application programs.
In a third aspect, a terminal is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of the first or second aspects when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein a computer program which, when executed by a processor, implements any of the method steps of IM message transmission described herein.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the IM messaging methods described above.
The embodiment of the application has the following beneficial effects:
the embodiment of the application provides an IM message forwarding method, which comprises the following steps: after receiving the merging and forwarding instruction, carrying out serialization processing on the target message to be merged and forwarded according to a communication protocol of a receiving end to obtain serialized data which can be identified by the receiving end; generating a communication message containing the serialized data; and sending the communication message carrying the serialized data to a receiving end. According to the method and the device, the target message is serialized into the data which can be identified by the receiving terminal, so that the receiving terminal can restore the original meaning of the target message.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of an IM information transmission system method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an IM information transmission method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a merged forwarding data structure provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data transmission model in a network transmission server according to an embodiment of the present application;
fig. 5 is a flowchart of an IM message transmission method according to another embodiment of the present application;
fig. 6 is a flowchart of an IM message transmission method according to another embodiment of the present application;
fig. 7 is a signaling diagram of an example of an IM message transmission method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an IM message transmission apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an IM message transmission apparatus according to yet another embodiment of the present application;
fig. 10 is a schematic structural diagram of a sending terminal according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a receiving terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides an IM message transmission method, which can be applied to an IM message transmission system. Fig. 1 is a schematic diagram of an IM message transmission system according to an embodiment of the present application. The IM message transmission system can comprise a sending end, a network transmission server and a receiving end. The network transmission server is used for providing a data transmission model for the sending end and the receiving end, and the sending end and the receiving end are respectively connected with an SDK (Software Development Kit) interface of the network transmission server. When the messages are forwarded one by one, the sending end directly transmits the messages according to a data transmission model in the network transmission server. When merging and forwarding, a sending end needs to serialize a plurality of messages to be forwarded and then send the messages to the sending end through a network transmission server for processing. The receiving end is used for receiving the message sent by the sending end and carrying out reduction display. In one example, the network transmission server may be an Tencent cloud, or may be a network transmission server autonomously developed by developers of other IM clouds or a sending end. In one example, the receiving end may be a WeChat client or a stock application client. When a user selects one or more messages to be forwarded on a chat message interface of a sending end, three selection conditions are presented, namely forwarding, merging forwarding and forwarding one by one to a client of an application program different from that of the sending end. The one-by-one forwarding and the combined forwarding are that the sending end forwards the message to the client which is the same application program as the sending end. If the user selects to forward one by one, the sending end directly transmits the message to be forwarded according to the data transmission model in the network transmission server. If the user selects the merging and forwarding, the sending end carries out serialization processing on the data and then transmits the data through the network transmission server. If the user selects to forward the message to the client of the application program different from the client of the sending end, the sending end generates one or more messages to be forwarded into a picture and then sends the picture to the receiving end through the network transmission server.
It should be noted that the receiving end and the sending end may be the same application platform or different application platforms. The application platform refers to an installation carrier or an installation system of a receiving end and a sending end, such as a mobile phone terminal, a tablet terminal, a computer terminal or a Macbook (apple notebook) terminal, an IOS (apple mobile device operating system) system terminal, and an android system terminal.
An IM message method provided in this embodiment is described in detail below with reference to specific embodiments, where the method is applied to a sending end in an IM message transmission system, and as shown in fig. 2, a processing procedure of the method includes the following specific steps:
step S201, after receiving the combining and forwarding instruction, according to a protocol agreed with the receiving end, performing serialization processing on the target message to be combined and forwarded to obtain serialized data that can be recognized by the receiving end.
In the embodiment of the application, when a sending end receives a merging and forwarding instruction input by a user in a chat interface, one or more target messages needing merging and forwarding are subjected to serialization processing. Serialization is the process of converting various data structures into a binary data stream or text stream. The serialized data is convenient to transmit on the network and store on the hard disk. And carrying out serialization processing on the target message to obtain binary data or text data. Binary data or text data is data that does not change in any platform or environmental sense.
In addition, in order to ensure that the receiving end can completely restore the target message when performing the anti-sequence on the received message. When the transmitting end performs serialization processing on a target message to be forwarded, serialization can be performed according to a protocol agreed with the receiving end, for example, serialization is performed according to a Protobuf (prototype) protocol, so that the receiving end can be ensured to analyze data of the transmitting end.
Optionally, the serialized data is binary data. In one example, the target message to be merged and forwarded is subjected to binary serialization processing to obtain binary data. Since binary data is stored in the form of bytes, text data is stored in the form of characters. The storage space of the bytes is small, so that the occupied bandwidth is small, more data can be stored in the limited storage space, and the number of the target messages to be merged and forwarded can be increased.
In the embodiment of the present application, the target message may be one or multiple, and the target message may include multiple message types, such as a video, an expression, a text, or a link.
The target message to be merged and forwarded is usually a plurality of pieces of information, a message list may be generated first, and then serialization processing is performed, so as to facilitate data processing and simplify processing steps, and the specific processing procedure may be: adding target messages needing to be merged and forwarded to a merged forwarding data structure to generate a message list; and according to a protocol agreed with the receiving end, carrying out serialization processing on the message list to obtain serialized data which can be identified by the receiving end.
In the embodiment of the application, a combined forwarding data structure is established first, data of a target message to be forwarded is added to the combined forwarding data structure, and the message list is serialized according to a protocol agreed with a receiving end.
If the types of data structures included in the merged forwarding data structure are few, resulting in a reduction in the types of messages forwarded, the original message pattern may not be restored after the target message is forwarded. For example, the emoticons sent by the sender may be displayed in the form of text or pictures at the receiver. The reason for this is that the merged forwarding data structure does not contain the data structure corresponding to the expression, the data structure corresponding to the expression is converted into a text structure and added to the merged forwarding data structure, and the text structure is obtained after deserialization at the receiving end, and the displayed text is the text. Therefore, in order to increase the types of message forwarding, optionally, adding the target message requiring merge forwarding to the merge forwarding data structure to generate the message list may include: judging whether the merging forwarding data structure supports the data type of the target message; if not, packaging the data type of the target message according to a preset packaging rule of the merged forwarding data; and generating a message list for each target message according to the original data type of each target message. In particular, multiple data types may be added to the consolidated forwarding data structure. In one example, as shown in fig. 3, for the schematic of the merge forwarding data structure, a combinanesharsgmodel is composed of multiple sharemmsg (messages), one sharemmsg may contain multiple msgmodels (message types), and one MsgModel may support multiple data types, for example: ImageMsgmodel (picture message model), RichTextMsgModel (rich text message model), bigmemoticonmsgmodel (large emoji message model), StockMsgModel (stock code message model), and the like. And generating a ShareTMsg list according to the respective data types of the target messages, and carrying out serialization processing on the ShareTMsg list.
In the embodiment of the present application, the original data type of each target message is the data type of the original data, and is not subjected to any conversion. For example, the original data of the text message is text data, the corresponding original data type is a text type, and the text data can be placed in the RichTextMsgModel unit in fig. 3, the original data of the picture message is picture data, and the corresponding original data type is data in a picture format, and the text data can be placed in the ImageMsgmodel unit in fig. 3. The big expression message corresponds to BigEmoticonMsgMode, and the stock code corresponds to StockMsgMode.
Step S202 generates a communication message containing the serialized data.
In the embodiment of the application, the obtained serialized data is stored in the data field of the data transmission model of the network transmission server, so that the communication message containing the serialized data is generated. The serialized data is stored in the data field of the data transmission model of the existing general message, so that the data can be transmitted according to the communication protocol of the data transmission model of the existing message after being packaged. In one example, as shown in fig. 4, it is a schematic structural diagram of a data transmission model of a network transmission server. Serialized data can be deposited into the byte [ ] data (byte data) field in the timustomelem element. And the TIMStatomElem element generates a TIMELEm structure, the TIMELEm structure finally generates a communication message TIMMESSAGE, and the network communication server sends the TIMMESSAGE to the receiving end.
Step S203, sending a communication message carrying the serialized data to the receiving end.
In the embodiment of the application, the sending end sends the communication message to the receiving end through the data transmission model of the network transmission server. The data transmission model must be consistent at both the transmitting and receiving ends.
Optionally, in practical applications, the user may perform merging and forwarding of messages in the application, that is, merge and forwarding messages at the client side of the same application program at the sending end and the receiving end, or may perform merging and forwarding of messages outside the application, that is, when the sending end and the receiving end are client sides of different application programs, for example, the sending end is a stock client side, and the receiving end is a wechat client side. For the above two cases, different manners may be respectively adopted for merging and forwarding, as shown in fig. 5, which specifically includes the following steps.
S501, determining a receiving end corresponding to the target message.
In the embodiment of the application, the sending end determines the receiving end corresponding to the target message through the instruction selected and input by the user on the chat interface. In one example, the sending end is a stock client, the receiving end is a WeChat client, a user pops up a selection interface after selecting one or more target messages, the selection interface comprises a one-by-one forwarding option, a combined forwarding option and a forward to WeChat, if the user selects the one-by-one forwarding option or the combined forwarding option, the sending end and the receiving end are clients of the same application program, and if the user selects the WeChat, the sending end and the receiving end are clients of different application programs.
S502, if the sending end and the receiving end are clients of the same application program, the step of carrying out serialization processing on the target message needing to be combined and forwarded according to a protocol agreed with the receiving end after receiving the combined forwarding instruction to obtain the serialization data which can be identified by the receiving end is carried out.
The processing procedure of this step can refer to the related description of step S201, and is not described herein again.
S503, if the sending end and the receiving end are clients of different application programs, after receiving the forwarding instruction, generating a picture containing the target message, and sending the picture to the receiving end.
In this embodiment of the application, if the sending end and the receiving end are clients of different application programs, after receiving a forwarding instruction input by a user, the sending end generates a picture containing one or more target messages according to a program preset in the sending end, and sends the picture to the receiving end. In one example, when the target message is a plurality of pieces, for example, 10 pieces, the picture may be a long picture. In one example, the preset program may be a screenshot program, that is, a screenshot is performed on an interface including one or more target messages, so as to obtain a picture of the interface including the one or more target messages. According to the method and the device, the target message is forwarded in a cross-application mode in a picture mode, on one hand, the picture can visually display the original state of the target message to the greatest extent, for example, messages such as animation expressions, stock codes and links, and the nature and the state of the message can be displayed in the picture mode; on the other hand, anti-counterfeiting information such as watermarks can be conveniently added to the picture so as to improve information security, for example, logo (mark) of a developer is printed on the picture background.
Optionally, in order to prevent a lawless person from using the picture to perform a fraud or other lawless acts, after the picture containing the target message is generated, preset identification information may be further added to the picture, and the preset identification information is used for identifying the source of the picture.
In this embodiment of the present application, the preset identification information may be a watermark with a logo (trademark) of a sender. By adding watermarks in the pictures, embezzlement is prevented.
The present application also provides an IM message transmission method, which is applied to a receiving end of an IM message, as shown in fig. 6, the method may include the following steps:
s601, receiving a general message which is sent by a first sending end and carries serialized data, wherein the serialized data is obtained after the first sending end carries out serialization processing according to a protocol agreed with a receiving end.
In the embodiment of the application, the receiving end and the first sending end are clients of the same application program, the receiving end receives the general message sent by the first sending end through the network communication server, judges whether the general message comprises the serialized data, directly displays the general message through a display model in the network communication server if the general message does not comprise the serialized data, and executes the following steps if the general message comprises the serialized data.
S602, extracting the serialized data in the general message, and performing deserialization on the serialized data according to a protocol agreed with the first sending terminal to obtain the target message.
In the embodiment of the application, after the receiving end extracts the serialized data from the communication message, the receiving end performs deserialization processing on the serialized data according to the local communication protocol to obtain the target message of the original data structure. Deserialization is the process of converting binary or text data into a data structure that is easy to process and read. In one example, the deserialized target message may be a list of messages that contain consolidated forward messages, emoticons, text, stock codes, and the like. In one example, the receiving end receives the binary data serialized by the sending end, and deserializes the binary data according to the local communication protocol so as to completely restore the meaning of the target message.
And S603, displaying the target message through the display model.
In the embodiment of the application, the receiving end fills the deserialized target message data into the display model, takes a value from the deserialized data, then fills the display model until all the deserialized data are filled into the display model, and finally displays the data through the display model. In one example, the presentation model may be a User-defined UI (User Interface) message model.
Optionally, presenting the target message through the presentation model may include: detecting whether each message contained in the target message contains a combined forwarding message; if the target message comprises the combined forwarding message, adding the target message to a first display model for displaying, wherein the first display model is used for displaying the combined forwarding message and the non-combined forwarding message in the target message; and if the target message does not contain the combined forwarding message, adding the target message to a second display model for displaying, wherein the second display model is used for displaying the non-combined forwarding message in the target message.
In this embodiment of the present application, if the target message of merge forwarding after deserialization at the receiving end includes a nested second-level merge forwarding message, where the second-level merge forwarding message is a merge forwarding message nested in a merge forwarding message, the nested merge forwarding message also needs to be specifically displayed. The merged forwarding message may be displayed through a first display model, and the merged forwarding message nested in the merged forwarding message sent by the sending end may be specifically displayed in the first display model. If the merged forwarding message does not include merged forwarding messages but is forwarded one by one, then the presentation may be performed by a second presentation model.
Optionally, the first presentation model and the second presentation model are one of data models, a data model composed of data structures, the presentation models being used to provide different user presentation interfaces.
Optionally, for a case that the receiving end and the sending end are clients of different applications, the processing procedure of the receiving end may be: and receiving a picture sent by the second sending end, wherein the picture is generated according to the target message which is forwarded as required when the receiving end and the second sending end are clients of different application programs.
In this embodiment, the second sender and the receiver are clients of different applications.
In the embodiment of the application, when the receiving end and the sending end are clients of different application programs, the sending end generates the target message into the picture and sends the picture to the receiving end, and the receiving end directly displays the picture after receiving the picture. Since the picture format is a data format that most of the clients of the application can successfully parse and display, the message can be forwarded across applications by converting the target message into the picture format.
The embodiment of the present application further provides an example of an IM message transmission method, as shown in fig. 7, the specific steps are as follows.
S701, a transmitting end receives a forwarding instruction input by a user.
The forwarding instruction may indicate a target message to be forwarded, a receiving end of the target message, and a forwarding type of the target message.
S702, if the forwarding type is forwarding one by one, the sending end sends the data of the target messages one by one to a data transmission model of the network transmission server.
S703, the network transmission server forwards the received target messages to the first receiving end one by one.
The first receiving end and the sending end are clients of the same application program.
S704, the first receiving end displays the target message according to a display model supported by the network communication server.
S705, if the forwarding type is combining forwarding, the sending end adds a plurality of target messages into a combining forwarding data structure, and performs binary serialization processing on the combining forwarding data structure according to a communication protocol of the first receiving end to obtain binary data.
S706, the sending end adds the binary data to the digital field of the data transmission model of the network transmission server.
S707, the network transmission server sends the communication message carrying the binary data to the first receiving end.
S708, the first receiving end extracts binary data in the communication information, and deserializes the binary data to obtain the target message.
And S709, the first receiving end detects whether the target message contains the combined forwarding message, if so, the target message is displayed through the first display model, and if not, the target message is displayed through the second display model.
And S710, if the forwarding type is forwarding to a second receiving end, the sending end generates a picture from the plurality of target messages.
The second receiving end and the sending end are clients of different application programs.
And S711, the sending end sends the picture to the second receiving end.
And S712, the second receiving end directly displays the picture.
Based on the same technical concept, an embodiment of the present application further provides an IM message transmission apparatus, where the apparatus is applied to a sending end of the IM message, and as shown in fig. 8, the apparatus includes:
a serialization unit 810, configured to, after receiving the merge forwarding instruction, perform serialization processing on the target message that needs to be merged and forwarded according to a communication protocol of the receiving end, to obtain serialized data that can be recognized by the receiving end;
a generating unit 820 configured to generate a communication message containing the serialized data;
a sending unit 830, configured to send a communication message carrying the serialized data to the receiving end.
Based on the same technical concept, an embodiment of the present application further provides an IM message transmission apparatus, where the apparatus is applied to a receiving end of an IM message, as shown in fig. 9, the apparatus includes:
a receiving unit 910, configured to receive a general message carrying serialized data sent by a first sending end, where the serialized data is obtained after the first sending end performs serialization processing according to a communication protocol the same as that of a receiving end;
an extracting unit 920, configured to extract serialized data in the general message, and perform deserialization on the serialized data according to a local communication protocol to obtain a target message;
and a presentation unit 930, configured to present the target message through a presentation model.
Based on the same technical concept, the embodiment of the present invention further provides a sending terminal, as shown in fig. 10, including a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement any step of the IM information transmission method executed by the transmitting end when executing the program stored in the memory 1003.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Based on the same technical concept, the embodiment of the present invention further provides a receiving terminal, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 complete communication with each other through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement any one of the steps of the IM information transmission method executed by the transmitting end when executing the program stored in the memory 1103.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of any one of the IM message transmission methods described above when being executed by a processor.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the IM messaging methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An IM message transmission method, applied to a sending end of the IM message, the method comprising:
after receiving a merging and forwarding instruction for a plurality of pieces of information in a chat interface of a sending end, carrying out serialization processing on target information needing merging and forwarding according to a protocol agreed with a receiving end to obtain serialized data which can be identified by the receiving end; the target message to be merged and forwarded is a plurality of pieces of information, and the target message comprises a plurality of message types;
generating a communication message containing the serialized data;
sending a communication message carrying the serialized data to the receiving end;
the method for obtaining the serialization data recognizable by the receiving end by performing serialization processing on the target message to be combined and forwarded according to the communication protocol of the receiving end comprises the following steps:
adding a target message to be merged and forwarded to a merged forwarding data structure to generate a message list, wherein the merged forwarding data structure supports the addition of multiple data types;
according to a protocol agreed with a receiving end, carrying out serialization processing on the message list to obtain serialized data which can be identified by the receiving end;
adding the target message needing merging and forwarding to a merging and forwarding data structure to generate a message list, wherein the step of adding the target message needing merging and forwarding to the merging and forwarding data structure comprises the following steps:
judging whether the merging forwarding data structure supports the data type of the target message;
if not, packaging the data type of the target message according to the preset packaging rule of the merged forwarding data;
and generating a message list for each target message according to the original data type of each target message.
2. The method of claim 1, wherein the serialized data is binary data.
3. The method of claim 1, further comprising:
determining a receiving end corresponding to the target message;
if the sending end and the receiving end are clients of the same application program, executing the step of performing serialization processing on the target message to be combined and forwarded according to a protocol agreed with the receiving end after receiving the combination and forwarding instruction to obtain serialized data which can be identified by the receiving end;
if the sending end and the receiving end are clients of different application programs, after receiving a forwarding instruction, generating a picture containing a target message, and sending the picture to the receiving end.
4. The method of claim 3, wherein after the generating the picture containing the target message, the method further comprises:
and adding preset identification information in the picture, wherein the preset identification information is used for identifying the source of the picture.
5. An IM message transmission method, which is applied to a receiving end of an IM message, the method comprising:
receiving a general message which is sent by a first sending end and carries serialized data, wherein the serialized data is obtained after the first sending end carries out serialization processing according to a protocol agreed with a receiving end;
extracting serialized data in the general message, and performing deserialization on the serialized data according to the agreed protocol to obtain a target message; the target message comprises a plurality of message types;
displaying the target message through a display model;
the acquisition mode of the serialized data comprises the following steps:
adding a target message to be merged and forwarded to a merged forwarding data structure to generate a message list, wherein the merged forwarding data structure supports the addition of multiple data types;
according to a protocol agreed with a receiving end, carrying out serialization processing on the message list to obtain serialized data which can be identified by the receiving end;
adding the target message needing merging and forwarding to a merging and forwarding data structure to generate a message list, wherein the step of adding the target message needing merging and forwarding to the merging and forwarding data structure comprises the following steps:
judging whether the merging forwarding data structure supports the data type of the target message;
if not, packaging the data type of the target message according to the preset packaging rule of the merged forwarding data;
and generating a message list for each target message according to the original data type of each target message.
6. The method of claim 5, wherein the presenting the target message through a presentation model comprises:
detecting whether each message contained in the target message contains a combined forwarding message;
if the target message comprises a combined forwarding message, adding the target message to a first display model for displaying, wherein the first display model is used for displaying the combined forwarding message and a non-combined forwarding message in the target message;
and if the target message does not contain the merged forwarding message, adding the target message to a second display model for displaying, wherein the second display model is used for displaying the non-merged forwarding message in the target message.
7. The method of claim 5, further comprising:
and receiving a picture sent by a second sending end, wherein the picture is generated by combining the forwarded target messages according to the requirements when a receiving end and the second sending end are clients of different application programs.
8. A terminal is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 4 or claims 5 to 7 when executing a program stored in the memory.
CN201911114684.7A 2019-11-14 2019-11-14 IM message transmission method and terminal Active CN110912803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911114684.7A CN110912803B (en) 2019-11-14 2019-11-14 IM message transmission method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911114684.7A CN110912803B (en) 2019-11-14 2019-11-14 IM message transmission method and terminal

Publications (2)

Publication Number Publication Date
CN110912803A CN110912803A (en) 2020-03-24
CN110912803B true CN110912803B (en) 2022-03-08

Family

ID=69816661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911114684.7A Active CN110912803B (en) 2019-11-14 2019-11-14 IM message transmission method and terminal

Country Status (1)

Country Link
CN (1) CN110912803B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111541662B (en) * 2020-04-15 2022-09-23 赞同科技股份有限公司 Communication method based on binary communication protocol, electronic equipment and storage medium
CN111638978B (en) * 2020-05-20 2023-11-14 北京达佳互联信息技术有限公司 Content sharing method and device
CN112615773B (en) * 2020-12-02 2023-02-28 海南车智易通信息技术有限公司 Message processing method and system
CN115134321A (en) * 2021-03-12 2022-09-30 华为技术有限公司 Message processing method and device
CN115190096B (en) * 2021-03-19 2023-11-21 北京字跳网络技术有限公司 Information processing method, apparatus, electronic device and storage medium
CN113726584A (en) * 2021-09-24 2021-11-30 维沃移动通信有限公司 Message sending method and device and electronic equipment
CN115022269A (en) * 2021-12-30 2022-09-06 北京字跳网络技术有限公司 Message processing method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104724A (en) * 2014-07-23 2014-10-15 深圳市富途网络科技有限公司 Method for pushing operating mode of client side and communication system
CN104780222A (en) * 2015-04-29 2015-07-15 江苏物联网研究发展中心 General data exchange method based on HTTP and object serialization
US9503415B2 (en) * 2011-01-27 2016-11-22 T-Mobile Usa, Inc. Unified notification platform
CN108449262A (en) * 2018-04-08 2018-08-24 成都万维图新信息技术有限公司 A kind of transmission method of instant communication data
CN109831404A (en) * 2017-11-23 2019-05-31 惠州臻享云科技有限公司 A kind of instant communicating system and method for compatible multiple terminals

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584208B2 (en) * 2002-11-20 2009-09-01 Radar Networks, Inc. Methods and systems for managing offers and requests in a network
CN110430126A (en) * 2019-09-02 2019-11-08 江苏满运软件科技有限公司 Instant communication message processing method, device, system, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9503415B2 (en) * 2011-01-27 2016-11-22 T-Mobile Usa, Inc. Unified notification platform
CN104104724A (en) * 2014-07-23 2014-10-15 深圳市富途网络科技有限公司 Method for pushing operating mode of client side and communication system
CN104780222A (en) * 2015-04-29 2015-07-15 江苏物联网研究发展中心 General data exchange method based on HTTP and object serialization
CN109831404A (en) * 2017-11-23 2019-05-31 惠州臻享云科技有限公司 A kind of instant communicating system and method for compatible multiple terminals
CN108449262A (en) * 2018-04-08 2018-08-24 成都万维图新信息技术有限公司 A kind of transmission method of instant communication data

Also Published As

Publication number Publication date
CN110912803A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN110912803B (en) IM message transmission method and terminal
US10613717B2 (en) Reproducing state of source environment when image was screen captured on a different computing device using resource location, resource navigation and positional metadata embedded in image
CN103503020A (en) Making document changes by replying to electronic messages
CN109947408B (en) Message pushing method and device, storage medium and electronic equipment
CN110908967B (en) Method, device, equipment and computer readable medium for storing log
CN110471848B (en) Method and device for dynamically returning message
CN104395881B (en) The expression and conversion of dynamic type array
CN103581249A (en) Information push method, system and client terminal
CN104142975A (en) Microblog information promotion method, device and system
CN108366098B (en) Data interaction method and device for network nodes
CN110120908B (en) Group message processing method and device and server
CN116569159A (en) Automatic depiction and extraction of tabular data in portable document format using a graph neural network
CN111951040A (en) Information sending method and device, electronic equipment and storage medium
CN110198349B (en) File transmission method and device, storage medium and electronic device
CN112347383A (en) Sharing link generation method and device and electronic equipment
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN114039801B (en) Short link generation method, short link analysis system, short link analysis equipment and storage medium
CN114676187A (en) Data processing method, device, equipment and medium
CN113590243A (en) Energy enterprise project creation method and device, computer equipment and medium
CN114138717A (en) Rich text information publishing method and related device
CN112418944A (en) Coupon transfer method and device, electronic equipment and storage medium
US11429671B2 (en) Parser for parsing a user agent string
CN112487765A (en) Method and device for generating notification text
CN106844502B (en) Data consistency processing method and equipment
CN109408762A (en) A kind of method and device of the carrying advertisement in the page

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant