Message processing method, electronic equipment and storage medium
By obtaining and comparing the actual order and estimated order in the message header, the problem of messy message order in SSE is solved, and the correct judgment and adjustment of the message order is achieved, and the user experience and system stability are improved.
Patent Information
- Application Number
- CN202411239340.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-13
AI Technical Summary
The existing Server-Sent Events (SSE) technology is difficult to tell whether the order of messages is inconsistent, especially when the message processing takes longer or the network fluctuates.
By obtaining the actual order and estimated order in the message header, we can judge whether the order of the message is correct. If it does not match, the order will be disordered, and remediate by adjusting the estimated order until the match is matched to ensure the correctness of the message order.
It effectively solves the problem of messaging order in SSE, ensures the correct order of messages on the client, and improves user experience and system stability.
Smart Images

Figure CN119135651A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a message processing method, an electronic device and a storage medium. Background Art
[0002] In practical applications, Server-Sent Events (SSE) are usually used to build connections between servers and clients. However, SSE uses an asynchronous communication mechanism, so each message sent by the server to the client is processed by the server before being sent to the client. In this way, if a message takes a long time to process or there is a network fluctuation, the message after this message will be sent to the client first, resulting in a disorder in the order of these messages. It is difficult for existing SSE to distinguish whether the order of messages is disordered. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a message processing method, an electronic device and a storage medium, which are used to solve the problem in the prior art that it is difficult for SSE to distinguish whether the order of messages is disordered.
[0004] A first aspect of an embodiment of the present application provides a message processing method, including:
[0005] Obtaining a current message, wherein the current message carries a message header, and the message header includes an actual sequence of a previous message and an estimated sequence of the previous message;
[0006] Determining whether the actual sequence matches the estimated sequence;
[0007] In the case where the actual number does not match the estimated number, it is determined that the order of the current message is out of order.
[0008] Preferably, when the actual number matches the estimated number, the method further comprises: sending the current message to the client.
[0009] Preferably, obtaining the current message specifically includes:
[0010] Obtaining the actual sequence of the previous message from memory;
[0011] Obtaining an estimated order of the previous message by using an estimation algorithm;
[0012] The current message is generated using the actual sequence of the previous message, the estimated sequence of the previous message, and a message body in the current message.
[0013] Preferably, the actual order of the previous message is determined according to the order of requests sent by the client to the server and stored in the memory; and,
[0014] The estimated order of the previous message is estimated based on the number of messages that have been sent to the client.
[0015] Preferably, the message header also includes the actual sequence of the current message; and, in the case where the actual number matches the estimated number, the method further includes: replacing the actual sequence of the previous message stored in the memory with the actual sequence of the current message.
[0016] Preferably, obtaining the current message specifically includes: intercepting a message sent by the server to the client as the current message.
[0017] Preferably, in the case where it is determined that the order of the current message is disordered, the method further includes:
[0018] adjusting the estimated order of the previous message;
[0019] Determining whether the actual sequence and the adjusted estimated sequence match;
[0020] When the actual sequence matches the adjusted estimated sequence, sending the current message to the client; or,
[0021] In the case that the actual order and the adjusted estimated order do not match, the adjusted estimated order is adjusted again, and it is determined whether the actual order and the re-adjusted estimated order match, until the loop termination condition is met, the current message is sent to the client or the sending of the current message to the client is terminated.
[0022] Preferably, when the actual number matches the estimated number, the method further comprises: parsing and obtaining a message body in the current message.
[0023] A second aspect of an embodiment of the present application provides an electronic device, including:
[0024] Memory for storing computer programs;
[0025] A processor is used to execute any one of the methods described in the method embodiments of the present application.
[0026] A third aspect of an embodiment of the present application provides a storage medium, including: a program, which, when executed on an electronic device, enables the electronic device to execute any one of the methods in the method embodiments of the present application.
[0027] By using the method provided in the embodiment of the present application, the current message is first obtained, and the current message carries a message header, and the message header includes the actual sequence of the previous message and the estimated sequence of the previous message, so that it can be determined whether the actual sequence matches the estimated sequence, and when the actual number does not match the estimated number, it can be determined that the sequence of the current message is disordered. Therefore, the method can improve the existing SSE, so as to be used to identify whether the sequence of the current message is disordered, and solve the problems in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application.
[0030] Figure 2 A schematic diagram of a specific structure of a message processing system provided in one embodiment of the present application;
[0031] Figure 3 A schematic diagram of a specific structure of a message processing system provided in another embodiment of the present application;
[0032] Figure 4 A schematic diagram of a specific flow of a message processing method provided in one embodiment of the present application;
[0033] Figure 5 A schematic diagram of the specific structure of a message processing device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.
[0035] As mentioned above, since SSE uses an asynchronous communication mechanism, if the processing of a message takes a long time or there is a network fluctuation, the messages after this message will be sent to the client first, causing the order of these messages to be disordered. The existing SSE is difficult to determine whether the order of messages is disordered.
[0036] In view of this, the embodiments of the present application provide a message processing method, device, electronic device and storage medium, which can be used to solve the technical problem. Figure 1 FIG. 1 is a schematic diagram of a specific structure of an electronic device provided in this embodiment. The electronic device 1 includes: at least one processor 11 and a memory 12. Figure 1 A processor is used as an example. The processor 11 and the memory 12 may be connected via a bus 10, and the memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the embodiment of the present application.
[0037] The electronic device 1 may be a user-side electronic device, such as a user's mobile phone or computer, or a server-side electronic device, such as a server or a node in a server cluster.
[0038] like Figure 2 The specific structural diagram of the message processing system provided by the embodiment of the present application is shown, and the message processing system includes a client 21 and a server 22, and the server 22 may include a server 221. In actual applications, the client 21 and the server 221 can be connected through SSE, for example, the client 21 can send an SSE connection request to the server 221, so that the server 221 can establish an SSE connection with the client 21 based on the SSE connection request, and then based on the SSE connection, the client 21 and the server 221 can communicate. At this time, the method provided by the embodiment of the present application can be executed by the server 221. For example, before the server 221 sends a message (referred to as the current message) to the client 21, it can determine whether the current message is out of order through the method provided by the embodiment of the present application.
[0039] Of course, the method provided in the embodiment of the present application can also be executed by the client 21. For example, after the client 21 receives a message (referred to as the current message) sent by the server 221, it can also use the method provided in the embodiment of the present application to determine whether the current message is out of order.
[0040] It needs to be further explained that if Figure 3 As shown, in Figure 2On the basis of the message processing system shown, the message processing system can further set a message interception unit 222 in the server 22, and the message interception unit 222 is set between the client 21 and the server 221, so that each message sent by the server 221 to the client 21 can be intercepted and obtained by the message interception unit 222, and then the message interception unit 222 executes the method provided in the embodiment of the present application to determine whether the sequence is disordered.
[0041] like Figure 4 The figure is a schematic diagram of a specific flow chart of a message processing method provided in an embodiment of the present application. The method can be performed by Figure 1 The electronic device 1 shown in the figure is used to perform the operation. Here, the electronic device 1 can be used as Figure 3 Taking the message interception unit 222 shown in the figure as an example to execute the method, the method is described, and the method includes the following steps:
[0042] Step S31: Get the current message.
[0043] Among them, combined with the above Figure 3 As shown, the message interception unit 222 is arranged between the client 21 and the server 221, so that the message interception unit 222 can intercept each message sent by the server 221 to the client 21, and each message can be used as the current message, and then the method provided in the embodiment of the present application is used to determine whether the order is disordered. Therefore, the current message can be a message sent by the server 221 to the client 21 and intercepted by the message interception unit 222, so one implementation of step S31 can be that the message interception unit 222 intercepts the message sent by the server 221 to the client 21, and uses the message as the current message.
[0044] It should be noted that in the present application, the message (including the current message) sent by the server 221 to the client 21 includes not only a message body but also a message header. Therefore, the current message includes a message body and a message header, and the message header includes the actual sequence of the previous message and the estimated sequence of the previous message. The actual sequence reflects the sequence number corresponding to the previous message according to the actual sending sequence of each message; the estimated sequence reflects the sequence number corresponding to the previous message according to the estimated sending sequence of each message.
[0045] For example, since SSE uses an asynchronous communication mechanism, the client sends a request to the server. The server obtains the corresponding data (as the message body) based on the request, and then generates a message based on the message header and feeds back the message to the client. In this way, the requests sent by the client to the server have a sending order. Accordingly, according to the asynchronous communication mechanism of SSE, the server also needs to feed back each message according to the sending order. In actual applications, the processing time of each message may be different, and there may be network fluctuations between the server and the client, which may easily lead to the disorder of the order of these messages.
[0046] In addition to the message body, the message in the present application further carries a message header, which includes the actual order of the previous message and the estimated order of the previous message, thereby determining whether the current message is out of order.
[0047] For example, the requests sent by the client to the server are request 1, request 2...request n in order. In this way, the messages that the server needs to return to the client according to the request order are message 1, message 2...message n, among which, the sending order of the corresponding messages according to the request order of the requests sent by the client to the server is the actual order of the messages. For example, the client sends request 4 to the server, and the message corresponding to request 4 is message 4. At this time, the actual order of message 4 is 4.
[0048] Furthermore, the message interception unit can intercept the message 1, message 2…message n, and use each message as the current message. In addition to the message body, the current message also carries a message header, which includes the actual order of the previous message and the estimated order of the previous message. At this time, the actual order of the previous message, that is, the sending order of the previous message corresponding to the request order of each request sent by the client to the server, that is, the actual order of the previous message is determined according to the request order of each request sent by the client to the server. For example, if the current message is message 5, the message header of message 5 includes the actual order of the previous message, that is, the actual order 4 of message 4.
[0049] The estimated order of the previous message can usually be generated by an estimation algorithm, such as counting the number of messages sent to the client, and then estimating the order of the previous message based on the number as the estimated order. For example, according to statistics, the number of messages sent to the client is 6, so the order of the previous message (that is, the estimated order) is 6.
[0050] In actual applications, the message interception unit can intercept the message 1, message 2...message n based on the AOP technology in the SpringBoot framework, wherein the SpringBoot framework is an open source application framework on the Java platform, providing a container with inversion of control characteristics.
[0051] It should be further explained that, in actual reference, each message returned by the server to the client, such as message 1, message 2...message n mentioned above, can be intercepted by a message interception unit and used as the current message respectively. However, this method of intercepting each message can easily lead to a slow response to the client, thereby affecting the user experience. Based on this, another method can also be to pre-set a message interception rate, that is, intercept a certain proportion of messages. The message interception rate can generally be 30%-70%. For example, the message interception rate can be 50%, that is, 50% of the messages are intercepted as the current message. In this way, since only a certain proportion of the messages are intercepted, some messages are not intercepted, thereby improving the response speed to the client and improving the user experience.
[0052] In addition, since the message interception rate has a great impact on the user's experience, if the message interception rate is set too high, it will affect the user experience, but on the other hand, if the message interception rate is set too low, more messages with disordered order may appear. And as mentioned above, usually based on experience, the message interception rate can be in the range of 30%-70%, but considering the user's experience and the possibility of preventing disordered messages, the message interception rate can be dynamically set in the following way.
[0053] Specifically, the message interception rate can be set to a preset value (for example, the preset value can be 50%), so that in the next inspection cycle (for example, the inspection cycle can be 1 week, 1 month, etc.), the user's comment messages are collected. Specifically, after receiving each feedback message, the user can comment, thereby forming a comment message. These comment messages include positive comment messages and negative comment messages, which respectively reflect the user's positive and negative usage experiences. In this way, after collecting the user's comment messages in the next inspection cycle, the proportion of negative comment messages is calculated. If the proportion is greater than 10%, it means that the proportion of negative comment messages is If the rate of negative comment messages is too high, the message interception rate is reduced (for example, the message interception rate is halved), and then the user's comment messages are collected in the next inspection cycle, and the proportion of negative comment messages is calculated again. If the proportion is still greater than 10%, the message interception rate is continued to be reduced; conversely, if the proportion is still less than or equal to 10%, the message interception rate is increased (for example, the message interception rate is multiplied by the amplification factor, and the amplification factor may be 1.1 or 1.2, for example). In this way, the message interception rate is continuously adjusted so that the proportion of negative comment messages continues to approach 10% or fluctuates around 10%, thereby dynamically setting the size of the message interception rate.
[0054] Among them, the reason why the proportion of negative comment messages is compared with 10% and the message interception rate is dynamically adjusted is because according to actual research, if more than 10% of the comment messages are negative comment messages, it means that a large number of users have posted negative comments, and their negative impact is easy to spread. Therefore, it is usually necessary to control the number of negative comment messages to below 10%. Therefore, the method of dynamically setting the message interception rate of this application is mainly used to dynamically set the size of the message interception rate to continuously approach the proportion of negative comment messages to 10% or fluctuate around 10%.
[0055] Step S32: Determine whether the actual order matches the estimated order. If so, execute step S33; if not, execute step S34.
[0056] Step S33: Send the current message to the client.
[0057] Step S34: Determine that the order of the current message is out of order.
[0058] Here, steps S32 to S34 may be collectively explained.
[0059] After the current message is obtained through the above-mentioned step S31, since the message header of the current message includes the actual order of the previous message and the estimated order of the previous message, and the actual order of the previous message is the sending order of the previous message corresponding to the request order of each request sent by the client to the server; and the estimated order of the previous message is generated by an estimation algorithm, in particular, the number of messages sent to the client can be counted to estimate the order; therefore, it can be determined whether the two match, such as whether the two are the same. If they are the same, it means that the two match, and if they are not the same, it means that the two do not match.
[0060] For example, for the previous message, it is the 100th message in the request sequence of the requests sent by the client to the server, so the actual sequence of the previous message is 100; because the server will feedback messages for each request of the client, at this time, if the number of messages sent to the client is 100, then the estimated sequence of the previous message is also 100. At this time, the actual sequence of the previous message is the same as the estimated sequence of the previous message, indicating that the two match; otherwise, the two do not match.
[0061] Therefore, when it is determined that the actual order matches the estimated order, it means that the order estimated by counting the number of messages sent to the client, that is, the estimated order of the previous message, and the sending order of the previous message corresponding to the request order of each request sent by the client to the server match, which means that the current message is not out of order, so step S33 can be executed to send the current message to the client; conversely, when it is determined that the actual order does not match the estimated order, it can be determined that the current message is out of order.
[0062] By using the method provided in the embodiment of the present application, the current message is first obtained, and the current message carries a message header, and the message header includes the actual sequence of the previous message and the estimated sequence of the previous message, so that it can be determined whether the actual sequence matches the estimated sequence, and when the actual number does not match the estimated number, it can be determined that the sequence of the current message is disordered. Therefore, the method can improve the existing SSE, so as to be used to identify whether the sequence of the current message is disordered, and solve the problems in the prior art.
[0063] It is necessary to further explain that, Figure 4 In the example shown, Figure 3 The method is described in detail with the message interception unit 222 shown in FIG. 1 . In actual application, the method can also be performed with Figure 3 The client 21 or server 221 shown is used for execution.
[0064] For example, if the method is executed by client 21, step S31 may be that client 21 can obtain the current message sent by server 221, and then determine whether the actual order matches the estimated order, and if the actual number and the estimated number do not match, it can be determined that the order of the current message is disordered, and the current message can be discarded; conversely, if client 21 determines that the actual number and the estimated number match, it can further parse and obtain the message body in the current message.
[0065] For another example, if the method is executed by server 221, step S31 may be that server 221 generates the current message. Specifically, the actual sequence of the previous message may be obtained from the memory, and then the estimated sequence of the previous message may be obtained by using the estimation algorithm, and then the actual sequence of the previous message, the estimated sequence of the previous message, and the message body in the current message may be used to generate the current message. Of course, server 221 generates the current message and then further executes the subsequent steps of the method.
[0066] It should be further explained that the message header may also include the actual order of the current message. Similarly, the actual order of the current message is the order of sending the current message corresponding to the request order of each request sent by the client to the server. For example, the order of sending the previous message can be determined according to the request order of each request sent by the client to the server as the actual order of the current message, and then the actual order of the current message and the actual order of the previous message and the estimated order of the previous message are encapsulated as the message header of the current message, so that the message header includes the actual order of the current message. And, in the above-mentioned step S32, when it is determined that the actual number and the estimated number match, the method also includes: replacing the actual order of the previous message stored in the memory with the actual order of the current message, so that in the sending of the next message of the current message, it is determined whether the actual order of the current message matches the estimated order of the current message. At this time, the current message is also the previous message for the next message.
[0067] In addition, if the method of the present application is executed by the client 21, when it is determined that the order of the current message is disordered, the current message can usually be discarded; but if the method of the present application is executed by the server 221, when it is determined that the order of the current message is disordered, remedial processing will usually be performed. Specifically, the following loop method can be executed to perform remedial work: the estimated order of the previous message can be adjusted first, and then it is determined whether the actual order of the previous message matches the adjusted estimated order. If the actual order matches the adjusted estimated order, the current message can be sent to the client; or, if the actual order does not match the adjusted estimated order, the previous message can be adjusted again. The adjusted estimated order, and determine whether the actual order matches the estimated order after the adjustment again. If they match, the current message can be sent to the client. If they still do not match, the estimated order of the previous message can be adjusted further, and then the actual order of the previous message can be determined to determine whether the adjusted estimated order matches. This cycle is repeated until the cycle termination condition is met. For example, the cycle termination condition can include that the actual order of the previous message matches the estimated order after a certain adjustment, and the current message can be sent to the client accordingly. The cycle termination condition can also include that the number of cycles reaches a preset threshold, at which time the current message can be terminated from being sent to the client.
[0068] Of course, if the sending of the current message to the client is terminated, a prompt message may be sent to the client, so that the client resends the request to the server according to the prompt of the prompt message.
[0069] The above is a specific description of the method provided in the embodiment of the present application. For ease of understanding, the method can be further described here in conjunction with a specific example. In the method, the method is executed by the server. At this time, the client first sends an SSE connection request to the server, thereby requesting an SSE connection, so that the server can establish an SSE connection with the client based on the SSE connection request.
[0070] After establishing the SSE connection with the client, the server can obtain each request sent by the client, and then generate corresponding messages and provide feedback to the client. At this time, each message can be used as the current message, and the method provided in the embodiment of the present application can be executed to determine whether the current message is out of order.
[0071] Specifically, in response to the client's request, the server can obtain the actual order of the previous message from the memory, estimate the estimated order of the previous message based on the counted number of messages that have been sent to the client, and determine the sending order of the current message (as the actual order of the current message) based on the request order of each request sent by the client to the server, and then generate the current message using the actual order of the previous message, the estimated order of the previous message, the actual order of the current message, and the message body in the current message; before sending the current message to the client, it can be determined whether the actual order of the previous message matches the estimated order of the previous message. If so, it is sent to the client, and the actual order of the current message replaces the actual order of the previous message stored in the memory; otherwise, if they do not match, remedial processing can be performed, wherein the specific method of the remedial processing has been explained in other parts of the specification and will not be repeated here.
[0072] Based on the same inventive concept as the message processing method provided in the embodiment of the present application, the embodiment of the present application also provides a message processing device. If there is any unclear point, please refer to the corresponding content of the method embodiment. Figure 5 FIG. 4 is a schematic diagram of a specific structure of the device 40, which includes an acquisition unit 401, a judgment unit 402 and a determination unit 403, wherein:
[0073] An acquisition unit 401 is used to acquire a current message, where the current message carries a message header, and the message header includes an actual sequence of a previous message and an estimated sequence of the previous message;
[0074] A judging unit 402 is used to judge whether the actual sequence matches the estimated sequence;
[0075] The determining unit 403 never determines that the sequence of the current message is out of order when the actual number and the estimated number do not match.
[0076] The device 40 provided in the embodiment of the present application is adopted. Since the device 40 adopts the same inventive concept as the method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 40 can also solve the technical problem, which will not be repeated here.
[0077] Wherein, when the actual number matches the estimated number, the device 40 may further include a sending unit configured to send the current message to the client.
[0078] Wherein, obtaining the current message may specifically include:
[0079] Obtaining the actual sequence of the previous message from memory;
[0080] Obtaining an estimated order of the previous message by using an estimation algorithm;
[0081] The current message is generated using the actual sequence of the previous message, the estimated sequence of the previous message, and a message body in the current message.
[0082] The actual order of the previous message is determined according to the order of requests sent by the client to the server and stored in the memory; and
[0083] The estimated order of the previous message is estimated based on the number of messages that have been sent to the client.
[0084] In which, the message header also includes the actual order of the current message; and, when the actual number matches the estimated number, the device 40 may also include a storage unit for replacing the actual order of the previous message stored in the memory with the actual order of the current message.
[0085] Wherein, obtaining the current message may specifically include: intercepting a message sent by the server to the client as the current message.
[0086] Among them, when it is determined that the order of the current message is disordered, the device 40 may also include an adjustment unit for adjusting the estimated order of the previous message; judging whether the actual order and the adjusted estimated order match; when the actual order and the adjusted estimated order match, sending the current message to the client; or, when the actual order and the adjusted estimated order do not match, adjusting the adjusted estimated order again, and judging whether the actual order and the re-adjusted estimated order match, until the loop termination condition is met, sending the current message to the client or terminating sending the current message to the client.
[0087] The device 40 may further include a parsing unit, configured to parse and obtain a message body in the current message when the actual number matches the estimated number.
[0088] The embodiment of the present invention further provides a storage medium, including: a program, which, when running on an electronic device, enables the electronic device to execute all or part of the process of the method in the above embodiment. The storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD). The storage medium may also include a combination of the above types of memories.
[0089] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A message processing method, characterized in that: include: Obtaining a current message, wherein the current message carries a message header, and the message header includes an actual sequence of a previous message and an estimated sequence of the previous message; Determining whether the actual sequence matches the estimated sequence; In the case where the actual number does not match the estimated number, it is determined that the order of the current message is out of order.
2. The method according to claim 1, characterized in that In the case that the actual number matches the estimated number, the method further includes: sending the current message to the client.
3. The method according to claim 2, characterized in that Get the current message, including: Obtaining the actual sequence of the previous message from memory; Obtaining an estimated order of the previous message by using an estimation algorithm; The current message is generated using the actual sequence of the previous message, the estimated sequence of the previous message, and a message body in the current message.
4. The method according to claim 3, characterized in that The actual order of the previous message is determined according to the order of requests sent by the client to the server and stored in the memory; and, The estimated order of the previous message is estimated based on the number of messages that have been sent to the client.
5. The method according to claim 1, characterized in that The message header also includes the actual sequence of the current message; and, in the case where the actual number matches the estimated number, the method further includes: replacing the actual sequence of the previous message stored in the memory with the actual sequence of the current message.
6. The method according to claim 1, characterized in that Acquiring the current message specifically includes: intercepting a message sent by the server to the client as the current message.
7. The method according to claim 1, characterized in that In the case where it is determined that the order of the current message is disordered, the method further includes: adjusting the estimated order of the previous message; Determining whether the actual sequence and the adjusted estimated sequence match; When the actual sequence matches the adjusted estimated sequence, sending the current message to the client; or, In the case that the actual order and the adjusted estimated order do not match, the adjusted estimated order is adjusted again, and it is determined whether the actual order and the re-adjusted estimated order match, until the loop termination condition is met, the current message is sent to the client or the sending of the current message to the client is terminated.
8. The method according to claim 1, characterized in that In the case where the actual number matches the estimated number, the method further includes: parsing and obtaining a message body in the current message.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The invention comprises: a program, which, when running on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 8.
