Marquee message processing method, device, electronic device and storage medium
By monitoring and adjusting the total display time of the marquee play queue, redundant messages are deleted or the display time is shortened, the problem of delayed display timing of marquee messages is solved, and timely display of messages and timeliness guarantees are achieved.
Patent Information
- Application Number
- CN202211486761.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-11-24
AI Technical Summary
In the prior art, when marquee messages accumulate in the play queue, the display timing of subsequent messages is too slow, delaying normal display, and causing the audience to miss important notifications.
By obtaining the total display time of the current marquee play queue, if the threshold is exceeded, the queue will be deleted by the previous redundant messages, or the message display time will be shortened to ensure that the messages in the queue can be displayed in a timely manner.
Without affecting the normal display of the marquee, the display timing of subsequent messages is advanced, ensuring the timeliness of the marquee messages and allowing users to view updated messages in a timely manner.
Smart Images

Figure CN115996207B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network live broadcasting, and in particular to a method, device, electronic device and computer-readable storage medium for processing marquee messages. Background Art
[0002] With the development of online live broadcast technology, various applications such as short videos and live broadcasts provide users with live broadcast related services. When there are messages such as lucky draws and user upgrades in the live broadcast room, they will be displayed in the live broadcast room in the form of a marquee. As a message display method in the live broadcast room, the marquee uses a marquee playback queue to display the marquee messages in order.
[0003] However, in the ticker message processing solution provided in the current technology, when too many ticker messages are accumulated in the ticker playback queue and displayed in sequence, the subsequent ticker message display timing will be too slow, delaying the normal display of the subsequent ticker messages, causing the audience to miss the ticker notification messages, and is not conducive to the display of timely ticker messages. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, electronic device and storage medium for processing a marquee message in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for processing a marquee message. The method comprises:
[0006] Get the total display time of the current first ticker play queue;
[0007] If the total display time of the first ticker play queue is greater than the total display time threshold, the first ticker play queue is subjected to a deletion process of the previous redundant ticker messages to obtain a second ticker play queue;
[0008] If the total display duration of the second marquee playback queue is greater than the total display duration threshold, the display duration of the marquee message of the second marquee playback queue is shortened according to the total display duration threshold to obtain a third marquee playback queue.
[0009] In a second aspect, the present application provides a marquee message processing device. The device comprises:
[0010] The duration acquisition module is used to obtain the total display duration of the current first ticker playback queue;
[0011] a message deletion module, configured to delete the previous redundant marquee messages of the first marquee playback queue to obtain a second marquee playback queue if the total display time of the first marquee playback queue is greater than a total display time threshold;
[0012] The duration shortening module is used to shorten the display duration of the second marquee playback queue according to the total display duration threshold if the total display duration of the second marquee playback queue is greater than the total display duration threshold, so as to obtain a third marquee playback queue.
[0013] In a third aspect, the present application provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0014] Get the total display time of the current first marquee playback queue; if the total display time of the first marquee playback queue is greater than the total display time threshold, delete the previous redundant marquee messages of the first marquee playback queue to obtain the second marquee playback queue; if the total display time of the second marquee playback queue is greater than the total display time threshold, shorten the display time of the marquee messages of the second marquee playback queue according to the total display time threshold to obtain the third marquee playback queue.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0016] Get the total display time of the current first marquee playback queue; if the total display time of the first marquee playback queue is greater than the total display time threshold, delete the previous redundant marquee messages of the first marquee playback queue to obtain the second marquee playback queue; if the total display time of the second marquee playback queue is greater than the total display time threshold, shorten the display time of the marquee messages of the second marquee playback queue according to the total display time threshold to obtain the third marquee playback queue.
[0017] The above-mentioned method, device, electronic device and storage medium for processing marquee messages obtain the total display time of the current first marquee playback queue. If the total display time is greater than the total display time threshold, the first marquee playback queue is subjected to deletion processing of the previously redundant marquee messages to obtain a second marquee playback queue. If the total display time of the second marquee playback queue is still greater than the aforementioned total display time threshold, the second marquee playback queue is further subjected to shortening processing of the marquee message display time according to the total display time threshold to obtain a third marquee playback queue. When the total display time of the current first marquee playback queue is greater than the total display time threshold, this scheme first deletes the previous redundant marquee messages to delete the repeated and redundant marquee messages in the queue to obtain the second marquee playback queue. If the total display time of the second marquee playback queue is still greater than the total display time threshold, the marquee message display time is shortened to shorten the display time of the marquee messages in the queue to obtain the third marquee playback queue. By deleting the repeated and redundant marquee messages and shortening the display time of the marquee messages, the display timing of the subsequent latest marquee messages can be advanced without affecting the normal display of the marquee, thereby ensuring the timeliness of the display of the marquee messages and allowing users to view the updated marquee messages as soon as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is an application environment diagram of the method for processing a marquee message in an embodiment of the present application;
[0019] Figure 2 This is a flow chart of a method for processing a marquee message in an embodiment of the present application;
[0020] Figure 3 This is a flowchart of a method for processing a marquee message in a specific example of this application;
[0021] Figure 4 This is a flowchart of deleting the previous redundant ticker message in the specific example of this application;
[0022] Figure 5 A schematic diagram of a process for shortening the display duration of a ticker message in an embodiment of the present application;
[0023] Figure 6 A flowchart of shortening the display time of a marquee message in a specific example of this application;
[0024] Figure 7 This is a structural block diagram of a marquee message processing device in an embodiment of the present application;
[0025] Figure 8 Schematic diagram of the internal structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0027] The method for processing a marquee message provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the application environment may include a terminal and a server. The terminal may communicate with the server via the Internet. Specifically, the terminal may be a terminal of a viewer in a live broadcast room. The server may be a live broadcast server. The server may provide live broadcast related services for the terminal. In the live broadcast room, when there are marquee messages such as lucky draws and user upgrades, the server may send the marquee message to the terminal. The terminal will add the message to a marquee playback queue and display the marquee messages in sequence. Among them, in actual scenarios such as the live broadcast room of a big anchor or the annual ceremony played in the live broadcast room, a large number of marquee messages may need to be displayed in a short period of time. However, the marquee message processing scheme provided by the current technology, the marquee messages that are displayed in sequence in the marquee playback queue will cause the subsequent marquee display timing to be too slow, delaying the normal display of the subsequent marquee, which is extremely unfavorable for some time-sensitive marquee messages, causing the audience to miss the marquee notification message. In this regard, the marquee message processing method provided by the present application may be provided by the following method: Figure 1 The terminal execution shown is based on the current marquee playback queue. By deleting repeated and redundant previous marquee messages and shortening the display time of the marquee messages, the display timing of subsequent marquee messages can be advanced without affecting the normal display of the marquee, thereby ensuring the timeliness of the display of the marquee messages and allowing the audience in the live broadcast room to view the updated marquee messages as soon as possible.
[0028] In such Figure 1 In the application environment shown, the terminal may be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers, and the server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0029] The following describes the marquee message processing method of the present application in combination with various embodiments and corresponding drawings.
[0030] In one embodiment, Figure 2 As shown, a method for processing a marquee message is provided, the method comprising: Figure 1 In the embodiment, the method may include the following steps:
[0031] Step S201, obtaining the total display duration of the current first ticker play queue.
[0032] In this step, specifically, when the terminal receives a new marquee message sent by the server, the new marquee message can be added to the marquee playback queue, and the marquee playback queue to which the new marquee message is added is recorded as the current first marquee playback queue. At this time, the terminal can detect the current first marquee playback queue to obtain the total display time of the current first marquee playback queue, and the total display time is the sum of the message display time of each marquee message contained in the current first marquee playback queue. Therefore, when the terminal detects the current first marquee playback queue, it can obtain the message display time of each marquee message in the current first marquee playback queue one by one. The message display time of the marquee message is the display time of the marquee message in the live broadcast room. The display time of each marquee message may be different, which depends on the specific business and can be 3 seconds, 5 seconds or 6 seconds, etc. Then the terminal sums the message display time of each marquee message in the current first marquee playback queue to obtain the total display time of the current first marquee playback queue.
[0033] Step S202: If the total display time of the first ticker play queue is greater than the total display time threshold, the first ticker play queue is subjected to deletion processing of the previous redundant ticker messages to obtain a second ticker play queue.
[0034] In this step, after obtaining the total display time of the current first ticker play queue, the terminal compares the total display time with the preset total display time threshold to determine whether there are too many ticker messages in the current first ticker play queue. In a specific implementation, the total display time threshold can be preset to 30 seconds, 40 seconds, etc. according to business needs. Among them, if the terminal compares the total display time of the current first ticker play queue with the preset total display time threshold, and determines that the total display time of the first ticker play queue is less than or equal to the total display time threshold, it means that there are not too many ticker messages. At this time, the process can be directly terminated without subsequent processing of the first ticker play queue, and the first ticker play queue is played in sequence, and detection, judgment and processing are performed when a new ticker message is sent. If the terminal determines that the total display time of the first ticker play queue is greater than the total display time threshold, it means that there are too many ticker messages. At this time, the terminal deletes the previous redundant ticker messages of the first ticker play queue to obtain the second ticker play queue. Specifically, when there are too many marquee messages, the terminal needs to delete the marquee messages in the first marquee play queue. The terminal needs to delete the redundant marquee messages that are in the front display order from the first marquee play queue to ensure that the marquee messages can be displayed normally and the latest or updated marquee messages can be displayed as soon as possible. The redundant marquee messages that are in the front display order are the front redundant marquee messages. As an example, if the first marquee play queue contains two completely identical marquee messages, one of which is located at the front of the first marquee play queue and the other is located at the back of the queue, then one of the marquee messages is a front redundant marquee message relative to the other marquee message, and then the terminal deletes the front redundant marquee message from the first marquee play queue. In this way, the terminal can delete the front redundant marquee messages from the first marquee play queue to obtain the second marquee play queue.
[0035] Step S203: If the total display time of the second ticker play queue is greater than the total display time threshold, the ticker message display time of the second ticker play queue is shortened according to the total display time threshold to obtain a third ticker play queue.
[0036] In this step, after the terminal deletes the redundant marquee messages in the first marquee play queue, it can obtain the second marquee play queue. In this regard, if the terminal determines that the total display time of the second marquee play queue is less than or equal to the total display time threshold, it means that there are not too many marquee messages in the second marquee play queue. At this time, the process can be directly terminated without subsequent processing of the second marquee play queue. The second marquee play queue is played in sequence, and detection, judgment and processing are performed again when waiting for new marquee messages to be sent. If the total display time of the second marquee play queue is greater than the total display time threshold, it means that there are still too many marquee messages in the second marquee play queue. At this time, the terminal shortens the display time of the marquee messages in the second marquee play queue to obtain the third marquee play queue. In this regard, specifically, after the previous redundant marquee messages have been deleted, if there are still too many marquee messages in the second marquee playback queue, the terminal needs to shorten the message display time of the marquee messages in the second marquee playback queue to ensure that the marquee messages can be displayed normally while allowing the subsequent latest or updated marquee messages to be displayed as early as possible. In this regard, the terminal can shorten the display time of one or more marquee messages in the second marquee playback queue according to the total display time threshold, so that the total display time of the shortened second marquee playback queue (recorded as the third marquee playback queue) is as close as possible to or even less than or equal to the total display time threshold. For the shortening of the message display time of the marquee messages, as an example, the terminal can first determine the excess time based on the difference between the total display time of the second marquee playback queue and the total display time threshold, the excess time indicating how much the total display time exceeds the total display time threshold, and then Select several marquee messages and allocate the excess duration to the several marquee messages, so that each of the several marquee messages can have a corresponding duration that needs to be shortened. The time to be shortened indicates how much the message display time of the corresponding marquee message needs to be shortened, such as shortening it by 0.5 seconds, 1 second, etc. The time to be shortened corresponding to each marquee message can be the same or different, and then the terminal shortens the message display time of each of the several marquee messages according to the corresponding time to be shortened. In this way, the terminal can shorten the display time of the marquee message of the second marquee playback queue according to the total display time threshold to obtain a third marquee playback queue, and the total display time of the third marquee playback queue can be as close to or even less than or equal to the total display time threshold as possible, so that the marquee message can be displayed normally and the subsequent latest or updated marquee message can be displayed as early as possible. Finally, the terminal can play the third marquee playback queue.
[0037] like Figure 3The basic process of the marquee message processing method of the present application in a specific example is shown, wherein, after receiving a new marquee message sent by the server, the terminal adds the new marquee message to the marquee playback queue, recorded as the current first marquee playback queue, and then determines whether the total display time of the current first marquee playback queue is greater than the total display time threshold of 30 seconds. If not, the process is directly terminated. If so, the first marquee playback queue is deleted by the previous redundant marquee messages to obtain a second marquee playback queue. Then, it is determined whether the total display time of the second marquee playback queue is greater than the total display time threshold of 30 seconds. If not, the process is directly terminated. If so, the second marquee playback queue is shortened according to the total display time threshold to obtain a third marquee playback queue, and finally the process is terminated.
[0038] The marquee message processing method of this embodiment obtains the total display time of the current first marquee playback queue. If the total display time is greater than the total display time threshold, the first marquee playback queue is subjected to deletion processing of the previously redundant marquee messages to obtain a second marquee playback queue. If the total display time of the second marquee playback queue is still greater than the aforementioned total display time threshold, the marquee message display time of the second marquee playback queue is further shortened according to the total display time threshold to obtain a third marquee playback queue. When the total display time of the current first marquee playback queue is greater than the total display time threshold, this scheme first deletes the previous redundant marquee messages to delete the repeated and redundant marquee messages in the queue to obtain the second marquee playback queue. If the total display time of the second marquee playback queue is still greater than the total display time threshold, the marquee message display time is shortened to shorten the display time of the marquee messages in the queue to obtain the third marquee playback queue. By deleting the repeated and redundant marquee messages and shortening the display time of the marquee messages, the display timing of the subsequent latest marquee messages can be advanced without affecting the normal display of the marquee, thereby ensuring the timeliness of the display of the marquee messages and allowing users to view the updated marquee messages as soon as possible.
[0039] In some embodiments, the deletion of the previous redundant ticker message in the first ticker play queue in step S202 may include:
[0040] Obtain the message characteristics and display order of the marquee messages in the first marquee playback queue; determine the previous redundant marquee messages in the first marquee playback queue according to the message characteristics and the display order and delete the previous redundant marquee messages.
[0041] In this embodiment, the terminal can identify and delete the previous redundant marquee messages in the first marquee playback queue based on the message characteristics and display order of the marquee messages in the first marquee playback queue. In this regard, it is mentioned in the example of the aforementioned embodiment that for two completely identical marquee messages in the first marquee playback queue, and one of the marquee messages is located at the very front of the first marquee playback queue and the other marquee message is located at the very back of the queue, at this time, one of the marquee messages can be treated as the previous redundant marquee message of the other marquee message and deleted, that is, for two completely identical marquee messages in the queue, the marquee message that is displayed earlier in the queue can be treated as the previous redundant marquee message that is displayed later in the queue and deleted, and In this embodiment, some message features can be pre-set for the live broadcast service, so that the terminal is not limited to deleting only the previous marquee messages with exactly the same messages in the queue when performing deletion processing. That is, the terminal can combine the pre-set message features to find, for example, two marquee messages with the same message features in the first marquee playback queue, and then determine the previous redundant marquee messages for deletion processing based on their display order, thereby broadening the selection conditions for the previous redundant marquee messages, making the terminal's deletion processing of the previous redundant marquee messages more flexible and adaptable to the needs of the live broadcast service. For message features, as an example, if one of the ticker messages is "Zhang San's level is upgraded to level 1" and the other ticker message is "Zhang San's level is upgraded to level 2", the message features can be set to the business to which the message belongs and the corresponding user ID. From the perspective of the business to which the messages belong, both messages are upgrade notifications. From the perspective of the corresponding user ID, both messages are directed to Zhang San. Based on this, the terminal can delete one of the ticker messages, i.e., "Zhang San's level is upgraded to level 1", as a redundant ticker message preceding the other ticker message, i.e., "Zhang San's level is upgraded to level 2".
[0042] Further, in one embodiment, the above-mentioned method of determining the previous redundant marquee message in the first marquee play queue and deleting the previous redundant marquee message according to the message characteristics and the display order may specifically include:
[0043] According to the display order, the first marquee message with the earlier display order is obtained from the head of the first marquee playback queue, and the second marquee message with the later display order is obtained from the tail of the first marquee playback queue; for the obtained second marquee messages, the message features of the first marquee message are compared with the message features of the second marquee message in sequence, and whenever the message features of the first marquee message are compared to be the same as the message features of the second marquee message, the first marquee message is deleted as a redundant marquee message before the second marquee message, until the total display time of the first marquee playback queue after the deletion is less than or equal to the total display time threshold, or, the first marquee message and the second marquee message with the same message features do not exist in the first marquee playback queue after the deletion.
[0044] For this embodiment, the first marquee playback queue is represented as a marquee array, the marquee data length is X, j and i respectively represent the subscripts of the first marquee message and the second marquee message in the marquee array, the smaller the subscript, the earlier the corresponding display order in the first marquee playback queue, arr[j] represents the first marquee message with subscript j, and arr[i] represents the second marquee message with subscript i.
[0045] Based on this, combined Figure 4 To illustrate the solution of this embodiment, first, it is possible to calculate whether the total display time of the first marquee playback queue is greater than the total display time threshold of 30 seconds. If not, the process is terminated directly. If so, the deletion processing logic of this embodiment is entered.
[0046] Specifically, first set i = X - 1. At this time, the second marquee message arr[i] is the last marquee message in the marquee array, that is, the second marquee message with a later display order is obtained from the end of the first marquee play queue. Then set j = 0. At this time, the first marquee message arr[j] is the first marquee message in the marquee array, that is, the first marquee message with an earlier display order is obtained from the head of the first marquee play queue. Among them, i > 0 can be used to determine whether the second marquee message arr[i] is meaningful. When i < 0, it is meaningless. The judgment of j < i can always ensure that the first marquee message arr[j] is a marquee message that is earlier than the second marquee message arr[i]. For this first marquee message arr[j] and the second marquee message arr[i], compare the message features and try to delete the first marquee message arr[j]. That is, if the message features of the two messages are the same, delete the first marquee message arr[j]; if the message features of the two messages are different, keep the first marquee message arr[j]. After this processing, judge whether the total display duration of the first marquee play queue after the deletion process is less than or equal to the total display duration threshold of 30 seconds. If so, it means that the deletion process for this queue has achieved the purpose and there is no need to continue deleting other marquee messages, and the process can be directly ended. If the total display duration of the first marquee play queue after the deletion process is still greater than the total display duration threshold of 30 seconds, then continue to set j = j + 1, that is, continue to obtain the next first marquee message arr[j], and judge j < i to always ensure that the first marquee message arr[j] is to the left / earlier than the second marquee message arr[i] in the marquee array. Then continue to repeat the above message feature judgment and try to delete the processing process. When it is judged that j < i is not satisfied, it means that for this second marquee message arr[i], the message features of all the first marquee messages arr[j] before it have been compared and tried to be deleted. At this time, the terminal sets i = i - 1, that is, continues to obtain the next second marquee message arr[i], and then continues to repeat the above process of obtaining the first marquee message arr[j] and judging and trying to delete the message features. That is, for the obtained second marquee message arr[i] in sequence, compare the message features of the first marquee message arr[j] with the message features of the second marquee message arr[i] in turn. Whenever the message features of the first marquee message arr[j] are the same as the message features of the second marquee message arr[i], delete the first marquee message arr[j] as the redundant marquee message before the second marquee message arr[i].For this process, as a specific example, for the marquee array [A, B, C, D], the message features are compared and attempted to be deleted in the following order: A is compared and attempted to be deleted, B is compared and attempted to be deleted, C is compared and attempted to be deleted, A is compared and attempted to be deleted, B is compared and attempted to be deleted, C is compared and attempted to be deleted, A is compared and attempted to be deleted, B is compared and attempted to be deleted, and A is compared and attempted to be deleted.
[0047] This process continues until the total display time of the first marquee playback queue after the deletion process is less than or equal to 30 seconds, or, the first marquee message arr[j] and the second marquee message arr[i] with the same message characteristics do not exist in the first marquee playback queue after the deletion process, that is, the process continues until it is found that the total display time of the queue after the deletion process is less than or equal to the total display time threshold of 30 seconds, and there is no need to continue to delete other marquee messages because the purpose has been achieved, or it continues until it is found that even if the total display time of the queue after the deletion process is still greater than the total display time threshold of 30 seconds, but the first marquee message arr[j] and the second marquee message arr[i] with the same message characteristics no longer exist in the queue because there are no previous redundant marquee messages that can be deleted, and it is necessary to enter the process of shortening the display time of subsequent marquee messages.
[0048] The solution of this embodiment can compare and delete the message features of the corresponding first and second marquee messages one by one according to the display order until the total display time of the queue after deletion is less than or equal to the total display time threshold or there are no first and second marquee messages with the same message features in the queue. The solution of this embodiment can preferentially delete the oldest redundant marquee message in the queue and retain as many marquee messages in the queue as possible and enable the latest marquee message in the queue to be displayed as early as possible.
[0049] In some embodiments, sequentially comparing the message features of the first ticker message with the message features of the second ticker message in the above embodiments may include:
[0050] Compare the message text of the first marquee message with the message text of the second marquee message to obtain a first comparison result; compare the message business and the corresponding user identifier of the first marquee message with the message business and the corresponding user identifier of the second marquee message to obtain a second comparison result; if the first comparison result or the second comparison result is the same, it is determined that the message feature of the first marquee message is the same as the message feature of the second marquee message.
[0051] In this embodiment, the message features may include the message text, the business to which the message belongs, and the corresponding user identifier. In this regard, the terminal may compare the first marquee message with the second marquee message in terms of the message text, the business to which the message belongs, and the corresponding user identifier. As long as the comparison result in one of the aspects is the same, the terminal can determine that the message features of the first marquee message are the same as the message features of the second marquee message. As an implementation method, the terminal may first compare the message text of the first marquee message with the message text of the second marquee message to obtain a first comparison result. If the first comparison result is the same, the terminal determines that the message features of the first marquee message are the same as the message features of the second marquee message, and the first marquee message that is displayed in the front order may be deleted. If the first comparison result is different, the terminal may compare the message business and the corresponding user identifier of the first marquee message with the message business and the corresponding user identifier of the second marquee message to obtain a second comparison result. Taking the first message "Zhang San's level is upgraded to level 1" and the second ticker message "Zhang San's level is upgraded to level 2" as an example, the services to which the two messages belong are both upgrade notifications, and the corresponding user identifiers both correspond to Zhang San. Therefore, the terminal determines that the message characteristics of the first ticker message are the same as the message characteristics of the second ticker message, and the first ticker message that comes first in the display order can be deleted. If the two messages belong to different services or have different corresponding user identifiers, the terminal can determine that the message characteristics of the first ticker message are different from the message characteristics of the second ticker message, and the first ticker message will not be deleted. In some other implementations, the message business and the corresponding user identifier of the first marquee message may be compared with the message business and the corresponding user identifier of the second marquee message, and then the message text of the first marquee message may be compared with the message text of the second marquee message. Alternatively, the message texts and the message businesses and the corresponding user identifiers of both may be compared at the same time. As long as one of the comparison results is the same, the terminal may determine that the message features of the first marquee message are the same as the message features of the second marquee message and delete the first marquee message so that the updated second marquee message can be displayed as soon as possible.
[0052] In some embodiments, in step S203, shortening the display time of the second ticker message in the second ticker play queue according to the total display time threshold to obtain the third ticker play queue may include:
[0053] The excess duration is obtained based on the difference between the total display duration of the second marquee playback queue and the total display duration threshold; the message display duration of the marquee messages with fixed message display duration in the second marquee playback queue is shortened based on the excess duration to obtain a third marquee playback queue.
[0054] In this embodiment, the terminal may first calculate the difference between the total display time of the second marquee playback queue and the total display time threshold to obtain an excess time T, where the excess time indicates how much the total display time exceeds the total display time threshold. In addition, the terminal may also determine a marquee message with a fixed message display time in the second marquee playback queue, wherein the marquee message with a fixed message display time includes, for example, marquee messages of upgrade notifications, marquee messages of lottery information, etc. The message display time of these marquee messages is fixed, so the message display time can be shortened. Relatively speaking, the second marquee playback queue may also include some marquee messages with non-fixed message display time, such as the marquee message of the live studio entrance show, whose message display time is not fixed, and is related to the playback time of the entrance show mount resources, and the message display time cannot be shortened. Therefore, after the terminal determines the marquee messages with fixed message display durations from the second marquee play queue, it obtains the message display durations of those marquee messages with fixed message display durations, and then shortens the message display durations of those marquee messages with fixed message display durations according to the aforementioned excess durations, to obtain a third marquee play queue. In this regard, as an implementation method, the terminal may evenly distribute the excess duration to those marquee messages with fixed message display durations, so that each marquee message with a fixed message display duration undergoes an equal amount of shortening of the message display duration, and the third marquee play queue is obtained after the shortening process. The scheme of this embodiment can make full use of the marquee messages with fixed message display durations in the queue to shorten the message display durations, while ensuring the display effect of the marquee messages as much as possible, and allowing the audience to view the subsequent latest marquee messages as soon as possible.
[0055] Further, such as Figure 5 As shown, in the above embodiment, the message display duration of the ticker message with a fixed message display duration in the second ticker play queue is shortened according to the excess duration, specifically including:
[0056] Step S501, determining a target ticker message among ticker messages with a fixed message display duration.
[0057] In this step, when shortening the message display time of the marquee message with a fixed message display time in the second marquee playback queue, first further determine the target marquee message in the marquee message with a fixed message display time. The target marquee message refers to a marquee message in which the message display time is greater than the message display time threshold. The message display time threshold can be set to 3 seconds, that is, the terminal further determines the target marquee message with a message display time greater than 3 seconds from the marquee messages with a fixed message display time.
[0058] Step S502: Determine the duration that needs to be shortened corresponding to the target ticker message according to the excess duration and the number of target ticker messages.
[0059] In this step, the terminal can obtain the number N of target marquee messages contained in the marquee message with a fixed message display duration, and then determine the duration S that needs to be shortened corresponding to the target marquee message based on the excess duration T and the number N of target marquee messages. For example, the duration S that needs to be shortened can be obtained based on the ratio of the excess duration T to the number N of target marquee messages, that is, S = T / N, and the excess duration T is averaged to each target marquee message.
[0060] Step S503, shortening the display duration of the target ticker message according to the duration that needs to be shortened.
[0061] Specifically, as described above, the terminal may evenly distribute the excess duration T to each target ticker message. In this step, the terminal may shorten the message display duration of each target ticker message according to the same duration S to be shortened.
[0062] The solution of this embodiment further allocates the excess duration to the target ticker message, so as to avoid shortening the message display duration of some ticker messages whose display duration is originally short and affecting their display effect.
[0063] Furthermore, in some embodiments, after the display duration of the target ticker message is shortened according to the required duration, the following steps may be performed:
[0064] Obtain the message text length of the target marquee message, and obtain the message display duration of the shortened target marquee message; set the message text playback speed of the shortened target marquee message according to the message text length of the target marquee message and the message display duration of the shortened target marquee message.
[0065] Specifically, after the message display duration of the marquee message in the marquee play queue is shortened, it is also necessary to reset the message copy playback speed of the shortened marquee message. It can be understood that the resetting of the message copy playback speed of the marquee message here can be applied to the shortening of the message display duration of the marquee message in the marquee play queue in any of the aforementioned embodiments, so as to ensure that the message copy of the shortened marquee message can be played completely. In this embodiment, after the terminal shortens the message display duration of the target marquee message, a shortened target marquee message is obtained. The terminal can obtain the message copy length of the target marquee message and the message display duration of the shortened target marquee message. Then, according to the ratio of the message copy length to the message display duration, the message copy playback speed of the shortened target marquee message (i.e., the message copy playback speed = the message copy length / the message display duration) can be obtained and set to ensure that the message copy of the shortened target marquee message can be played completely.
[0066] For the process of shortening the display time of the ticker message described in the above embodiment, as a specific example, Figure 6 As shown, the terminal first obtains the excess duration T according to the difference between the total display duration of the second marquee playback queue and the total display duration threshold, and then counts the number N of target marquee messages in the marquee messages with fixed message display duration in the queue, and then calculates the required shortening duration S=T / N corresponding to each target marquee message, and then shortens the message display duration of each target marquee message according to the required shortening duration, and finally resets the message text playback speed of each shortened target marquee message according to the message text length of the target marquee message and the message display duration of the shortened target marquee message, thereby obtaining the third marquee playback queue, and playing the third marquee playback queue can enable the message text of the shortened target marquee message to be played completely, thereby ensuring the display effect of the marquee messages in the queue.
[0067] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0068] Based on the same inventive concept, the embodiment of the present application also provides a marquee message processing device for implementing the above-mentioned marquee message processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the marquee message processing device provided below can refer to the limitations of the marquee message processing method above, and will not be repeated here.
[0069] In one embodiment, Figure 7 As shown, a marquee message processing device is provided, and the device 700 may include:
[0070] The duration acquisition module 701 is used to acquire the total display duration of the current first ticker play queue;
[0071] The message deletion module 702 is used to delete the previous redundant marquee messages of the first marquee playback queue to obtain a second marquee playback queue if the total display time of the first marquee playback queue is greater than the total display time threshold;
[0072] The duration shortening module 703 is used to shorten the display duration of the second ticker message of the second ticker playback queue according to the total display duration threshold if the total display duration of the second ticker playback queue is greater than the total display duration threshold, so as to obtain a third ticker playback queue.
[0073] In one embodiment, the message deletion module 702 is used to obtain the message characteristics and display order of the marquee messages in the first marquee playback queue; based on the message characteristics and display order, determine the previous redundant marquee messages in the first marquee playback queue and delete the previous redundant marquee messages.
[0074] In one embodiment, the message deletion module 702 is used to obtain the first marquee message with a front display order from the head of the first marquee playback queue, and obtain the second marquee message with a back display order from the tail of the first marquee playback queue according to the display order; sequentially compare the message features of the first marquee message with the message features of the second marquee message for the obtained second marquee message, and whenever the message features of the first marquee message are found to be the same as the message features of the second marquee message, delete the first marquee message as a redundant marquee message preceding the second marquee message, until the total display time of the deleted first marquee playback queue is less than or equal to the total display time threshold, or, there are no first marquee messages and second marquee messages with the same message features in the deleted first marquee playback queue.
[0075] In one embodiment, the message features include message text, the business to which the message belongs, and the corresponding user identifier; the message deletion module 702 is used to compare the message text of the first ticker message with the message text of the second ticker message to obtain a first comparison result; compare the message business to which the first ticker message belongs and the corresponding user identifier with the message business to which the second ticker message belongs and the corresponding user identifier to obtain a second comparison result; if the first comparison result or the second comparison result is the same, it is determined that the message feature of the first ticker message is the same as the message feature of the second ticker message.
[0076] In one embodiment, the duration shortening module 703 is used to obtain the excess duration based on the difference between the total display duration of the second marquee playback queue and the total display duration threshold; and shorten the message display duration of the marquee messages with fixed message display duration in the second marquee playback queue according to the excess duration to obtain a third marquee playback queue.
[0077] In one embodiment, the duration shortening module 703 is used to determine the target marquee message among the marquee messages with a fixed message display duration; the message display duration of the target marquee message is greater than the message display duration threshold; based on the excess duration and the number of the target marquee messages, determine the duration to be shortened corresponding to the target marquee message; and shorten the message display duration of the target marquee message based on the duration to be shortened.
[0078] In one embodiment, the duration shortening module 703 is also used to obtain the message text length of the target marquee message and the message display duration of the shortened target marquee message; and to set the message text playback speed of the shortened target marquee message according to the message text length of the target marquee message and the message display duration of the shortened target marquee message.
[0079] Each module in the above-mentioned ticker message processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0080] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a marquee message processing method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0081] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0082] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0083] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0084] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0085] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0086] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing a marquee message, characterized in that: The method comprises: Get the total display time of the current first ticker play queue; If the total display time of the first ticker play queue is greater than the total display time threshold, the first ticker play queue is subjected to a deletion process of the previous redundant ticker messages to obtain a second ticker play queue; If the total display time of the second marquee playback queue is greater than the total display time threshold, the display time of the marquee message in the second marquee playback queue is shortened according to the total display time threshold to obtain a third marquee playback queue, including: obtaining the excess time according to the difference between the total display time of the second marquee playback queue and the total display time threshold; shortening the message display time of the marquee message with a fixed message display time in the second marquee playback queue according to the excess time to obtain the third marquee playback queue.
2. The method according to claim 1, characterized in that The deleting of the previous redundant marquee message from the first marquee play queue includes: Obtaining message features and display order of the ticker messages in the first ticker play queue; According to the message features and display order, the previous redundant marquee message in the first marquee play queue is determined and the previous redundant marquee message is deleted.
3. The method according to claim 2, characterized in that The determining, according to the message features and the display order, the previous redundant marquee message in the first marquee play queue and deleting the previous redundant marquee message comprises: According to the display order, a first ticker message with an earlier display order is obtained from the head of the first ticker play queue, and a second ticker message with a later display order is obtained from the tail of the first ticker play queue; For the second marquee message obtained, the message features of the first marquee message are compared with the message features of the second marquee message in sequence. Whenever the message features of the first marquee message are found to be the same as those of the second marquee message, the first marquee message is deleted as a previous redundant marquee message of the second marquee message until the total display time of the deleted first marquee playback queue is less than or equal to the total display time threshold, or, there are no first marquee messages and second marquee messages with the same message features in the deleted first marquee playback queue.
4. The method according to claim 3, characterized in that The message features include message text, the service to which the message belongs, and the corresponding user identifier; and sequentially comparing the message features of the first ticker message with the message features of the second ticker message, including: Comparing the message text of the first ticker message with the message text of the second ticker message to obtain a first comparison result; Compare the message service and the corresponding user identifier of the first ticker message with the message service and the corresponding user identifier of the second ticker message to obtain a second comparison result; If the first comparison result or the second comparison result is the same, it is determined that the message feature of the first ticker message is the same as the message feature of the second ticker message.
5. The method according to claim 1, characterized in that The shortening of the message display duration of the ticker message with a fixed message display duration in the second ticker play queue according to the excess duration includes: Determine a target ticker message among the ticker messages with a fixed message display duration; the message display duration of the target ticker message is greater than a message display duration threshold; Determine the duration that needs to be shortened corresponding to the target ticker message according to the excess duration and the number of the target ticker messages; The message display duration of the target ticker message is shortened according to the duration that needs to be shortened.
6. The method according to claim 5, characterized in that After shortening the display duration of the target ticker message according to the duration to be shortened, the method further includes: Obtain the message text length of the target ticker message, and obtain the message display duration of the shortened target ticker message; The message copy playback speed of the shortened target marquee message is set according to the message copy length of the target marquee message and the message display duration of the shortened target marquee message.
7. A marquee message processing device, characterized in that: The device comprises: The duration acquisition module is used to obtain the total display duration of the current first ticker playback queue; a message deletion module, configured to delete the previous redundant marquee messages of the first marquee playback queue to obtain a second marquee playback queue if the total display time of the first marquee playback queue is greater than a total display time threshold; A duration shortening module is used to shorten the display duration of the marquee message of the second marquee playback queue according to the total display time threshold if the total display duration of the second marquee playback queue is greater than the total display time threshold, so as to obtain a third marquee playback queue, including: obtaining the excess duration according to the difference between the total display duration of the second marquee playback queue and the total display time threshold; shortening the message display duration of the marquee message with a fixed message display duration in the second marquee playback queue according to the excess duration, so as to obtain a third marquee playback queue.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Message degradation method and related device
CN110968279A
Chat message display method, device, server and system in live streaming
CN111277847A