WO2019210574A1 - 消息处理方法、装置、设备及可读存储介质 - Google Patents

消息处理方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2019210574A1
WO2019210574A1 PCT/CN2018/095041 CN2018095041W WO2019210574A1 WO 2019210574 A1 WO2019210574 A1 WO 2019210574A1 CN 2018095041 W CN2018095041 W CN 2018095041W WO 2019210574 A1 WO2019210574 A1 WO 2019210574A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
message packet
server
packet
forwarded
Prior art date
Application number
PCT/CN2018/095041
Other languages
English (en)
French (fr)
Inventor
陈义
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019210574A1 publication Critical patent/WO2019210574A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a message processing method, apparatus, device, and readable storage medium.
  • TCP Transmission Control Protocol
  • the server when the server receives and forwards the real-time message of the client, since the server is forwarded by the millisecond time node in the message, the client is based on the millisecond time.
  • a node displays a message
  • the B, C, and D clients forward different messages to the server.
  • a client if these three messages arrive at the server in the same millisecond, then the server forwards the three messages to the A client, A When the client displays the three messages, it will appear out of order, or the message will be lost without displaying the message, which reduces the user experience to a certain extent.
  • the main purpose of the present invention is to provide a message processing method, apparatus, device, and readable storage medium, which are intended to solve the technical problem that the message is lost or the message is out of order in the existing message receiving and receiving process.
  • the present invention provides a message processing method, where the message processing method includes:
  • the second message packet is forwarded for the receiving client to parse the second message packet, and the second message packet is sequentially displayed based on the parsed time division field.
  • determining whether the server is in a high concurrent state comprises:
  • the number of the to-be-forwarded message associated with the sending client in the preset time period is obtained;
  • the step of obtaining the number of the to-be-forwarded message associated with the sending client includes:
  • determining whether the server is in the high concurrent state step includes:
  • the server When the server is not in the high concurrent state, the current time period information is obtained, and when the current non-busy time period is currently in progress, the first message packet is parsed to obtain the receiving client. Address information;
  • the method further includes:
  • the step of adding a time node to the first message packet to obtain the second message packet includes:
  • the first message packet is added with a time division field with a precision of the nanosecond level to obtain a second message packet.
  • the step of forwarding the second message packet for the receiving client to parse the second message packet includes:
  • the second message packet is forwarded according to the forwarding order, and the receiving client parses the second message packet, and obtains a corresponding timestamp in the second message packet.
  • the present invention also provides a message processing apparatus, the message processing apparatus comprising:
  • the determining module is configured to determine, when receiving the first message sent by the sending client, whether the server is in a high concurrent state;
  • Adding a module when the server is in a high concurrent state, performing a process of adding a time node to the first message packet to obtain a second message packet, where the time node is accurate to be greater than milliseconds
  • the time of the level distinguishes the fields
  • the first forwarding module is configured to forward the second message, so that the receiving client parses the second message, and performs a second message based on the parsed time division field.
  • the text is displayed in succession.
  • the determining module includes:
  • the acquiring unit is configured to: when receiving the first message sent by the sending client, obtain the number of the to-be-forwarded message associated with the sending client in the preset time period;
  • the determining unit is configured to determine whether the number of the to-be-forwarded message is greater than a preset value, and when the number of the to-be-forwarded message is greater than a preset value, determining that the server is in a high concurrent state, where The preset value is determined according to the forwarding rate of the message packet forwarded by the server in a unit time.
  • the obtaining unit includes:
  • Obtaining a sub-unit configured to acquire a first number of the to-be-forwarded message sent by the sending client, and obtain a second number of the to-be-forwarded message received by the sending client, in the preset time period;
  • the message processing device further includes:
  • the obtaining module is configured to: when the server is not in the high concurrent state, obtain the current time period information, and parse the first message when the current non-busy time period is To get the address information of the receiving client;
  • the second forwarding module is configured to forward the first message according to the address information of the receiving client.
  • the obtaining module further includes:
  • the executing sub-module is configured to perform a process of adding a time node to the first message packet to obtain a second message packet when the current busy time period is currently being preset.
  • the adding module further includes:
  • an adding unit configured to add, when the server end is in a high concurrent state, a process of adding a time division field with a precision of a nanosecond level to the first message packet, to obtain a second message packet.
  • the first forwarding module includes:
  • a forwarding order obtaining unit configured to obtain a forwarding order of the second message according to a sequence of time nodes corresponding to the time of the message message to be forwarded by the server;
  • a forwarding unit configured to forward, according to the forwarding order, the second message packet, where the receiving client parses the second message packet, and obtains a corresponding message in the second message packet Timestamp.
  • the present invention further provides a message processing device, the message processing device comprising: a memory, a processor, a communication bus, and a message processing program stored on the memory,
  • the communication bus is used to implement a communication connection between the processor and the memory
  • the processor is configured to execute the message processing program to implement the following steps:
  • the second message packet is forwarded for the receiving client to parse the second message packet, and the second message packet is sequentially displayed based on the parsed time division field.
  • determining whether the server is in a high concurrent state comprises:
  • the number of the to-be-forwarded message associated with the sending client in the preset time period is obtained;
  • the step of obtaining the number of the to-be-forwarded message associated with the sending client includes:
  • determining whether the server is in the high concurrent state step includes:
  • the server When the server is not in the high concurrent state, the current time period information is obtained, and when the current non-busy time period is currently in progress, the first message packet is parsed to obtain the receiving client. Address information;
  • the method further includes:
  • the step of adding a time node to the first message packet to obtain the second message packet includes:
  • the first message packet is added with a time division field with a precision of the nanosecond level to obtain a second message packet.
  • the step of forwarding the second message packet for the receiving client to parse the second message packet includes:
  • the second message packet is forwarded according to the forwarding order, and the receiving client parses the second message packet, and obtains a corresponding timestamp in the second message packet.
  • the present invention also provides a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors Used for:
  • the second message packet is forwarded for the receiving client to parse the second message packet, and the second message packet is sequentially displayed based on the parsed time division field.
  • the present invention determines whether the server is in a high concurrent state when receiving the first message sent by the sending client, and performs a time node on the first message when the server is in the high concurrent state. Adding a process to obtain a second message packet, wherein the time node is a time distinguishing field with an accuracy greater than a millisecond level; forwarding the second message packet for receiving the second message by the client The packet is parsed, and the second message packet is displayed in sequence based on the parsed time division field. The client displays the message by parsing the current timestamp in the message packet. In this embodiment, when the server forwards the message, a time division field with an accuracy greater than a millisecond level is added.
  • the client when the client receives different messages forwarded by the server in the same millisecond, the client can parse the time node of different messages. After that, different messages are displayed in sequence, instead of being displayed in an out-of-order manner or because the message is received in the same millisecond, the partial message is directly discarded, thereby solving the problem that the existing message is easy to be lost or the message is out of order. problem.
  • FIG. 1 is a schematic flowchart of a first embodiment of a message processing method according to the present invention
  • FIG. 2 is a schematic flowchart of a second embodiment of a message processing method according to the present invention.
  • FIG. 3 is a schematic structural diagram of a device in a hardware operating environment involved in a method according to an embodiment of the present invention.
  • the present invention provides a message processing method.
  • the message processing method includes:
  • the server When receiving the first message sent by the sending client, determining whether the server is in a high concurrent state; when the server is in a high concurrent state, performing time node addition processing on the first message packet, Obtaining a second message packet, wherein the time node is a time distinguishing field with a precision greater than a millisecond level; forwarding the second message packet for the receiving client to perform the second message packet Parsing, and based on the parsed time division field, performing sequential display of the second message packet.
  • Step S10 When receiving the first message sent by the sending client, determining whether the server is in a high concurrent state;
  • the message processing method of the present invention is applied to an instant messaging APP application, and the bottom layer is a TCP long connection communication technology.
  • client A sends a message
  • the server receives it, and forwards the message to another client B, or A sends a message
  • the server receives it, and forwards the message to another group of clients.
  • B, C, D, or client B, C, D send messages simultaneously to A, etc., wherein the client parses the timestamp in the message packet as a sequence of sequential display.
  • the timestamp in the message packet is in milliseconds or seconds as the identification unit of the time node.
  • the message sent by the server to forward B is "hello"
  • D is sent last.
  • the message "different” to the A client process if these three messages arrive at the server side in the same millisecond, then the message is forwarded to A
  • the A client may first display the message “different”, then display the message "when”, and finally display or not display the message "hello", which results in a lower user experience.
  • the present invention is to avoid this situation.
  • determining whether the server is in a high concurrent state determines whether the message is to be sent. Further processing to avoid the problem that the server end load is too large due to the further processing of all the message packets.
  • the steps to determine whether the server is in a high concurrent state include:
  • Step S11 when receiving the first message sent by the sending client, acquiring the number of the to-be-forwarded message associated with the sending client in the preset time period;
  • the number of the to-be-forwarded message associated with the sending client is obtained in the preset time period, where the number of the message to be forwarded associated with the sending client is sent.
  • the method includes the following two types, and the step of obtaining the number of to-be-forwarded message messages associated with the sending client includes:
  • step S111 the first number of the to-be-forwarded message sent by the sending client is obtained in a preset time period, and the second number of the to-be-forwarded message received by the sending client is obtained.
  • Step S112 The number of to-be-forwarded message messages associated with the first client and the second number is used as the sending client.
  • the number of the to-be-forwarded message that is sent by the client is the first number of the to-be-forwarded message sent by the sending client that is obtained in the preset time period, and includes the obtained Sending a second number of the to-be-forwarded message received by the client, where the preset time period may be 1 millisecond or 1 second, etc., which is described in the specific embodiment, when the preset time period is 1 second, the sending client
  • the number of to-be-forwarded message messages associated with the A client includes the number of message messages sent by the A client to the clients B, C, and D within 1 second, and the A client is in the A client.
  • the number of message messages sent to the A client by E, F, G, etc. to be received within one second.
  • step S12 it is determined whether the number of the message to be forwarded is greater than a preset value, and when the number of the message to be forwarded is greater than a preset value, determining that the server is in a high concurrent state, wherein the pre- The value is determined according to the forwarding rate of the message packets forwarded by the server in a unit time.
  • the specific example is used to describe that when the forwarding rate of the message packet is greater than the first rate in the unit time, or when the processing speed of the server is greater than the first speed, the preset value is the first preset value.
  • the preset value is the second preset value.
  • Step S20 when the server is in a high concurrent state, performing a process of adding a time node to the first message packet to obtain a second message packet, where the time node is greater than a millisecond level. Time distinguishing fields;
  • the first message packet is parsed, and after the first message packet is parsed, a time node is added to the first message packet to obtain a second message.
  • a message packet wherein the time node is a time division field with an accuracy greater than a millisecond level, and the time division field with a precision greater than a millisecond level may be a time division field of microsecond precision, etc., and it should be noted that, in this implementation
  • the time node is added to the first message to obtain the second message, and the program segment needs to be set in the built-in processor in advance.
  • the segment indicates the processing logic of the first message, and the processing logic is configured to perform time node addition processing on the first message packet to obtain the second message packet when the server is in the high concurrent state.
  • the step of adding a time node to the first message packet to obtain the second message packet includes:
  • step S21 when the server is in the high-concurrency state, the first message packet is added with a time division field with a precision of the nanosecond level to obtain a second message packet.
  • a time division field of a nanosecond level is added to the first message packet to maximize the division of the received message message.
  • Step S30 Forwarding the second message packet, so that the receiving client parses the second message packet, and performing sequential display of the second message packet based on the parsed time division field .
  • the second message packet is forwarded.
  • the forwarding is sequential. The sequence may be determined by different time nodes.
  • the receiving client sends the message to the client.
  • the second message packet is parsed, and the second message packet is sequentially displayed based on the parsed time-differentiated field, such as a timestamp.
  • the present invention determines whether the server is in a high concurrent state when receiving the first message sent by the sending client, and performs a time node on the first message when the server is in the high concurrent state. Adding a process to obtain a second message packet, wherein the time node is a time distinguishing field with an accuracy greater than a millisecond level; forwarding the second message packet for receiving the second message by the client The packet is parsed, and the second message packet is displayed in sequence based on the parsed time division field. The client displays the message by parsing the current timestamp in the message packet. In this embodiment, when the server forwards the message, a time division field with an accuracy greater than a millisecond level is added.
  • the client when the client receives different messages forwarded by the server in the same millisecond, the client can parse the time node of different messages. After that, different messages are displayed in sequence, instead of being displayed in an out-of-order manner or because the message is received in the same millisecond, the partial message is directly discarded, thereby solving the problem that the existing message is easy to be lost or the message is out of order. problem.
  • determining whether the server is in the high concurrent state step includes:
  • step A1 when the server is not in the high concurrent state, the current time period information is obtained, and when the current non-busy time period is currently in progress, the first message packet is parsed and processed to obtain Receiving address information of the client;
  • the server When the server is not in the high concurrent state, the current time period information is obtained, and when the current non-busy time period is currently in progress, the first message packet is parsed to obtain the receiving client.
  • Address information wherein the non-busy time period refers to a time period in which the number of tasks to be processed on the server side is less than the number of preset tasks.
  • the server side can process the to-be-processed tasks in an orderly manner, and thus only needs to The first message packet is parsed to obtain related information such as address information of the receiving client.
  • the step of obtaining the current time period information further includes:
  • step B1 when the current busy time period is currently being performed, the step of adding the time node to the first message packet is performed to obtain the second message packet.
  • the current task to be processed on the server is greater than the number of preset tasks in the busy period.
  • the sequence of time nodes greater than the millisecond level accuracy corresponding to the current message to be forwarded by the server is required.
  • the forwarding order of the second message packet is obtained, instead of the order of the time nodes based on the millisecond level accuracy, so when the current busy time period is currently performed, the first message is executed.
  • the step of adding the time node to obtain the second message message is performed.
  • Step A2 Perform forwarding processing on the first message according to the address information of the receiving client.
  • the first message packet After receiving the related information such as the address information of the client, the first message packet may be forwarded, and the corresponding time node addition process may not be performed.
  • the server when the server is not in the high concurrent state, the current time period information is obtained, and when the current non-busy time period is currently configured, the first message packet is parsed. Processing, to obtain the address information of the receiving client, and performing the forwarding processing on the first message according to the address information of the receiving client.
  • the server when the server is not in the high concurrent state, and is in the preset state, During the non-busy time period, the time of the message packet is not increased, which saves the process and avoids the problem that the server load is too large.
  • the present invention provides another embodiment of the message processing method, in the embodiment, the step of forwarding the second message packet for the receiving client to parse the second message packet include:
  • Step S31 Obtain a forwarding order of the second message according to a sequence of time nodes corresponding to the added time of the message to be forwarded by the server;
  • the server forwards the message, it is not forwarded by the time node based on the accuracy of the millisecond level, but is forwarded based on the time node of the millisecond level accuracy, that is, based on the current forwarding of the server.
  • the message message corresponds to the sequence of the added time nodes, and the forwarding order of the second message message is obtained.
  • step S32 the second message packet is forwarded according to the forwarding order, so that the receiving client parses the second message packet, and obtains a corresponding timestamp in the second message packet.
  • the forwarding order of the second message packet is obtained based on the sequence of the time nodes corresponding to the added time of the message message to be forwarded by the server, and the forwarding order is performed based on the forwarding order.
  • the second message packet is forwarded, and the receiving client parses the second message packet, and obtains a corresponding timestamp in the second message packet.
  • the server can forward the second message in an orderly manner, which lays a foundation for the receiving client to sequentially receive the second message.
  • FIG. 3 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
  • the message processing device in the embodiment of the present invention may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving). Picture Experts Group Audio Layer III, motion picture expert compresses standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) terminal devices such as players and portable computers.
  • MP3 Motion Picture Experts Group Audio Layer III, motion picture expert compresses standard audio layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) terminal devices such as players and portable computers.
  • the message processing device may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between the processor 1001 and the memory 1005.
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the message processing device may further include a target user interface, a network interface, a camera, and an RF (Radio). Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • the target user interface may include a display, an input unit such as a keyboard, and the optional target user interface may also include a standard wired interface, a wireless interface.
  • the network interface can optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
  • the structure of the message processing device shown in FIG. 3 does not constitute a limitation of the message processing device, and may include more or less components than those illustrated, or combine some components, or different components. Arrangement.
  • an operating system As shown in FIG. 3, an operating system, a network communication module, and a message processing program may be included in the memory 1005 as a computer storage medium.
  • An operating system is a program that manages and controls the hardware and software resources of a message processing device, supporting the operation of message handlers and other software and/or programs.
  • the network communication module is used to implement communication between components within the memory 1005 and with other hardware and software in the message processing device.
  • the processor 1001 is configured to execute the message processing program stored in the memory 1005 to implement the steps of the message processing method described in any of the above.
  • the specific embodiment of the message processing device of the present invention is basically the same as the foregoing embodiment of the message processing method, and details are not described herein again.
  • the present invention also provides a message processing apparatus, the message processing apparatus comprising:
  • the determining module is configured to determine, when receiving the first message sent by the sending client, whether the server is in a high concurrent state;
  • Adding a module when the server is in a high concurrent state, performing a process of adding a time node to the first message packet to obtain a second message packet, where the time node is accurate to be greater than milliseconds
  • the time of the level distinguishes the fields
  • a forwarding module configured to forward the second message packet, where the receiving client parses the second message packet, and performs a second message packet based on the parsed time division field Displayed one after another.
  • the specific embodiment of the message processing apparatus of the present invention is basically the same as the foregoing embodiment of the message processing method, and details are not described herein again.
  • the present invention provides a readable storage medium having one or more programs stored thereon, the one or more programs being further executable by one or more processors for implementing any of the above The steps of the message processing method described in the item.

Abstract

本发明公开了一种消息处理方法、装置、设备及可读存储介质,所述消息处理方法包括:当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。本发明解决现有消息收发过程中,易出现丢消息或者消息乱序的技术问题。

Description

消息处理方法、装置、设备及可读存储介质
本申请要求于2018年05月04日提交中国专利局、申请号为201810418220.4、发明名称为“消息处理方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本发明涉及通信技术领域,尤其涉及一种消息处理方法、装置、设备及可读存储介质。
背景技术
目前,在TCP(传输控制协议)技术的各种应用中,当服务端接收并转发客户端的实时消息时,由于是服务器端是以消息中毫秒时间节点进行转发的,因而客户端在基于毫秒时间节点进行消息显示时,有可能出现丢消息假象,例如:B、C、D客户端经由服务器端转发不同消息至 A客户端, 如果这三条消息在都同一毫秒下到了服务器端,那么服务器端将该三条消息转发到A 客户端时,A 客户端显示该三条消息时,就会出现乱序,或者不显示消息即丢消息的现象,这在一定程度上降低了用户的体验。
发明内容
本发明的主要目的在于提供一种消息处理方法、装置、设备及可读存储介质,旨在解决现有消息收发过程中,易出现丢消息或者消息乱序的技术问题。
为实现上述目的,本发明提供一种消息处理方法,所述消息处理方法包括:
当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
可选地,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤包括:
当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目;
判断所述待转发消息报文的数目是否大于预设值,当所述待转发消息报文的数目大于预设值时,判断所述服务器端处于高并发状态,其中,所述预设值根据服务器单位时间内转发消息报文的转发速率确定。
可选地,所述获取所述发送客户端关联的待转发消息报文的数目步骤包括:
在预设时间段内获取所述发送客户端发送的待转发消息报文的第一数目,并获取所述发送客户端接收的待转发消息报文的第二数目;
将所述第一数目与所述第二数目的和作为所述发送客户端关联的待转发消息报文的数目。
可选地,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
可选地,所述获取当前所处的时间段信息步骤之后还包括:
当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
可选地,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
可选地,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序;
基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
本发明还提供一种消息处理装置,所述消息处理装置包括:
判断模块,用于当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
添加模块,用于当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
第一转发模块,用于将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
可选地,所述判断模块包括:
获取单元,用于当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目;
判断单元,用于判断所述待转发消息报文的数目是否大于预设值,当所述待转发消息报文的数目大于预设值时,判断所述服务器端处于高并发状态,其中,所述预设值根据服务器单位时间内转发消息报文的转发速率确定。
可选地,所述获取单元包括:
获取子单元,用于在预设时间段内获取所述发送客户端发送的待转发消息报文的第一数目,并获取所述发送客户端接收的待转发消息报文的第二数目;
确定子单元,用于将所述第一数目与所述第二数目的和作为所述发送客户端关联的待转发消息报文的数目。
可选地,所述消息处理装置还包括:
获取模块,用于当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
第二转发模块,用于基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
可选地,所述获取模块还包括:
执行子模块,用于当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
可选地,所述添加模块还包括:
添加单元,用于当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
可选地,所述第一转发模块包括:
转发次序获取单元,用于基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序;
转发单元,用于基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
此外,为实现上述目的,本发明还提供一种消息处理设备,所述消息处理设备包括:存储器、处理器,通信总线以及存储在所述存储器上的消息处理程序,
所述通信总线用于实现处理器与存储器间的通信连接;
所述处理器用于执行所述消息处理程序,以实现以下步骤:
当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
可选地,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤包括:
当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目;
判断所述待转发消息报文的数目是否大于预设值,当所述待转发消息报文的数目大于预设值时,判断所述服务器端处于高并发状态,其中,所述预设值根据服务器单位时间内转发消息报文的转发速率确定。
可选地,所述获取所述发送客户端关联的待转发消息报文的数目步骤包括:
在预设时间段内获取所述发送客户端发送的待转发消息报文的第一数目,并获取所述发送客户端接收的待转发消息报文的第二数目;
将所述第一数目与所述第二数目的和作为所述发送客户端关联的待转发消息报文的数目。
可选地,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
可选地,所述获取当前所处的时间段信息步骤之后还包括:
当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
可选地,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
可选地,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序;
基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
此外,为实现上述目的,本发明还提供一种可读存储介质,所述可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行以用于:
当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
本发明通过当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。由于客户端是通过解析消息报文中当前时间戳进行消息显示的。在本实施例中,在服务器端转发消息时,增加精确度大于毫秒级别的时间区分字段,因而,客户端在同一毫秒接收到服务器端转发过来的不同消息时,能够在解析不同消息的时间节点后,进行不同消息的先后显示,而不是乱序显示或者由于同一毫秒接收到消息,直接将部分消息进行丢弃处理,因而解决了现有消息收发过程中,易出现丢消息或者消息乱序的技术问题。
附图说明
图1为本发明消息处理方法第一实施例的流程示意图;
图2为本发明消息处理方法第二实施例的流程示意图;
图3是本发明实施例方法涉及的硬件运行环境的设备结构示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种消息处理方法,在本发明消息处理方法的第一实施例中,参照图1,所述消息处理方法包括:
当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
具体步骤如下:
步骤S10,当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态,需要说明的是,本发明消息处理方法应用于即时通讯APP应用,其底层是通过TCP长连接通讯技术,简单的说就是客户端A发送一个消息,服务器端接收它,并将该消息转发至另一客户端B,或者A发送一个消息,服务器端接收它,并将该消息转发至另一群客户端B、C、D,或者客户端 B、C、D同时发送消息转发至 A等,其中,客户端是通过解析消息报文中的时间戳,作为先后显示顺序的,目前,消息报文中时间戳都是以毫秒或者秒作为时间节点的识别单位。因而,在收发消息时,有可能出现丢消息或者消息显示顺序乱序的假象,例如:服务器端在转发B先发送的消息“你好”,C随后发送的消息“什么时候”,D最后发送的消息“不同”给A客户端过程中,如果这三条消息在都同一毫秒下到了服务器端,那么消息转发到A 客户端时,A 客户端可能先显示消息“不同”,后显示消息“什么时候”,最后显示或者不显示消息“你好”,这造成用户体验的降低。本发明是为避免在这种情况。
具体地,在本实施例中,当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态,通过判断服务器端是否处于高并发状态来确定是否对消息报文进行进一步处理,以避免因对所有消息报文的进一步处理所造成的服务器端负载过大的问题,在本实施例中,参照图2,当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤包括:
步骤S11,当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目;
当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目,其中,发送客户端关联的待转发消息报文的数目包括两种数目类型,具体地,所述获取所述发送客户端关联的待转发消息报文的数目步骤包括:
步骤S111,在预设时间段内获取所述发送客户端发送的待转发消息报文的第一数目,并获取所述发送客户端接收的待转发消息报文的第二数目;
步骤S112,将所述第一数目与所述第二数目的和作为所述发送客户端关联的待转发消息报文的数目。
在本实施例中,发送客户端关联的待转发消息报文的数目包括在预设时间段内获取的所述发送客户端发送的待转发消息报文的第一数目,并包括获取的所述发送客户端接收的待转发消息报文的第二数目,其中,预设时间段可是1毫秒或者1秒时间等,用以具体实施例进行说明,当预设时间段为1秒,发送客户端为A客户端时,则A客户端关联的待转发消息报文的数目包括:A客户端在该1秒内发送给客户端B、C、D的消息报文的数目,以及A客户端在该1秒内所要接收的E、F、G等发送给A客户端的消息报文的数目。
步骤S12,判断所述待转发消息报文的数目是否大于预设值,当所述待转发消息报文的数目大于预设值时,判断所述服务器端处于高并发状态,其中,所述预设值根据服务器端单位时间内转发消息报文的转发速率确定。
判断所述待转发消息报文的数目是否大于等于预设值,当所述待转发消息报文的数目大于等于预设值时,判断所述服务器端处于高并发状态,其中,当所述待转发消息报文的数目小于预设值时,判断所述服务器端未处于高并发状态,其中,所述预设值根据服务器端单位时间内转发消息报文的转发速率确定。用以具体实施例进行说明,当服务器端单位时间内转发消息报文的转发速率大于第一速率时,或者服务器端的处理速度大于第一速度时,预设值为第一预设值,当服务器端单位时间内转发消息报文的转发速率大于第二速率时,或者服务器端的处理速度大于第二速度时,预设值为第二预设值。
步骤S20,当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
当所述服务器端处于高并发状态时,解析所述第一消息报文,在解析所述第一消息报文后,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段,该精确度大于毫秒级别的时间区分字段可是微秒精确度的时间区分字段等,需要说明的是,在本实施例中,服务器端要在处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,需要事先在内置的处理器中设置程序段,该程序段表示第一报文消息的处理逻辑,该处理逻辑用于在服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文。
需要说明的是,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
步骤S21,当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
即在本实施例中,当所述服务器端处于高并发状态时,对所述第一消息报文添加纳秒级别的时间区分字段,以最大程度地区分接收的消息报文。
步骤S30,将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
将所述第二消息报文进行转发,在服务器端转发第二消息报文时,转发是有先后顺序的,该先后顺序可以由不同时间节点确定,在转发后,接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段如时间戳,进行第二消息报文的先后显示。
本发明通过当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。由于客户端是通过解析消息报文中当前时间戳进行消息显示的。在本实施例中,在服务器端转发消息时,增加精确度大于毫秒级别的时间区分字段,因而,客户端在同一毫秒接收到服务器端转发过来的不同消息时,能够在解析不同消息的时间节点后,进行不同消息的先后显示,而不是乱序显示或者由于同一毫秒接收到消息,直接将部分消息进行丢弃处理,因而解决了现有消息收发过程中,易出现丢消息或者消息乱序的技术问题。
进一步地,本发明提供消息处理方法的另一实施例,在该实施例中,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
步骤A1,当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息,其中,该非繁忙时间段指的可以是服务器端当前待处理的任务少于预设任务数目的时间段,此时,服务器端能够有序处理该各个待处理任务,因而,只需要对所述第一消息报文进行解析处理,以得到接收客户端的地址信息等相关信息即可。
其中,所述获取当前所处的时间段信息步骤之后还包括:
步骤B1,当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
在本实施例中,由于在繁忙时间段,服务器端当前待处理的任务大于预设任务数目,此时,需要基于当前服务器端待转发消息报文对应的大于毫秒级别精确度的时间节点的先后顺序,得到所述第二消息报文的转发次序,而不是基于毫秒级别精确度的时间节点的先后顺序即可,因而当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
步骤A2,基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
在得到接收客户端的地址信息等相关信息后,对对所述第一消息报文进行转发处理即可,而不需要再进行相应时间节点的添加处理。
在本实施例中,通过当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理,本实施例中在服务器端未处于高并发状态时,且处于预设的非繁忙时间段时,不需要进行消息报文时间节点的增加,节约了流程,避免了可能存在的服务器端负载过大的问题。
进一步地,本发明提供消息处理方法的另一实施例,在该实施例中,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
步骤S31,基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序;
在本实施例中,服务器端转发消息报文时,不再是基于毫秒级别精确度的时间节点进行转发,而是基于毫秒级别精确度的时间节点进行转发,即基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序。
步骤S32,基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳,即是得到所述第二消息报文中对应的时间区分字段,进行第二消息报文的先后显示。
在本实施例中,通过基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序目,得到所述第二消息报文的转发次序;基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。本实施例服务器端能够有序转发第二消息报文,为接收客户端对所述第二消息报文进行顺序接收奠下基础。
参照图3,图3是本发明实施例方案涉及的硬件运行环境的设备结构示意图。
本发明实施例消息处理设备可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等终端设备。
如图3所示,该消息处理设备可以包括:处理器1001,例如CPU,存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。
可选地,该消息处理设备还可以包括目标用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。目标用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选目标用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
本领域技术人员可以理解,图3中示出的消息处理设备结构并不构成对消息处理设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图3所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及消息处理程序。操作系统是管理和控制消息处理设备硬件和软件资源的程序,支持消息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与消息处理设备中其它硬件和软件之间通信。
在图3所示的消息处理设备中,处理器1001用于执行存储器1005中存储的消息处理程序,实现上述任一项所述的消息处理方法的步骤。
本发明消息处理设备具体实施方式与上述消息处理方法各实施例基本相同,在此不再赘述。
本发明还提供一种消息处理装置,所述消息处理装置包括:
判断模块,用于当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
添加模块,用于当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
转发模块,用于将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
本发明消息处理装置具体实施方式与上述消息处理方法各实施例基本相同,在此不再赘述。
本发明提供了一种可读存储介质,所述可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于实现上述任一项所述的消息处理方法的步骤。
本发明可读存储介质具体实施方式与上述消息处理方法各实施例基本相同,在此不再赘述。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利处理范围内

Claims (20)

  1. 一种消息处理方法,其特征在于,所述消息处理方法包括:
    当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
    当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
    将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
  2. 如权利要求1所述的消息处理方法,其特征在于,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤包括:
    当接收到发送客户端发送的第一消息报文时,获取预设时间段内所述发送客户端关联的待转发消息报文的数目;
    判断所述待转发消息报文的数目是否大于预设值,当所述待转发消息报文的数目大于预设值时,判断所述服务器端处于高并发状态,其中,所述预设值根据服务器端单位时间内转发消息报文的转发速率确定。
  3. 如权利要求2所述的消息处理方法,其特征在于,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
    当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
    基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
  4. 如权利要求2所述的消息处理方法,其特征在于,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
    当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
  5. 如权利要求2所述的消息处理方法,其特征在于,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
    基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序,得到所述第二消息报文的转发次序;
    基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
  6. 如权利要求2所述的消息处理方法,其特征在于,所述获取所述发送客户端关联的待转发消息报文的数目步骤包括:
    在预设时间段内获取所述发送客户端发送的待转发消息报文的第一数目,并获取所述发送客户端接收的待转发消息报文的第二数目;
    将所述第一数目与所述第二数目的和作为所述发送客户端关联的待转发消息报文的数目。
  7. 如权利要求6所述的消息处理方法,其特征在于,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
    当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
    基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
  8. 如权利要求6所述的消息处理方法,其特征在于,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
    当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
  9. 如权利要求6所述的消息处理方法,其特征在于,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
    基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序,得到所述第二消息报文的转发次序;
    基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
  10. 如权利要求1所述的消息处理方法,其特征在于,所述当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态步骤之后包括:
    当所述服务器端未处于高并发状态时,获取当前所处的时间段信息,当当前处于预设的非繁忙时间段时,对所述第一消息报文进行解析处理,以得到接收客户端的地址信息;
    基于所述接收客户端的地址信息,对所述第一消息报文进行转发处理。
  11. 如权利要求10所述的消息处理方法,其特征在于,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
    当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
  12. 如权利要求10所述的消息处理方法,其特征在于,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
    基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序,得到所述第二消息报文的转发次序;
    基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
  13. 如权利要求10所述的消息处理方法,其特征在于,所述获取当前所处的时间段信息步骤之后还包括:
    当当前处于预设的繁忙时间段时,执行对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文的步骤。
  14. 如权利要求13所述的消息处理方法,其特征在于,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
    当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
  15. 如权利要求13所述的消息处理方法,其特征在于,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
    基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序,得到所述第二消息报文的转发次序;
    基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
  16. 如权利要求1所述的消息处理方法,其特征在于,所述当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文步骤包括:
    当所述服务器端处于高并发状态时,对所述第一消息报文进行精确度为纳秒级别的时间区分字段的添加处理,以得到第二消息报文。
  17. 如权利要求1所述的消息处理方法,其特征在于,所述将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析步骤包括:
    基于所述服务器端当前待转发消息报文对应增加的时间节点的先后顺序,得到所述第二消息报文的转发次序;
    基于所述转发次序,对所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并得到所述第二消息报文中对应的时间戳。
  18. 一种消息处理装置,其特征在于,所述消息处理装置包括:
    判断模块,用于当接收到发送客户端发送的第一消息报文时,判断服务器端是否处于高并发状态;
    添加模块,用于当所述服务器端处于高并发状态时,对所述第一消息报文进行时间节点的添加处理,以得到第二消息报文,其中,所述时间节点是精确度大于毫秒级别的时间区分字段;
    转发模块,用于将所述第二消息报文进行转发,以供接收客户端对所述第二消息报文进行解析,并基于解析后的所述时间区分字段,进行第二消息报文的先后显示。
  19. 一种消息处理设备,其特征在于,所述消息处理设备包括:存储器、处理器,通信总线以及存储在所述存储器上的消息处理程序,
    所述通信总线用于实现处理器与存储器间的通信连接;
    所述处理器用于执行所述消息处理程序,以实现如权利要求1所述的消息处理方法的步骤。
  20. 一种可读存储介质,其特征在于,所述可读存储介质上存储有消息处理程序,所述消息处理程序被处理器执行时实现如权利要求1所述的消息处理方法的步骤。
PCT/CN2018/095041 2018-05-04 2018-07-09 消息处理方法、装置、设备及可读存储介质 WO2019210574A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810418220.4 2018-05-04
CN201810418220.4A CN109729061B (zh) 2018-05-04 2018-05-04 消息处理方法、装置、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2019210574A1 true WO2019210574A1 (zh) 2019-11-07

Family

ID=66293729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/095041 WO2019210574A1 (zh) 2018-05-04 2018-07-09 消息处理方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN109729061B (zh)
WO (1) WO2019210574A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339628A (zh) * 2021-12-27 2022-04-12 中国农业银行股份有限公司 5g富媒体消息发送方法、设备、存储介质及产品
CN114979264A (zh) * 2022-05-16 2022-08-30 中国银行股份有限公司 金融级消息报文处理方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112968828A (zh) * 2021-03-26 2021-06-15 联仁健康医疗大数据科技股份有限公司 一种聊天消息的显示方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404618A (zh) * 2008-11-04 2009-04-08 中兴通讯股份有限公司 实现精确时钟同步协议中透传时钟的系统、装置及方法
CN102291324A (zh) * 2011-06-28 2011-12-21 北京神州泰岳软件股份有限公司 高并发业务请求处理方法
US20120084377A1 (en) * 2009-06-12 2012-04-05 Hyeonsoo Lee Method and apparatus for keeping orders among messages of discrete media type in cpm session
CN103546824A (zh) * 2013-10-25 2014-01-29 中国科学院声学研究所 流媒体发送速率的控制方法和装置
CN105681160A (zh) * 2014-11-21 2016-06-15 中国移动通信集团公司 一种即时通信系统中纠正会话消息乱序的方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020124104A1 (en) * 2001-03-01 2002-09-05 Yigal Rappaport Network element and a method for preventing a disorder of a sequence of data packets traversing the network
CN101742430A (zh) * 2008-11-20 2010-06-16 华为技术有限公司 数据包处理方法、装置以及基站
CN102938676B (zh) * 2011-08-16 2017-11-10 中兴通讯股份有限公司 时间同步处理方法、装置及系统
CN102368748A (zh) * 2011-09-10 2012-03-07 上海量明科技发展有限公司 即时通信中缓发送信息的方法、客户端及系统
CN102629929B (zh) * 2012-04-18 2015-07-08 华为技术有限公司 一种获取数据的方法、系统及装置
CN105227588A (zh) * 2014-05-28 2016-01-06 中国移动通信集团公司 一种流媒体文件的下载方法及用户终端
CN107465802A (zh) * 2016-06-03 2017-12-12 北京融聚世界网络科技有限公司 一种显示通讯消息的方法、装置和系统
CN105978796A (zh) * 2016-06-28 2016-09-28 乐视控股(北京)有限公司 基于不稳定移动网络的消息通信方法及系统
CN108123866B (zh) * 2016-11-30 2019-01-25 北京云中融信网络科技有限公司 消息传输方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404618A (zh) * 2008-11-04 2009-04-08 中兴通讯股份有限公司 实现精确时钟同步协议中透传时钟的系统、装置及方法
US20120084377A1 (en) * 2009-06-12 2012-04-05 Hyeonsoo Lee Method and apparatus for keeping orders among messages of discrete media type in cpm session
CN102291324A (zh) * 2011-06-28 2011-12-21 北京神州泰岳软件股份有限公司 高并发业务请求处理方法
CN103546824A (zh) * 2013-10-25 2014-01-29 中国科学院声学研究所 流媒体发送速率的控制方法和装置
CN105681160A (zh) * 2014-11-21 2016-06-15 中国移动通信集团公司 一种即时通信系统中纠正会话消息乱序的方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339628A (zh) * 2021-12-27 2022-04-12 中国农业银行股份有限公司 5g富媒体消息发送方法、设备、存储介质及产品
CN114339628B (zh) * 2021-12-27 2023-07-04 中国农业银行股份有限公司 5g富媒体消息发送方法、设备、存储介质及产品
CN114979264A (zh) * 2022-05-16 2022-08-30 中国银行股份有限公司 金融级消息报文处理方法及装置
CN114979264B (zh) * 2022-05-16 2024-04-19 中国银行股份有限公司 金融级消息报文处理方法及装置

Also Published As

Publication number Publication date
CN109729061A (zh) 2019-05-07
CN109729061B (zh) 2021-09-21

Similar Documents

Publication Publication Date Title
WO2016165556A1 (zh) 一种视频流的数据处理方法、装置和系统
WO2019128174A1 (zh) 音频播放方法、智能电视及计算机可读存储介质
WO2018107610A1 (zh) 业务数据处理方法、系统、设备及计算机可读存储介质
WO2014187158A1 (zh) 终端数据云分享的控制方法、服务器及终端
WO2015043120A1 (zh) 云文件分享方法及系统
WO2019210574A1 (zh) 消息处理方法、装置、设备及可读存储介质
WO2017107378A1 (zh) 基于hls流媒体的视频数据加速下载方法及装置
WO2016058258A1 (zh) 终端远程控制方法和系统
WO2017206377A1 (zh) 同步播放节目的方法和装置
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2018023926A1 (zh) 电视与移动终端的互动方法及系统
WO2017121066A1 (zh) 应用程序显示方法和系统
WO2015120774A1 (en) Network access method and apparatus applied to mobile application
WO2019161597A1 (zh) 基于即时通讯的信息发送方法、装置、设备和存储介质
WO2018036057A1 (zh) 软件后台自适应升级方法及装置
WO2016000560A1 (en) File transmission method, file transmission apparatus, and file transmission system
WO2018223602A1 (zh) 显示终端、画面对比度提高方法及计算机可读存储介质
WO2019056733A1 (zh) 并发量控制方法、应用服务器、系统及存储介质
WO2018006581A1 (zh) 智能电视的播放方法及装置
WO2019051901A1 (zh) 终端控制方法、装置及计算机可读存储介质
WO2017084297A1 (zh) 多媒体文件的播放方法及系统
WO2016095256A1 (zh) 智能电视的全局按键处理方法及其系统
WO2017107381A1 (zh) 控制无线热点休眠的方法及智能电视
WO2017071223A1 (zh) 电视应用的控制方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18917225

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18917225

Country of ref document: EP

Kind code of ref document: A1