Gift display method, device, equipment, medium and computer program product
By using the method of alternately displaying gifts in the live broadcast room with priority queues and alternative queues, the problem of lagging display of gifts with low value is solved, and the viewing experience of live broadcast interaction is improved.
Patent Information
- Application Number
- CN202211198967.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-09-29
AI Technical Summary
During the peak period of gift gifts in the live broadcast room, the priority display of gifts with higher value leads to the lag of gifts with lower value for too long, affecting the viewing experience.
The method of alternately displaying gifts by priority queues and alternative queues is adopted. The priority queue stores gifts with a value higher than the preset value, and the alternative queue stores gifts with a value lower than or equal to the preset value. By alternate display parameters, the gifts with a lower value are displayed in a timely manner.
It effectively avoids the lag of gifts with low value for too long display time, which improves the viewing experience of live broadcast interaction.
Smart Images

Figure CN115529470B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to blockchain technology, and in particular, to a gift display method, device, equipment, and computer-readable storage medium. Background Art
[0002] With the continuous development of the Internet, webcasting has become a popular field. Various forms of webcasting, such as game webcasting and live e-commerce, emerge in an endless stream, and watching webcasts has gradually become an indispensable part of people's entertainment life. When the webcast content is exciting, viewers can interact with the host by sending gifts to encourage the host to bring more wonderful webcasts. The gifts sent by viewers will be played in real time in the form of animation effects at the host end and the viewer end, forming a good interactive effect. At the same time, the gift animation also brings a good viewing experience, adding luster to the webcast effect.
[0003] The incomes of users watching webcasts are different, and the values of gifts given by different users will also vary. The prior art displays each gift in order of value from high to low.
[0004] In this display method, after the gifts with high value are displayed, the gifts with low value will be displayed. When the webcast room is in the peak period of gift giving, there are many gifts with high value, resulting in the gifts with low value being unable to be displayed for a long time, and the lag display time of the gifts with low value is too long. Summary of the Invention
[0005] The present invention provides a gift display method, device, equipment, and computer-readable storage medium to solve the problem of too long lag display time of gifts with low value.
[0006] On the one hand, the present invention provides a gift display method, including:
[0007] Obtain a first gift from a priority queue and determine a first display parameter of the first gift, where the priority queue includes multiple gifts with a value higher than a preset value;
[0008] Display the first gift according to the first display parameter;
[0009] After the first gift is displayed, obtain a second gift from an alternative queue, where the alternative queue includes multiple gifts with a value lower than or equal to the preset value;
[0010] Determine a second display parameter of the second gift and display the second gift according to the second display parameter.
[0011] In an embodiment, the obtaining the second gift from the alternative queue includes:
[0012] Obtain the second length of the alternative queue and the first length of the priority queue, where the first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue;
[0013] Determine a target quantity according to the first length and the second length, and obtain each second gift of the target quantity from the alternative queue.
[0014] In one embodiment, the obtaining the second length of the alternative queue and the first length of the priority queue includes:
[0015] Obtain the second length of the alternative queue;
[0016] When the second length is greater than a preset length, obtain the first length of the priority queue.
[0017] In one embodiment, after obtaining the second length of the alternative queue, it further includes:
[0018] When the second length is less than or equal to the preset length and the priority queue does not include any gifts, display each gift in the alternative queue according to the corresponding display parameters in sequence.
[0019] In one embodiment, before obtaining the first gift from the priority queue, it further includes:
[0020] When detecting a third gift presented by a first user, obtain the account level corresponding to the first user and the value of the third gift;
[0021] Determine the value of the third gift according to the account level and the value;
[0022] When the value of the third gift is higher than a preset value, insert the third gift into the priority queue according to the value of the third gift, where each gift in the priority queue is arranged according to the corresponding value;
[0023] When the value of the third gift is lower than or equal to the preset value, insert the third gift into the alternative queue according to the value of the third gift, where each gift in the alternative queue is arranged according to the corresponding value.
[0024] In one embodiment, after inserting the third gift into the alternative queue according to the value of the third gift, it includes:
[0025] When the third gift is the same as the target gift, merge the third gift with the target gift, where the target gift is the gift adjacent to the third gift in the alternative queue;
[0026] Displaying the second gift according to the second display parameter includes:
[0027] Displaying the target gift, the information of the first user, and the information of the second user according to a preset duration, where the second display parameter includes the preset duration, the information of the first user, and the information of the second user, and the second user is the user who presents the target gift.
[0028] On the other hand, the present invention further provides a gift display device, including:
[0029] An acquisition module, configured to acquire a first gift from a priority queue and determine a first display parameter of the first gift, where the priority queue includes multiple gifts with values higher than a preset threshold;
[0030] A display module, configured to display the first gift according to the first display parameter;
[0031] The acquisition module is further configured to, after the first gift is displayed, acquire a second gift from an alternative queue, where the alternative queue includes multiple gifts with values lower than or equal to a preset value;
[0032] A determination module, configured to determine a second display parameter of the second gift and display the second gift according to the second display parameter.
[0033] On the other hand, the present invention further provides a gift display device, including: a memory and a processor;
[0034] The memory stores computer execution instructions;
[0035] The processor executes the computer execution instructions stored in the memory, so that the processor executes the gift display method as described above.
[0036] On the other hand, the present invention further provides a computer-readable storage medium, where computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by a processor, they are used to implement the gift display method as described above.
[0037] On the other hand, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the gift display method as described above.
[0038] The gift display method, device, equipment and computer-readable storage medium provided by the present invention obtain a first gift from a priority queue, determine first display parameters of the first gift, and after displaying the first gift according to the first display parameters, obtain a second gift from an alternative queue, and then display the second gift according to second display parameters of the second gift. In the present invention, the value of the first gift is higher than a preset value, and the value of the second gift is lower than or equal to the preset value, that is, gifts with high value and low value are alternately displayed, so as to display the gifts with lower value in time and avoid too long lag time for the gifts with lower value. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0040] Figure 1 It is a schematic flowchart of the first embodiment of the gift display method of the present invention;
[0041] Figure 2 It is a schematic flowchart of the second embodiment of the gift display method of the present invention;
[0042] Figure 3 It is a schematic flowchart of the third embodiment of the gift display method of the present invention
[0043] Figure 4 It is a schematic structural diagram of the gift display device of the present invention;
[0044] Figure 5 It is a schematic block diagram of the gift display device of the present invention;
[0045] Figure 6 It is a schematic hardware structure diagram of the gift display equipment of the present invention.
[0046] Through the above-mentioned accompanying drawings, specific embodiments of the present disclosure have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] With the continuous development of the Internet, online live streaming has become a popular field. Live streaming forms such as game live streaming and live e-commerce are emerging in an endless stream, and watching live streams has gradually become an indispensable part of people's entertainment life. When the live stream content is wonderful, viewers can interact with the host by sending gifts, encouraging the host to bring more wonderful live streams. The gifts sent by the viewers will be played in real time in the form of animation effects on the host side and the viewer side, forming a good interactive effect. At the same time, the gift animation will also bring a good viewing experience, adding luster to the live stream effect.
[0049] The inventors of this patent found that when the live streaming room is in the peak period of gift giving, there are many high-value gifts, and the high-value gifts will be preferentially displayed, resulting in the low-value gifts being unable to be displayed for a long time, causing the lag display time of the low-value gifts to be too long.
[0050] Therefore, the inventors of this patent thought of alternately displaying high-value and low-value gifts to avoid the lag display time of low-value gifts from being too long.
[0051] The following will specifically describe in detail the technical solutions of the present invention and how the technical solutions of this application solve the above technical problems through specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0052] Refer to Figure 1 , Figure 1 This is the first embodiment of the gift display method of the present invention. The gift display method includes the following steps:
[0053] Step S101, obtain a first gift from the priority queue and determine the first display parameter of the first gift. The priority queue includes multiple gifts with a value higher than a preset value.
[0054] In this embodiment, the execution entity is a gift display device. For the convenience of description, the gift display device will be referred to as a device hereinafter. The device can be a terminal device with a display screen. For example, the device can be a mobile phone, a computer or a tablet.
[0055] The device is used for live streaming. During the live streaming process, users will reward the live stream, that is, users will send gifts. And the gifts sent need to be displayed on the device. The device stores a priority queue and an alternative queue. The priority queue includes multiple gifts with a value higher than a preset value. And the alternative queue includes multiple gifts with a value lower than a preset value. Gifts refer to virtual items. The value of a gift can be determined by the price of the gift. The higher the price, the higher the value of the gift. The preset value can be any appropriate value.
[0056] When a gift needs to be displayed, the device obtains the first gift from the priority queue. The device can obtain the first gift from the head of the priority queue, or obtain the gift with the highest value from the priority queue as the first gift, or obtain the gift with the earliest gift time from the priority queue as the first gift.
[0057] After receiving the first gift, the device determines the first display parameter of the first gift. The first display parameter may include the duration, color, shape, position, and animation effect of the first gift displayed in the device. The device may determine the first display parameter based on the price of the first gift. The higher the price, the longer the display duration, the more colorful the display color, and the closer the display position is to the center area of the device display screen.
[0058] Step S102: display the first gift according to the first display parameter.
[0059] Step S103, after the first gift is displayed, obtain the second gift from the candidate queue, the candidate queue includes multiple gifts with values less than or equal to a preset value.
[0060] After determining the first display parameter of the first gift, the device can display the first gift according to the first display parameter. When the first gift is displayed, the device obtains the second gift from the candidate queue. The device can obtain the second gift from the head of the candidate queue, or obtain the gift with the highest value from the candidate queue as the second gift, or obtain the gift with the earliest gift time from the candidate queue as the second gift.
[0061] Step S104, determining the second display parameters of the second gift, and displaying the second gift according to the second display parameters.
[0062] After obtaining the second gift, the device determines the second display parameters of the second gift. The second display parameters may include the duration, color, shape, position, and animation effects of the second gift displayed in the device. The device may determine the second display parameters based on the price of the second gift. The higher the price, the longer the display duration, the more colorful the display color, and the closer the display position is to the center area of the device display screen. After determining the second display parameters of the second gift, the device may display the second gift according to the second display parameters.
[0063] After the second gift is displayed, the device returns to execute step S101-step S104, thereby alternately displaying high-value and low-value gifts.
[0064] In this embodiment, the first gift is obtained from the priority queue, and the first display parameter of the first gift is determined. After the first gift is displayed according to the first display parameter, the second gift is obtained from the alternative queue, and then the second gift is displayed according to the second display parameter of the second gift. In this embodiment, the value of the first gift is higher than the preset value, and the value of the second gift is lower than or equal to the preset value, that is, gifts with high value and low value are alternately displayed, so as to display the gifts with lower value in time and avoid too long lag time for the gifts with lower value.
[0065] Referring to Figure 2 , Figure 2 This is the second embodiment of the gift display method of the present invention. Based on the first embodiment, step S103 includes:
[0066] Step S201, obtain the second length of the alternative queue and the first length of the priority queue. The first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue.
[0067] In this embodiment, after the device finishes displaying the first gift, it will display multiple second gifts at one time. For this, the device obtains the second length of the alternative queue and the first length of the priority queue. The first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue.
[0068] Specifically, the first length is the length of the priority queue, and the quantity is directly converted into the first length. For example, if the number of gifts in the priority queue is 10, then the first length is also 10. The second length is the length of the alternative queue, and the number of gifts in the alternative queue is directly converted into the second length. For example, if the number of gifts in the alternative queue is 8, then the second length is also 8.
[0069] Step S202, determine the target quantity according to the first length and the second length, and obtain each second gift with the target quantity from the alternative queue.
[0070] The device determines the target quantity according to the first length and the second length. Exemplarily, the target quantity is the result of rounding l b / l y and it is a positive integer, where l y is the first length, l b is the second length, that is, l b / l y is rounded to obtain n. After the device determines the target quantity, it can obtain the second gifts with the target quantity from the alternative queue. It can be understood that when the length of the priority queue remains unchanged, the more gifts there are in the alternative queue, the more second gifts are obtained at one time.
[0071] It should be noted that when the length of the alternative queue is less than or equal to the preset length, the device will first display all the gifts in the preferred queue and then display the gifts in the alternative queue. In this regard, after obtaining the second length of the alternative queue, the device determines whether the second length is greater than the preset length. If it is greater than the preset length, the first length of the preferred queue is obtained, and then the target number of second gifts is obtained from the alternative queue.
[0072] When the second length is less than or equal to the preset length and the preferred queue does not include any gifts, that is, all the gifts in the preferred queue have been displayed, the device will display each gift in the alternative queue according to the corresponding display parameters.
[0073] If the second length is less than or equal to the preset length and the preferred queue includes gifts, then each gift in the preferred queue will be displayed in turn according to the corresponding display parameters, and then each gift in the alternative queue will be displayed in turn according to the corresponding display parameters.
[0074] In this embodiment, after the device displays the first gift, it determines the target number based on the second length of the alternative queue and the first length of the preferred queue, and then obtains the target number of second gifts from the alternative queue for display, so as to display multiple low-value gifts in a timely manner and avoid excessive lag in the display of low-value gifts.
[0075] Refer to Figure 3 , Figure 3 This is the third embodiment of the gift display method of the present invention. Based on the first or second embodiment, before step S101, it further includes:
[0076] Step S301, when monitoring the third gift presented by the first user, obtain the account level corresponding to the first user and the price of the third gift.
[0077] In this embodiment, when the device monitors that the first user presents the third gift, it will add the third gift to the corresponding queue. Specifically, when the device monitors that the first user presents the third gift, it obtains the account level corresponding to the first user and the price of the third gift. The device can send a request to the server, and the server parses the request to obtain the account corresponding to the first user, and then sends the account level to the device. The price of the third gift can be obtained through the payment server, that is, when the payment server determines that the first user pays the fee for the third gift to the anchor corresponding to the device, it will send the fee to the device, so that the device obtains the price of the third gift.
[0078] Step S302, determine the value of the third gift according to the account level and the price.
[0079] The device determines the value of the third gift based on the account level and the value.
[0080] In one example, the device calculates the value of the third gift based on the price of the third gift and the weight corresponding to the account level. Exemplarily, the value of the third gift is:
[0081] Wherein, is the price of the third gift, is the price of the highest gift, is the account level, is the value of the highest account level, is the weight coefficient, The value ranges from 0 to 1. In this embodiment, both the gift price and the account level are considered. The value of
[0082] Step S303, when the value of the third gift is higher than the preset value, insert the third gift into the priority queue according to the value of the third gift, wherein the gifts in the priority queue are arranged according to the corresponding values.
[0083] After the device determines the value of the third gift, it judges whether the value of the third gift is higher than the preset value. If the value of the third gift is higher than the preset value, insert the third gift into the priority queue based on the value of the third gift. Specifically, the gifts in the priority queue are sorted from largest to smallest in value. The device determines the position of the third gift in the priority queue based on the value of the third gift, and then inserts the third gift into this position.
[0084] Step S304, when the value of the third gift is lower than or equal to the preset value, insert the third gift into the alternative queue according to the value of the third gift, wherein the gifts in the alternative queue are arranged according to the corresponding values.
[0085] If the value of the third gift is lower than or equal to the preset value, insert the third gift into the alternative queue based on the value of the third gift. Specifically, the gifts in the alternative queue are sorted from largest to smallest in value. The device determines the position of the third gift in the alternative queue based on the value of the third gift, and then inserts the third gift into this position.
[0086] In addition, after inserting the third gift into the alternative queue, if the third gift is the same as the target gift, the third gift and the target gift are merged. The target gift is the gift adjacent to the third gift in the alternative queue, that is, the third gift is sorted before the target gift and adjacent to the target gift. Or, the third gift is sorted after the target gift and adjacent to the target gift. When displaying the target gift, that is, when displaying the merged gift, the target gift, the information of the first user, and the information of the second user are displayed according to a preset duration, and the quantity of the target gift is also displayed. The second user is the user who presents the target gift, and the second display parameter includes the preset duration, the information of the first user, and the information of the second user.
[0087] In this embodiment, after the device monitors the presented gift, it determines the value of the gift based on the price of the gift and the user's account level, and then inserts the gift into a suitable queue according to the value of the gift.
[0088] Refer to Figure 4 , Figure 4 which is a schematic structural diagram of the gift display device of the present invention.
[0089] The gift display device includes a gift monitoring unit, a message transmission unit, a control unit, a queue storage unit, a threshold setting unit, an animation player, etc. Among them, the gift monitoring unit includes a receiver and a transmitter. The gift monitoring unit is used to monitor the gifts sent by the audience in the live broadcast room and obtain gift information. The message transmission unit includes a receiver, a parser, a transmitter, and an encoder. The message transmission unit is used for communication between the units in the device and is responsible for information transfer between the units. The control unit includes a queue scheduler and a queue constructor, which are mainly used to control the enqueueing and dequeueing of gifts and send the dequeued gift information to the animation player for playback. The threshold setter can set the gift level and queue length threshold in the live broadcast room. The queue storage unit includes a priority queue and an alternative queue.
[0090] The working process of the gift display device is as follows:
[0091] 1. Through the gift level setter and queue length setter of the threshold setting unit, the preset threshold and preset length are respectively set and sent to the control unit.
[0092] 2. The gift monitoring unit continuously monitors whether there are gifts sent by the audience in the live broadcast room. If it monitors that a gift is presented by the audience, it obtains gift information such as the price, quantity, account level of the gift sent by this audience, the length of the preferred queue and the alternative queue, and sends it to the control unit through the message transmission unit.
[0093] 3. The message transmission unit encapsulates the gift information into a message packet and transmits it to the control unit.
[0094] 4. The queue builder in the control unit performs weighted calculations on information such as the price of the gift and the account level, and compares it with the preset value set currently. If it is higher than the preset value, the gift is inserted into the priority queue; otherwise, it is inserted into the alternative queue.
[0095] 5. The queue storage unit determines the gifts to be enqueued and inserts them into the corresponding positions in the queue according to the weighted calculation value. When inserting a gift into the alternative queue, it determines whether the adjacent gifts are the same. If they are the same, they are merged.
[0096] 6. The queue scheduler in the control unit preferentially dequeues gifts from the priority queue and sends them to the animation player for display and playback. After the dequeue and playback of the priority queue are completed, it dequeues gifts from the alternative queue. If during the dequeue and playback of the priority queue, it is monitored that the length of the alternative queue exceeds the preset length set currently, it schedules and plays the alternative queue.
[0097] 7. The gift animation player parses the gift information and plays the corresponding animation effect of the gift in the live broadcast room, and at the same time displays the gift giver and the number of gifts sent. If it is a merged gift, while displaying the animation, it separately displays the gift giver and the number of gifts they sent.
[0098] The present invention also provides a gift display device. Referring to Figure 5 , the gift display device 500 includes:
[0099] An acquisition module 510, configured to acquire a first gift from the priority queue and determine a first display parameter of the first gift. The priority queue includes multiple gifts with a value higher than the preset value;
[0100] A display module 520, configured to display the first gift according to the first display parameter;
[0101] The acquisition module 510, configured to acquire a second gift from the alternative queue after the first gift is displayed. The alternative queue includes multiple gifts with a value lower than or equal to the preset value;
[0102] A determination module 530, configured to determine a second display parameter of the second gift and display the second gift according to the second display parameter.
[0103] In an embodiment, the gift display device 500 includes:
[0104] An acquisition module 510, configured to acquire a second length of the alternative queue and a first length of the priority queue. The first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue;
[0105] A determination module 530, configured to determine a target quantity according to a first length and a second length, and obtain each second gift of the target quantity from an alternative queue.
[0106] In one embodiment, the gift display device 500 includes:
[0107] An obtaining module 510, configured to obtain the second length of the alternative queue;
[0108] The obtaining module 510 is configured to obtain the first length of the priority queue when the second length is greater than a preset length.
[0109] In one embodiment, the gift display device 500 includes:
[0110] A display module 520, configured to sequentially display each gift in the alternative queue according to corresponding display parameters when the second length is less than or equal to the preset length and the priority queue does not include any gifts.
[0111] In one embodiment, the gift display device 500 includes:
[0112] An obtaining module 510, configured to obtain the account level corresponding to a first user and the price of a third gift when it is detected that the first user presents the third gift;
[0113] A determination module 530, configured to determine the value of the third gift according to the account level and the price;
[0114] An insertion module, configured to insert the third gift into the priority queue according to the value of the third gift when the value of the third gift is higher than a preset value, where each gift in the priority queue is arranged according to the corresponding value;
[0115] The insertion module is configured to insert the third gift into the alternative queue according to the value of the third gift when the value of the third gift is lower than or equal to the preset value, where each gift in the alternative queue is arranged according to the corresponding value.
[0116] In one embodiment, the gift display device 500 includes:
[0117] A merging module, configured to merge the third gift with a target gift when the third gift is the same as the target gift, and the target gift is the gift adjacent to the third gift in the alternative queue;
[0118] The display module 520 is configured to display the target gift, the information of the first user, and the information of the second user according to a preset duration, and the second display parameter includes the preset duration, the information of the first user, and the information of the second user, and the second user is the user who presents the target gift.
[0119] Figure 6It is a hardware structure diagram of a gift display device shown according to an exemplary embodiment.
[0120] The gift display device 600 may include: a processor 601, such as a CPU, a memory 602, and a transceiver 603. Those skilled in the art can understand that Figure 6 the structure shown in does not constitute a limitation on the gift display device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0121] The processor 601 can call the computer program stored in the memory 602 to complete all or part of the steps of the above-mentioned gift display method.
[0122] The transceiver 603 is used to receive information sent by an external device and send information to the external device.
[0123] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the gift display device, enables the gift display device to execute the above-mentioned gift display method.
[0124] A computer program product includes a computer program, and when the computer program is executed by the processor of the gift display device, enables the gift display device to execute the above-mentioned gift display method.
[0125] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily think of other embodiments of the present disclosure. The present invention is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0126] It should be understood that the present disclosure is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A gift display method, characterized in that, Including: Obtain a first gift from a priority queue and determine first display parameters of the first gift, where the priority queue includes multiple gifts with values higher than a preset value; Display the first gift according to the first display parameters; After the first gift is displayed, obtain a second gift from an alternative queue, where the alternative queue includes multiple gifts with values lower than or equal to the preset value; Determine second display parameters of the second gift and display the second gift according to the second display parameters; When the second gift is displayed, return to continue executing the above steps; The obtaining the second gift from the alternative queue includes: Obtain a second length of the alternative queue and a first length of the priority queue, where the first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue; Determine a target quantity based on the first length and the second length, and obtain each of the second gifts of the target quantity from the alternative queue, where the target quantity is: the result of taking the integer part of l b / l y , which is a positive integer, where l y is the first length, and l b is the second length.
2. The gift display method according to claim 1, wherein The obtaining the second length of the alternative queue and the first length of the priority queue includes: Obtain the second length of the alternative queue; When the second length is greater than a preset length, obtain the first length of the priority queue.
3. The gift display method according to claim 2, wherein After obtaining the second length of the alternative queue, further includes: When the second length is less than or equal to the preset length and the priority queue does not include any gifts, display each gift in the alternative queue in sequence according to the corresponding display parameters.
4. The gift display method according to any one of claims 1 to 3, characterized in that, Before obtaining the first gift from the priority queue, further includes: When detecting a third gift sent by a first user, obtain the account level corresponding to the first user and the price of the third gift; Determine the value of the third gift according to the account level and the price; When the value of the third gift is higher than the preset value, insert the third gift into the priority queue according to the value of the third gift, where the gifts in the priority queue are arranged according to the corresponding values; When the value of the third gift is lower than or equal to the preset value, insert the third gift into the alternative queue according to the value of the third gift, where the gifts in the alternative queue are arranged according to the corresponding values.
5. The gift display method according to claim 4, characterized in that, After inserting the third gift into the alternative queue according to the value of the third gift, includes: When the third gift is the same as a target gift, merge the third gift with the target gift, where the target gift is the gift adjacent to the third gift in the alternative queue in terms of sorting; The displaying the second gift according to the second display parameters includes: Display the target gift, the information of the first user, and the information of the second user for a preset duration, where the second display parameters include the preset duration, the information of the first user, and the information of the second user, and the second user is the user who sent the target gift.
6. A gift display device, characterized in that, Including: An obtaining module, configured to obtain a first gift from a priority queue and determine first display parameters of the first gift, where the priority queue includes multiple gifts with values higher than a preset threshold; A display module, configured to display the first gift according to the first display parameters; The obtaining module is further configured to obtain a second gift from an alternative queue after the first gift is completely displayed, where the alternative queue includes multiple gifts with values lower than or equal to a preset value; The determining module is configured to determine second display parameters of the second gift and display the second gift according to the second display parameters; After the second gift is completely displayed, the gift display device returns to continue to execute the steps corresponding to the above modules; When obtaining the second gift from the alternative queue, the obtaining module is configured to obtain the second length of the alternative queue and the first length of the priority queue. The first length is determined according to the number of gifts in the priority queue, and the second length is determined according to the number of gifts in the alternative queue. The determining module is further configured to determine a target quantity according to the first length and the second length, and obtain each of the second gifts with the target quantity from the alternative queue, where the target quantity is: the result of taking the integer part of l b / l y which is a positive integer, where l y is the first length and l b is the second length.
7. A gift display device, characterized in that, including: a memory and a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the gift display method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by the processor, they are used to implement the gift display method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the gift display method according to any one of claims 1-5.
Citation Information
Patent Citations
Method and device for displaying virtual gift
CN107085540A
Message processing method and device, electronic equipment and storage medium
CN111083508A