Message display method and device, computer readable storage medium and terminal equipment
By recording the message reception time in the terminal device and cacheing high-frequency messages, delaying the display of aggregated messages, the problem of message overload is solved, and user experience and device efficiency are improved.
Patent Information
- Application Number
- CN202310676006.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
The existing message display method will cause messages to be overloaded when the terminal device receives high-frequency messages, affecting the user experience.
By recording the reception time of the target message, and when the time interval between the reception time and the predecessor message reception time is less than or equal to the preset interval threshold, the target message is cached to the cache message sequence, and when the time interval is greater than the threshold value, the cache is displayed Message aggregation results in aggregated messages, delaying display to reduce message overload.
It effectively reduces the load of terminal devices, reduces message overload, improves user experience, and simplifies user message viewing through aggregated message processing, improving the efficiency of message display.
Smart Images

Figure CN119109899A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a message display method, device, computer-readable storage medium and terminal device. Background Art
[0002] The terminal device can usually communicate with the server to provide better services to the user. In the process of information interaction between the terminal device and the server, the terminal device can receive various messages sent by the server and display the messages on the client.
[0003] However, the existing message display method directly displays any message received from the server. When receiving messages sent by the server at a high frequency, the terminal device may face a high load and message overload, resulting in a poor user experience. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a message display method, apparatus, computer-readable storage medium and terminal device to solve the problem that the message display method in the prior art directly displays any received message, causing the terminal device to be overloaded with messages when receiving high-frequency messages, resulting in a poor user experience.
[0005] A first aspect of an embodiment of the present application provides a message display method, which may include:
[0006] Receive the target message and record the target receiving time;
[0007] When the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold, the target message is cached in a cache message sequence; wherein the previous message is the last message displayed;
[0008] When the time interval between the current moment and the moment when the preceding message is received is greater than the interval threshold, an aggregate message is displayed; wherein the aggregate message is obtained by aggregating the individual cached messages in the cached message sequence.
[0009] Through the above method, when the target receiving time is close to the receiving time of the previous message, the message display can be delayed, and when the message is displayed, the aggregated message obtained by aggregating each cached message can be displayed. This can effectively reduce the load of the terminal device when receiving high-frequency messages, reduce the occurrence of message overload, and improve the user experience.
[0010] In a specific implementation manner of the first aspect, when the time interval between the target reception time and the previous message reception time is less than or equal to the interval threshold, after caching the target message in the cache message sequence, the method may further include:
[0011] Message aggregation processing is performed on each cached message in the cached message sequence to obtain the aggregated message.
[0012] Through the above method, after the target message is cached into the cache message sequence, each cached message in the cache message sequence can be aggregated to obtain an aggregated message. The aggregated message can be displayed when the message is displayed. Compared with directly displaying each cached message in the cache message sequence, the number of message displays can be reduced, which helps to reduce message overload and improve user experience.
[0013] In a specific implementation manner of the first aspect, when the time interval between the current moment and the moment when the preceding message is received is greater than the interval threshold, before displaying the aggregate message, the method may further include:
[0014] Message aggregation processing is performed on each cached message in the cached message sequence to obtain the aggregated message.
[0015] Through the above method, before displaying the messages, each cached message in the cached message sequence can be aggregated to obtain an aggregated message, and the aggregated message can be displayed when displaying the messages. Compared with directly displaying each cached message in the cached message sequence, the number of message displays can be reduced, which helps to reduce message overload and improve user experience.
[0016] In a specific implementation of the first aspect, the aggregate message may include a progress aggregation sub-message;
[0017] The performing message aggregation processing on each cached message in the cached message sequence to obtain the aggregated message may include:
[0018] Perform progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message.
[0019] Through the above method, progress aggregation sub-messages can be displayed when displaying aggregate messages, which greatly facilitates users to view messages, reflects user-friendliness, and helps to improve user experience.
[0020] In a specific implementation of the first aspect, the aggregate message may include a result aggregate sub-message;
[0021] The performing message aggregation processing on each cached message in the cached message sequence to obtain the aggregated message may include:
[0022] Perform result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message.
[0023] Through the above method, the result aggregated sub-messages can be displayed when displaying the aggregated message, which greatly facilitates the user to view the message, reflects the user-friendliness, and helps to improve the user experience.
[0024] In a specific implementation of the first aspect, performing progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message may include:
[0025] Respectively obtain the progress sub-message corresponding to each cache message in the cache message sequence;
[0026] Progress aggregation processing is performed according to the progress sub-messages corresponding to each cache message to obtain the progress aggregation sub-message.
[0027] Through the above method, progress aggregation processing can be performed on the progress sub-messages corresponding to each cached message in the cached message sequence to obtain progress aggregation sub-messages. The progress aggregation sub-messages can be displayed when displaying messages. Compared with displaying the progress sub-messages corresponding to each cached message in turn, the user's acquisition efficiency of the progress sub-messages corresponding to each cached message is improved, which helps to further improve the user experience.
[0028] In a specific implementation of the first aspect, performing result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message may include:
[0029] Respectively obtain result sub-messages corresponding to each cached message in the cached message sequence;
[0030] Result aggregation processing is performed according to the result sub-messages corresponding to each cache message to obtain the result aggregation sub-message.
[0031] Through the above method, the result sub-messages corresponding to each cached message in the cached message sequence can be processed with progress results to obtain result aggregate sub-messages. The result aggregate sub-messages can be displayed when displaying messages. Compared with displaying the result sub-messages corresponding to each cached message in sequence, the user's efficiency in obtaining the result sub-messages corresponding to each cached message is improved, which helps to further improve the user experience.
[0032] In a specific implementation manner of the first aspect, after displaying the aggregated message, the method may further include:
[0033] Clear the cached message sequence.
[0034] Through the above method, after each cached message in the cached message sequence is displayed through the aggregated message, the cached message sequence can be cleared, so that after the subsequent message is received, it can continue to be cached to the cached message sequence through the above method, so that the method can be continuously applied to scenarios where message display is required, which helps to improve the user experience in the long term.
[0035] In a specific implementation manner of the first aspect, after displaying the aggregated message, the method may further include:
[0036] The preceding message reception time is updated to the reception time of the last buffered message buffered in the buffered message sequence.
[0037] Through the above method, the time when the previous message is received can be updated after the message is displayed. The timing of the message display of the subsequently received messages can be determined according to the updated time when the previous message is received, so that this method can be continuously applied to scenarios where message display is required, which helps to improve the user experience in the long run.
[0038] In a specific implementation of the first aspect, after receiving the target message and recording the target receiving time, the method may further include:
[0039] When the time interval between the target reception time and the preceding message reception time is greater than the interval threshold, the target message is displayed.
[0040] Through the above method, when the time interval between the target reception time and the previous message reception time is greater than the interval threshold, the target message can be displayed without delay. In the scenario where low-frequency messages are received, the messages can be displayed in real time, thereby improving the flexibility of the message display method.
[0041] In a specific implementation manner of the first aspect, after displaying the target message, the method may further include:
[0042] The preceding message receiving time is updated to the target receiving time.
[0043] Through the above method, the previous message reception time can be updated to the target reception time, so that the method can be continuously applied to scenarios where message display is required, which helps to improve user experience in the long term.
[0044] A second aspect of an embodiment of the present application provides a message display device, which may include:
[0045] A message receiving module, used to receive a target message and record the target receiving time;
[0046] A message caching module, configured to cache the target message into a cache message sequence when the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold; wherein the previous message is the last message displayed;
[0047] A message display module is used to display an aggregate message when the time interval between the current moment and the moment when the preceding message is received is greater than the interval threshold; wherein the aggregate message is obtained by aggregating the individual cached messages in the cached message sequence.
[0048] Through the above-mentioned device, when the target receiving time is close to the receiving time of the previous message, the message display can be delayed, and when the message is displayed, the aggregated message obtained by aggregating each cached message can be displayed. This can effectively reduce the load of the terminal device when receiving high-frequency messages, reduce the occurrence of message overload, and improve the user experience.
[0049] In a specific implementation of the second aspect, the message display device may further include:
[0050] The message aggregation module is used to perform message aggregation processing on each cache message in the cache message sequence to obtain the aggregated message.
[0051] Through the above-mentioned device, after the target message is cached into the cache message sequence, each cached message in the cache message sequence can be aggregated to obtain an aggregated message. The aggregated message can be displayed when the message is displayed. Compared with directly displaying each cached message in the cache message sequence, the number of message displays can be reduced, which helps to reduce message overload and improve user experience.
[0052] In a specific implementation of the second aspect, the aggregate message may include a progress aggregation sub-message;
[0053] The message aggregation module may include:
[0054] The progress aggregation unit is used to perform progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message.
[0055] Through the above device, progress aggregation sub-messages can be displayed when displaying aggregate messages, which greatly facilitates users to view messages, reflects user-friendliness, and helps to improve user experience.
[0056] In a specific implementation of the second aspect, the aggregate message may include a result aggregate sub-message;
[0057] The message aggregation module may include:
[0058] The result aggregation unit is used to perform result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message.
[0059] Through the above device, the result aggregated sub-messages can be displayed when displaying the aggregated message, which greatly facilitates the user to view the message, reflects the user-friendliness, and helps to improve the user experience.
[0060] In a specific implementation of the second aspect, the progress aggregation unit may include:
[0061] A message acquisition subunit, used to respectively acquire the progress sub-message corresponding to each cached message in the cached message sequence;
[0062] The aggregation processing subunit is used to perform progress aggregation processing according to the progress sub-messages corresponding to each cache message to obtain the progress aggregation sub-message.
[0063] Through the above-mentioned device, progress aggregation processing can be performed on the progress sub-messages corresponding to each cached message in the cached message sequence to obtain progress aggregation sub-messages. The progress aggregation sub-messages can be displayed when displaying messages. Compared with displaying the progress sub-messages corresponding to each cached message in turn, the user's acquisition efficiency of the progress sub-messages corresponding to each cached message is improved, which helps to further improve the user experience.
[0064] In a specific implementation of the second aspect, the result aggregation unit may include:
[0065] A message acquisition subunit, used to respectively acquire result sub-messages corresponding to each cached message in the cached message sequence;
[0066] The aggregation processing subunit is used to perform result aggregation processing according to the result sub-messages corresponding to each cache message to obtain the result aggregation sub-message.
[0067] Through the above-mentioned device, progress result processing can be performed on the result sub-messages corresponding to each cached message in the cached message sequence to obtain a result aggregate sub-message. The result aggregate sub-message can be displayed when the message is displayed. Compared with displaying the result sub-messages corresponding to each cached message in sequence, the user's efficiency in obtaining the result sub-messages corresponding to each cached message is improved, which helps to further improve the user experience.
[0068] In a specific implementation of the second aspect, the message display device may further include:
[0069] A sequence clearing module is used to clear the cached message sequence.
[0070] Through the above-mentioned device, after each cached message in the cached message sequence is displayed through the aggregated message, the cached message sequence can be cleared, so that after the subsequent message is received, it can continue to be cached to the cached message sequence through the above-mentioned method, so that the device can be continuously used in scenarios where message display is required, which helps to improve the user experience in the long term.
[0071] In a specific implementation of the second aspect, the message display device may further include:
[0072] The time updating module is used to update the reception time of the preceding message to the reception time of the last cached message cached in the cached message sequence.
[0073] Through the above-mentioned device, the time when the previous message is received can be updated after the message is displayed, and the timing of the message display of the subsequently received message can be determined according to the updated time when the previous message is received, so that the device can be continuously used in scenarios where message display is required, which helps to improve the user experience in the long term.
[0074] In a specific implementation of the second aspect, the message display device may further include:
[0075] The message display module is used to display the target message when the time interval between the target reception time and the previous message reception time is greater than the interval threshold.
[0076] Through the above-mentioned device, when the time interval between the target reception time and the previous message reception time is greater than the interval threshold, the target message can be displayed without delay. In the scenario where low-frequency messages are received, the message display can be performed in real time, thereby improving the flexibility of the message display device.
[0077] In a specific implementation of the second aspect, the message display device may further include:
[0078] The time update module is used to update the previous message reception time to the target reception time. Through the above device, the previous message reception time can be updated to the target reception time, so that the device can be continuously applied to the scene where message display is required, which helps to improve the user experience in the long term.
[0079] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned message display methods are implemented.
[0080] The fourth aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned message display methods when executing the computer program.
[0081] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the steps of any one of the above-mentioned message display methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0083] Figure 1 It is a schematic diagram of the application scenario of the message display method;
[0084] Figure 2 This is a flow chart of an embodiment of a message display method in an embodiment of the present application;
[0085] Figure 3 A first schematic diagram of the processing progress of each processing node;
[0086] Figure 4 A second schematic diagram of the processing progress of each processing node;
[0087] Figure 5 The first schematic diagram of the message display process;
[0088] Figure 6 A second schematic diagram of the message display process;
[0089] Figure 7 The third schematic diagram of the message display process;
[0090] Figure 8 A fourth schematic diagram of the message display process;
[0091] Fig. 9 A fifth schematic diagram of the message display process;
[0092] Fig.10 This is a structural diagram of an embodiment of a message display device in an embodiment of the present application;
[0093] Fig.11 This is a schematic block diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0094] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0095] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0096] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0097] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0098] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0099] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0100] The terminal device can usually communicate with the server to provide better services to the user. In the process of information interaction between the terminal device and the server, the terminal device can receive various messages sent by the server and display the messages on the client.
[0101] However, the existing message display method directly displays any message received from the server. When receiving messages sent by the server at a high frequency, the terminal device may face a high load and message overload, resulting in a poor user experience.
[0102] In view of this, the embodiments of the present application provide a message display method, device, computer-readable storage medium and terminal device. Through the embodiments of the present application, when the target reception time is close to the reception time of the previous message, the message display can be delayed, and when the message is displayed, the aggregated message obtained by aggregating various cached messages can be displayed, so that when high-frequency messages are received, the load of the terminal device can be effectively reduced, and the occurrence of message overload can be reduced, so as to improve the user experience.
[0103] It should be noted that the execution subject of the method of the present application may be a terminal device, specifically, may include but is not limited to desktop computers, notebooks, PDAs and other computing devices.
[0104] It is understandable that the method of the present application can be applied to the message display scenario of the terminal device. Before the terminal device receives the message sent by the server, the server can process the relevant data file to obtain the message to be displayed. For example, refer to Figure 1 In an application scenario where offline measurement data of a battery pack is processed, a battery management system (BMS) can measure battery data such as voltage, current and temperature of the battery pack, and send the obtained offline measurement data file of the battery pack to a server; after receiving the offline measurement data file of the battery pack, the server can sequentially perform multiple node processing such as file upload processing, file parsing processing, data cleaning processing, algorithm processing and alarm processing, and the processing result of each processing node can be sent to a terminal device through a corresponding message and displayed on a client installed on the terminal device; since the time interval between the reception time of a message currently received by the terminal device and the reception time of a recently displayed message may be small, directly displaying the message may cause a message overload on the terminal device. Therefore, in an embodiment of the present application, when the time interval between the reception time of a message currently received and the reception time of a displayed message is less than or equal to a preset interval threshold, the message can be displayed with a delay to reduce the occurrence of message overload.
[0105] Figure 2 A message display method provided in an embodiment of the present application is shown, which may specifically include the following steps:
[0106] Step S201, receiving a target message and recording the target receiving time.
[0107] In the embodiment of the present application, the terminal device can receive the message sent by the server and record the receiving time of the message. For the convenience of description, the currently received message can be recorded as the target message, and the receiving time of the target message can be recorded as the target receiving time.
[0108] Specifically, the terminal device may establish a communication connection with the server in advance, and then the terminal device may receive a message sent by the server, and obtain the message sent by the server by parsing the message.
[0109] It is understandable that if the time interval between the target reception time and the reception time (recorded as the previous message reception time) of the last message displayed (recorded as the previous message) is small, message overload may occur. In order to reduce the probability of message overload, all messages received within a period of time after the previous message reception time can be delayed for display, and the length of this period of time can be represented by an interval threshold. Specifically, after receiving the target message, it can be determined whether the time interval between the target reception time and the previous message reception time is less than or equal to the preset interval threshold, wherein the interval threshold can be specific and situationally set according to the actual resource situation of the terminal device. If the time interval between the target reception time and the previous message reception time is less than or equal to the preset interval threshold, step S202 is executed to delay the display of the target message.
[0110] It can be understood that when the time interval between the target reception time and the previous message reception time is greater than the interval threshold, it can be considered that the frequency of messages received by the terminal device is not high and the probability of message overload is small. At this time, the target message can be displayed directly without delaying the display of the target message.
[0111] Step S202: When the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold, cache the target message in a cache message sequence.
[0112] In an embodiment of the present application, when the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold, it can be considered that the messages received by the terminal device are relatively frequent. At this time, the target message can be cached to a cached message sequence to delay the display of the target message, wherein the cached message in the cached message sequence is a message that needs to be delayed in display.
[0113] It is understandable that the messages received within a period of time after the previous message is received can be aggregated, and the aggregated message can be displayed after the period of time. Specifically, the time interval between the current moment and the previous message reception moment can be determined, and if the time interval is greater than the interval threshold, step S203 can be executed to display the aggregated message obtained by aggregating the cached messages in the cached message sequence.
[0114] Step S203: When the time interval between the current time and the time when the previous message is received is greater than the interval threshold, the aggregated message is displayed.
[0115] In an embodiment of the present application, if the time interval between the current moment and the moment when the previous message was received is greater than the interval threshold, an aggregated message obtained by aggregating the individual cached messages in the cached message sequence can be displayed. Compared with directly displaying the individual cached messages in the cached message sequence, it greatly facilitates users to view messages, reflects user-friendliness, and helps to improve user experience.
[0116] It should be noted that in the embodiments of the present application, the timing of message aggregation processing can be set in a specific and situational manner according to actual conditions, including but not limited to performing message aggregation processing on each cached message in the cached message sequence after the target message is cached into the cached message sequence when the time interval between the target reception time and the previous message reception time is less than or equal to the interval threshold, and performing message aggregation processing on each cached message in the cached message sequence before displaying the aggregated message when the time interval between the current time and the previous message reception time is greater than the interval threshold.
[0117] In a possible embodiment, when the time interval between the target reception time and the previous message reception time is less than or equal to the interval threshold, after caching the target message into the cache message sequence, message aggregation processing can be directly performed on each cache message in the cache message sequence to obtain an aggregate message, and when the time interval between the current time and the previous message reception time is greater than the interval threshold, the aggregate message can be displayed.
[0118] In another possible embodiment, only when the time interval between the current moment and the moment when the previous message is received is greater than the interval threshold, the cached messages in the cached message sequence are aggregated to obtain the aggregated message, and then the aggregated message is displayed.
[0119] In an embodiment of the present application, each cached message in a cached message sequence may include a progress sub-message and / or a result sub-message, wherein the progress sub-message may be used to indicate a processing progress, and the result sub-message may be used to indicate a processing result. Therefore, when performing message aggregation processing on each cached message, the progress sub-message and / or result sub-message of each cached message may be aggregated.
[0120] Specifically, the progress sub-messages corresponding to the respective cached messages in the cached message sequence may be obtained respectively, and then progress aggregation processing may be performed according to the progress sub-messages corresponding to the respective cached messages to obtain the progress aggregation sub-messages.
[0121] It can be understood that each cache message in the cache message sequence can correspond to a preset progress sub-message. The terminal device can parse the received message to obtain the progress sub-message corresponding to the cache message, and perform progress aggregation processing according to the progress sub-messages corresponding to each cache message to obtain a progress aggregation sub-message.
[0122] Taking the application scenario of displaying the offline measurement data of the battery pack as an example, after the offline measurement data file is sent to the server, it needs to go through five processing nodes, namely file upload processing, file parsing processing, data cleaning processing, algorithm processing and warning processing. According to the preset progress sub-message allocation method, the corresponding processing progress can be set for each processing node, and the progress sub-message corresponding to each processing node can be used to indicate the processing progress of the processing node. For example, please refer to Figure 3 , the processing progress corresponding to each processing node can be set according to the number of processing nodes. It can be obtained that the processing progress corresponding to the file upload processing node after the file upload is completed is 20%, the processing progress corresponding to the file parsing processing node after the file parsing is completed is 40%, the processing progress corresponding to the data cleaning processing node after the data cleaning is completed is 60%, the processing progress corresponding to the algorithm processing node after the algorithm processing is completed is 80%, and the processing progress corresponding to the warning processing node after the warning processing is completed is 100%; if the last cached message in the cached message sequence is the message corresponding to the algorithm processing node, the processing progress corresponding to the algorithm processing node can be used as the processing progress indicated by the progress aggregation sub-message; if the processing result of the algorithm processing node is that the algorithm processing is completed, the processing progress indicated by the progress aggregation sub-message is the processing progress corresponding to the completion of the algorithm processing, that is, 80%; if the processing result of the algorithm processing node is that the algorithm processing fails, the processing progress indicated by the progress aggregation sub-message is the processing progress corresponding to the previous processing node of the algorithm processing node, that is, 60% of the processing progress corresponding to the completion of data cleaning in the data cleaning processing node. For another example, please refer to Figure 4, the processing progress corresponding to the processing node can be set according to the average time consumed by the processing node. If the average time consumed by the processing process of the five processing nodes is 5 seconds, 10 seconds, 5 seconds, 15 seconds and 5 seconds respectively, the processing progress corresponding to the five processing nodes can be set to 12.5%, 37.5%, 50%, 87.5% and 100% respectively. If the last cached message in the cached message sequence is the message corresponding to the algorithm processing node, the processing progress corresponding to the algorithm processing node can be used as the processing progress indicated by the progress aggregation sub-message; if the processing result of the algorithm processing node is that the algorithm processing is completed, the processing progress indicated by the progress aggregation sub-message is 87.5% of the corresponding processing progress after the algorithm processing is completed; if the processing result of the algorithm processing node is that the algorithm processing fails, the processing progress indicated by the progress aggregation sub-message is the processing progress corresponding to the previous processing node of the algorithm processing node, that is, 50% of the corresponding processing progress after the data cleaning is completed in the data cleaning processing node.
[0123] In an embodiment of the present application, the result sub-messages corresponding to each cached message in the cached message sequence may be obtained respectively, and then result aggregation processing may be performed according to the result sub-messages corresponding to each cached message to obtain a result aggregation sub-message.
[0124] It can be understood that each cache message in the cache message sequence can correspond to a preset result sub-message. The terminal device can parse the received message to obtain the result sub-message corresponding to each cache message, and can perform result aggregation processing based on the result sub-message corresponding to each cache message to obtain a progress aggregation sub-message.
[0125] Continuing to take the application scenario of displaying the offline measurement data of the battery pack as an example, the result sub-messages corresponding to the five processing nodes can be file upload completed or file upload failed, file parsing completed or file parsing failed, data cleaning completed or data cleaning failed, algorithm processing completed or algorithm processing failed, alarm processing completed or alarm processing failed; when the result sub-messages of the five processing nodes are aggregated, the result sub-message corresponding to the last cache message in the cache message sequence can be used as the result aggregation sub-message. For example, if the last cache message in the cache message sequence is the cache message corresponding to the algorithm processing node, and the result sub-message corresponding to the algorithm processing is the completion of the algorithm processing, then the completion of the algorithm processing can be used as the result aggregation sub-message. In addition, if a processing node fails to process, the subsequent processing will not continue, and there will be no processing results of the subsequent processing nodes. For example, if the processing result of the data cleaning processing node is data cleaning failure, the subsequent processing of the two processing nodes of algorithm processing and alarm processing will not be performed, and there will be no processing results of the algorithm processing node and the alarm processing node.
[0126] It should be noted that if the number of cached messages in the cached message sequence is 1, that is, there is only one cached message in the cached message sequence, then there is no need to perform message aggregation processing.
[0127] It is understandable that if the terminal device receives messages at a low frequency, message overload usually does not occur, and the message display can be performed directly without delay. In the embodiment of the present application, if there is no preceding message, that is, there is no message displayed before the target message, the target message can be displayed directly, and the target message can be used as a preceding message of the subsequently received message.
[0128] It is understandable that in order to enable the above method to be continuously applied to scenarios where message display is required, in the embodiment of the present application, the reception time of the preceding message can be updated after the message is displayed. Specifically, if an aggregate message is displayed, the reception time of the preceding message can be updated to the reception time of the last cached message cached in the cached message sequence after the aggregate message is displayed; if a target message is displayed, the reception time of the preceding message can be updated to the target reception time.
[0129] In an embodiment of the present application, after displaying the aggregated message, the cached message sequence can also be cleared so that after the subsequent message is received, the cached message sequence can continue to be cached through the above method, so that the method can be continuously applied to scenarios where message display is required, which helps to improve the user experience in the long term.
[0130] To facilitate understanding, the message display method provided in the embodiment of the present application will be described below in conjunction with specific application scenarios.
[0131] The server can send the message processed by the processing node to the terminal device. After the terminal device receives the message sent by the server for the first time (recorded as the first message), it can use the first message as the target message and the reception time of the first message as the target reception time. Since there is no displayed message on the client installed on the terminal device, that is, there is no previous message reception time corresponding to the previous message, the target message can be directly displayed at this time, and the previous message reception time can be updated to the target reception time. For details, please refer to Figure 5 ; Afterwards, the terminal device receives the message sent by the server again (recorded as the second message). At this time, the second message can be used as the target message, and the receiving time of the second message is used as the target receiving time. Since the time interval between the target receiving time and the receiving time of the previous message is less than the preset interval threshold, it can be considered that the messages received by the terminal device are relatively frequent. At this time, the target message can be cached in the cached message sequence. For details, please refer to Figure 6; Afterwards, the terminal device receives the message sent by the server again (recorded as the third message). At this time, the third message can be used as the target message, and the receiving time of the third message can be used as the target receiving time. Since the time interval between the receiving time of the target message and the receiving time of the previous message is also less than the interval threshold, the target message can also be cached in the cache message sequence. For details, please refer to Figure 7 ; After a period of time, the time interval between the current moment and the moment when the previous message is received is greater than the interval threshold. At this time, the second message and the third message in the cached message sequence can be aggregated to obtain a first aggregated message obtained by aggregating the second message and the third message, and the first aggregated message is displayed. After that, the moment when the previous message is received can be updated to the moment when the last cached message (i.e., the third message) in the cached message sequence is received, and the cached message sequence is cleared. For details, please refer to Figure 8 ; Afterwards, the terminal device receives the message sent by the server again (recorded as the fourth message). At this time, the fourth message can be used as the target message, and the receiving time of the fourth message is used as the target receiving time. Since the time interval between the target receiving time and the receiving time of the previous message is greater than the interval threshold, the target message can be directly displayed at this time, and the receiving time of the previous message is updated to the target receiving time. For details, please refer to Fig. 9 ; Repeat the above process to continuously display the messages sent by the server.
[0132] It is understandable that after the message is displayed, the user can view the aggregated message through a client installed on the terminal device.
[0133] In summary, in the embodiment of the present application, when the time interval between the target reception time and the previous message reception time is less than or equal to the preset interval threshold, the target message can be cached; and when the time interval between the current time and the previous message reception time is greater than the interval threshold, the aggregated message obtained by aggregating the various cached messages is displayed. Through the above method, when the target reception time is close to the previous message reception time, the message display can be delayed, and when the message is displayed, the aggregated message obtained by aggregating the various cached messages can be displayed, so that when high-frequency messages are received, the load of the terminal device can be effectively reduced, and the occurrence of message overload can be reduced to improve the user experience.
[0134] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0135] Corresponding to a message display method described in the above embodiment, Fig.10A structural diagram of an embodiment of a message display device provided in an embodiment of the present application is shown.
[0136] In an embodiment of the present application, a message display device may include:
[0137] The message receiving module 1001 is used to receive a target message and record the target receiving time;
[0138] The message caching module 1002 is used to cache the target message into a cached message sequence when the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold; wherein the previous message is the last message displayed;
[0139] The message display module 1003 is used to display the aggregate message when the time interval between the current time and the time when the previous message is received is greater than the interval threshold.
[0140] In a specific implementation of the embodiment of the present application, the message display device may further include:
[0141] The message aggregation module is used to perform message aggregation processing on each cache message in the cache message sequence to obtain the aggregated message.
[0142] In a specific implementation of the embodiment of the present application, the aggregate message may include a progress aggregation sub-message;
[0143] The message aggregation module may include:
[0144] The progress aggregation unit is used to perform progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message.
[0145] In a specific implementation of the embodiment of the present application, the aggregate message may include a result aggregate sub-message;
[0146] The message aggregation module may include:
[0147] The result aggregation unit is used to perform result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message.
[0148] In a specific implementation of the embodiment of the present application, the progress aggregation unit may include:
[0149] A message acquisition subunit, used to respectively acquire the progress sub-message corresponding to each cached message in the cached message sequence;
[0150] The aggregation processing subunit is used to perform progress aggregation processing according to the progress sub-messages corresponding to each cache message to obtain the progress aggregation sub-message.
[0151] In a specific implementation of the embodiment of the present application, the result aggregation unit may include:
[0152] A message acquisition subunit, used to respectively acquire result sub-messages corresponding to each cached message in the cached message sequence;
[0153] The aggregation processing subunit is used to perform result aggregation processing according to the result sub-messages corresponding to each cache message to obtain the result aggregation sub-message.
[0154] In a specific implementation of the embodiment of the present application, the message display device may further include:
[0155] A sequence status module is used to clear the cached message sequence.
[0156] In a specific implementation of the embodiment of the present application, the message display device may further include:
[0157] The time updating module is used to update the reception time of the preceding message to the reception time of the last cached message cached in the cached message sequence.
[0158] In a specific implementation of the embodiment of the present application, the message display device may further include:
[0159] The message display module is used to display the target message when the time interval between the target reception time and the previous message reception time is greater than the interval threshold.
[0160] In a specific implementation of the embodiment of the present application, the message display device may further include:
[0161] The time updating module is used to update the reception time of the preceding message to the target reception time.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Fig.11A schematic block diagram of a terminal device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0165] like Fig.11 As shown, the terminal device 11 of this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110. When the processor 110 executes the computer program 112, the steps in the above-mentioned message display method embodiments are implemented, for example Figure 2 Alternatively, when the processor 110 executes the computer program 112, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.10 The functions of the message receiving module 1001 to the message display module 1003 are shown.
[0166] Exemplarily, the computer program 112 may be divided into one or more modules / units, which are stored in the memory 111 and executed by the processor 110 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 112 in the terminal device 11.
[0167] Those skilled in the art will understand that Fig.11 It is only an example of the terminal device 11 and does not constitute a limitation of the terminal device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 11 may also include input and output devices, network access devices, buses, etc.
[0168] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0169] The memory 111 may be an internal storage unit of the terminal device 11, such as a hard disk or memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 11. Further, the memory 111 may also include both an internal storage unit of the terminal device 11 and an external storage device. The memory 111 is used to store the computer program and other programs and data required by the terminal device 11. The memory 111 may also be used to temporarily store data that has been output or is to be output.
[0170] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0173] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0176] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0177] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A message display method, characterized in that: include: Receive the target message and record the target receiving time; When the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold, the target message is cached in a cache message sequence; wherein the previous message is the last message displayed; When the time interval between the current moment and the moment when the preceding message is received is greater than the interval threshold, an aggregate message is displayed; wherein the aggregate message is obtained by aggregating the individual cached messages in the cached message sequence.
2. The message display method according to claim 1, characterized in that: In a case where the time interval between the target reception time and the preceding message reception time is less than or equal to the interval threshold, after caching the target message into the cache message sequence, the method further includes: Message aggregation processing is performed on each cached message in the cached message sequence to obtain the aggregated message.
3. The message display method according to claim 1, characterized in that: When the time interval between the current time and the time when the preceding message is received is greater than the interval threshold, before displaying the aggregate message, the method further includes: Message aggregation processing is performed on each cached message in the cached message sequence to obtain the aggregated message.
4. The message display method according to claim 2 or 3, characterized in that: The aggregate message includes a progress aggregate sub-message; The performing message aggregation processing on each cached message in the cached message sequence to obtain the aggregated message includes: Perform progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message.
5. The message display method according to claim 2 or 3, characterized in that: The aggregate message includes a result aggregate sub-message; The performing message aggregation processing on each cached message in the cached message sequence to obtain the aggregated message includes: Perform result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message.
6. The message display method according to claim 4, characterized in that: The step of performing progress aggregation processing on each cache message in the cache message sequence to obtain the progress aggregation sub-message includes: Respectively obtain the progress sub-message corresponding to each cache message in the cache message sequence; Progress aggregation processing is performed according to the progress sub-messages corresponding to each cache message to obtain the progress aggregation sub-message.
7. The message display method according to claim 5, characterized in that: The step of performing result aggregation processing on each cache message in the cache message sequence to obtain the result aggregation sub-message includes: Respectively obtain result sub-messages corresponding to each cached message in the cached message sequence; Result aggregation processing is performed according to the result sub-messages corresponding to each cache message to obtain the result aggregation sub-message.
8. The message display method according to any one of claims 1 to 7, characterized in that: After displaying the aggregated message, it also includes: Clear the cached message sequence.
9. The message display method according to any one of claims 1 to 7, characterized in that: After displaying the aggregated message, it also includes: The preceding message reception time is updated to the reception time of the last buffered message buffered in the buffered message sequence.
10. The message display method according to any one of claims 1 to 9, characterized in that: After receiving the target message and recording the target reception time, it also includes: When the time interval between the target reception time and the preceding message reception time is greater than the interval threshold, the target message is displayed.
11. The message display method according to claim 10, characterized in that: After displaying the target message, the method further includes: The preceding message receiving time is updated to the target receiving time.
12. A message display device, characterized in that: include: A message receiving module, used to receive a target message and record the target receiving time; A message caching module, configured to cache the target message into a cache message sequence when the time interval between the target reception time and the previous message reception time is less than or equal to a preset interval threshold; wherein the previous message is the last message displayed; A message display module is used to display an aggregate message when the time interval between the current moment and the moment when the preceding message is received is greater than the interval threshold; wherein the aggregate message is obtained by aggregating the individual cached messages in the cached message sequence.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the message display method according to any one of claims 1 to 11 are implemented.
14. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the message display method according to any one of claims 1 to 11 are implemented.
