Information display method, device, electronic device and storage medium
By timely sorting and cached account information of multiple accounts, the loss or interruption caused by the accumulation of display special effects in the prior art is solved, and the stable and full display of display special effects is achieved.
Patent Information
- Application Number
- CN202310012234.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-01-05
AI Technical Summary
In the prior art, since each display special effects display process takes time, the display special effects triggered by multiple accounts are accumulated, and the problems of display special effects being lost or display special effects being interrupted are prone to occur.
In response to the interactive request, it is determined whether the target account meets the preset display special effect triggering conditions, and generates account information based on the satisfaction time, and sorts the account information of multiple accounts containing the target account in a time sequence, and stores it in the cache. Based on the arrangement order of each account information in the cache, display special effects corresponding to each account information is generated in turn, and displayed in the virtual space.
Through the asynchronous mechanism of cache, the separation of triggered display effects and display effects is achieved, avoiding the loss of display effects caused by the accumulation of display effects triggered by multiple accounts or interruption of display effects, and ensuring the full display of display effects corresponding to each account information.
Smart Images

Figure CN116095387B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video data processing, and in particular to a method, device, electronic device and storage medium for displaying information. Background Art
[0002] With the development of computer technology and audio and video technology, watching live broadcasts has become a daily entertainment method for more and more users. In the virtual space created by the live broadcast account, users can interact with the live broadcast account by watching the live broadcast content and sending virtual resources to the live broadcast account. When the user sends a virtual resource, the display effect corresponding to the virtual resource will be displayed in the virtual space.
[0003] In the current method of displaying information, there are multiple accounts in the virtual space that meet the display special effect triggering conditions within a preset time period. The live broadcast platform displays the display special effects corresponding to each account in the virtual space in turn according to the time when the trigger conditions are met for these multiple accounts.
[0004] However, in the current information display method, since the display process of each display effect takes time, when the display effects triggered by multiple accounts are piled up, the display effects are easily lost or interrupted. Summary of the invention
[0005] The present disclosure provides a method, device, electronic device and storage medium for displaying information, so as to at least solve the problem of loss of display special effects or display interruption in the related art. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a method for displaying information is provided, the method comprising:
[0007] In response to the interaction request, determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition;
[0008] If the target account satisfies a preset display special effect triggering condition, determining a satisfaction time when the target account satisfies the display special effect triggering condition, and generating account information of the target account based on the satisfaction time;
[0009] According to the satisfaction time contained in the account information, the account information of multiple accounts including the target account is sorted in chronological order, and the sorted account information is stored in a cache; the multiple accounts are accounts that meet the display special effect triggering condition;
[0010] Based on the arrangement order of the plurality of account information in the cache, a display effect corresponding to each of the account information is generated and displayed in the virtual space.
[0011] In an exemplary embodiment, in response to the interaction request, determining whether the target account corresponding to the interaction request satisfies a preset display special effect triggering condition includes:
[0012] In response to the interaction request, updating the account interaction activity of the target account corresponding to the interaction request;
[0013] When the account interaction activity reaches a preset activity threshold, it is determined that the target account meets a preset display special effect trigger condition.
[0014] In an exemplary embodiment, when the account interaction activity reaches a preset activity threshold, determining that the target account meets a preset display special effect trigger condition includes:
[0015] When the account interaction activity meets a preset activity threshold, in the correspondence between the account interaction activity and the display effect, determining a target display effect corresponding to the account interaction activity of the target account;
[0016] It is determined that the target account satisfies a target display special effect triggering condition corresponding to the target display special effect.
[0017] In an exemplary embodiment, there are multiple types of display special effects, and each type of display special effect corresponds to a special effect identifier. The generating of the account information of the target account based on the satisfying time includes:
[0018] Obtaining an account identifier corresponding to the target account and a special effect identifier of the target display special effect corresponding to the account interaction activity of the target account;
[0019] Account information corresponding to the target account is generated according to the account identifier corresponding to the target account, the special effect identifier, and the time at which the target account satisfies the target display special effect.
[0020] In an exemplary embodiment, the step of sorting the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and storing the sorted account information in a cache includes:
[0021] Obtaining account information corresponding to multiple accounts including the target account within a preset time period;
[0022] sorting the account information of multiple accounts including the target account according to the time sequence of the satisfying time included in the account information to obtain a first sorting result;
[0023] Based on the first sorting result, the account information of multiple accounts including the target account is stored in a preset cache.
[0024] In an exemplary embodiment, the method further comprises:
[0025] Detect whether there are any display effects being displayed in the current virtual space;
[0026] If there is no display special effect being displayed, the step of generating a display special effect corresponding to each account information based on the arrangement order of the plurality of account information in the cache is performed.
[0027] In an exemplary embodiment, generating a display effect corresponding to each of the account information based on the arrangement order of the plurality of account information in the cache includes:
[0028] Based on the arrangement order of the plurality of account information in the cache, the account information ranked first in the cache is sequentially used as the target account information;
[0029] Generate a display effect corresponding to the target account information.
[0030] In an exemplary embodiment, the display special effect has a display special effect priority, the display special effect priority has a corresponding relationship with the special effect identifier, and the generating of the display special effect corresponding to each of the account information based on the arrangement order of the plurality of account information in the cache includes:
[0031] Based on the sorting order of the plurality of account information in the cache, reading the account information according to a time period of a preset length;
[0032] For each of the account information included in each of the time periods, according to the correspondence between the special effect identifiers included in the account information and the display special effect priority, the account information to which the special effect identifiers belong is sorted from large to small in display special effect priority to obtain a second sorting result;
[0033] Based on each account information included in the second sorting result, sequentially determine the account information ranked first in the second sorting result as the target account information;
[0034] Generate a display effect corresponding to the target account information.
[0035] According to a second aspect of an embodiment of the present disclosure, there is provided a device for displaying information, the device comprising:
[0036] A first determination unit is configured to execute, in response to the interaction request, determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition;
[0037] A second determining unit is configured to determine, if the target account satisfies a preset display special effect triggering condition, a satisfaction time when the target account satisfies the display special effect triggering condition, and generate account information of the target account based on the satisfaction time;
[0038] a sorting unit configured to sort the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and store the sorted account information in a cache; the multiple accounts are accounts that meet the display special effect triggering condition;
[0039] The first generating unit is configured to generate a display effect corresponding to each of the account information based on the arrangement order of the plurality of account information in the cache, and display the display effect in the virtual space.
[0040] In an exemplary embodiment, the first determining unit includes:
[0041] an updating subunit, configured to execute, in response to the interaction request, updating the account interaction activity of the target account corresponding to the interaction request;
[0042] The first determination subunit is configured to determine whether the target account meets a preset display special effect trigger condition when the account interaction activity reaches a preset activity threshold.
[0043] In an exemplary embodiment, the first determining subunit is specifically configured to determine, in the correspondence between the account interaction activity and the display effect, a target display effect corresponding to the account interaction activity of the target account when the account interaction activity satisfies a preset activity threshold;
[0044] It is determined that the target account satisfies a target display special effect triggering condition corresponding to the target display special effect.
[0045] In an exemplary embodiment, there are multiple types of display special effects, and each type of display special effect corresponds to a special effect identifier. The second determining unit includes:
[0046] A first acquisition subunit is configured to execute acquisition of an account identifier corresponding to the target account and a special effect identifier of the target display special effect corresponding to the account interaction activity of the target account;
[0047] The first generating subunit is configured to generate account information corresponding to the target account according to the account identifier corresponding to the target account, the special effect identifier, and the satisfaction time for the target account to satisfy the target display special effect.
[0048] In an exemplary embodiment, the sorting unit includes:
[0049] A second acquisition subunit is configured to acquire account information corresponding to a plurality of accounts including the target account within a preset time period;
[0050] a sorting subunit configured to sort the account information of a plurality of accounts including the target account according to the time sequence of the satisfying time included in the account information, to obtain a first sorting result;
[0051] The storage subunit is configured to store the account information of multiple accounts including the target account in a preset cache based on the first sorting result.
[0052] In an exemplary embodiment, the apparatus further comprises:
[0053] A detection unit, configured to detect whether there is a display effect being displayed in the current virtual space;
[0054] The second generating unit is configured to execute the step of generating a display special effect corresponding to each of the account information based on the arrangement order of the plurality of account information in the cache if there is no display special effect being displayed.
[0055] In an exemplary embodiment, the first generating unit includes:
[0056] A processing subunit is configured to execute, based on the arrangement order of the plurality of account information in the cache, sequentially taking the account information ranked first in the cache as the target account information;
[0057] The second generating subunit is configured to generate a display effect corresponding to the target account information.
[0058] In another exemplary embodiment, the first generating unit includes:
[0059] A reading subunit is configured to read the account information according to a preset time period based on the sorting order of the plurality of account information in the cache;
[0060] The sorting subunit is configured to perform, for each of the account information included in each of the time periods, sorting the account information to which each of the special effect identifiers belongs from large to small according to the correspondence between the special effect identifiers included in the account information and the display special effect priority, to obtain a second sorting result;
[0061] A second determining subunit is configured to determine the account information ranked first in the second sorting result as the target account information based on each account information included in the second sorting result;
[0062] The second generating subunit is configured to generate a display effect corresponding to the target account information.
[0063] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0064] processor;
[0065] a memory for storing instructions executable by the processor;
[0066] The processor is configured to execute the instructions to implement the information display method as described in any one of the first aspects above.
[0067] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute a method for displaying information as described in any one of the first aspects above.
[0068] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute the method for displaying information described in any one of the first aspects above.
[0069] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0070] By adopting this method, the account information of multiple accounts including the target account is stored in the cache in the chronological order of satisfying the time. Then, when the display task of displaying special effects is executed, the display special effects corresponding to each account information are generated in turn based on the arrangement order of each account information in the cache, and displayed in the virtual space. Through the asynchronous mechanism of the cache, the triggering of the display special effects and the displaying of the display special effects are separated, thereby avoiding the loss of display special effects or the interruption of display special effects caused by the accumulation of display special effects triggered by multiple accounts, and ensuring the full display of the display special effects corresponding to each account information.
[0071] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0073] Figure 1 The present invention is a flowchart of a method for displaying information according to an exemplary embodiment.
[0074] Figure 2 The present invention is a flowchart showing a method for determining whether a triggering condition for displaying special effects is satisfied according to an exemplary embodiment.
[0075] Figure 3 The present invention is a flowchart showing the steps of determining a preset display special effect triggering condition according to an exemplary embodiment.
[0076] Figure 4 The present invention is a flowchart showing a method for generating account information of a target account according to an exemplary embodiment.
[0077] Figure 5 The present invention is a flowchart showing a method for sorting and storing account information according to an exemplary embodiment.
[0078] Figure 6 The figure is a flowchart of a method for displaying special effects according to an exemplary embodiment.
[0079] Figure 7 The invention is a flowchart of a method for generating a display special effect according to an exemplary embodiment.
[0080] Figure 8 The present invention is a flowchart of a method for generating display special effects for target account information according to an exemplary embodiment.
[0081] Fig. 9 The figure is a flowchart showing an example of a method for displaying information according to an exemplary embodiment.
[0082] Fig.10 The invention is a block diagram of a device for displaying information according to an exemplary embodiment.
[0083] Fig.11 It is a block diagram of an electronic device according to an exemplary embodiment.
[0084] Fig.12 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0085] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0086] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0087] It should also 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 display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0088] Figure 1 is a flow chart of a method for displaying information according to an exemplary embodiment. The method for displaying information is used in a server. For example, the present application takes a live broadcast platform integrated with a server as an example for illustration. Therefore, the method for displaying information is applied to a live broadcast platform, such as Figure 1 As shown, the method for displaying the information includes the following steps.
[0089] In step S110 , in response to the interaction request, it is determined whether the target account corresponding to the interaction request satisfies a preset display special effect triggering condition.
[0090] In implementation, the live broadcast platform monitors the interaction requests of each account in each virtual space in real time. Specifically, the live broadcast platform uses each account in each virtual space as the monitoring dimension. In the virtual space, the account interacts with the live broadcast account corresponding to the virtual space by initiating an interaction request. In addition, during the interaction between the account and the live broadcast account, when the live broadcast platform detects that the interaction between the account and the live broadcast account meets certain conditions, it will trigger the corresponding display effects in the virtual space to reflect the effect of this interaction. Therefore, for the interaction request triggered by the current target account, the live broadcast platform responds to the interaction request and determines whether the target account that initiated the interaction request meets the preset display effect triggering conditions.
[0091] Optionally, the interaction request initiated by the target account may be a virtual resource sending request triggered by the target account, or may be a comment message sending request, a barrage message sending request, etc. The embodiment of the present disclosure does not limit the interaction type.
[0092] In step S120, if the target account satisfies the preset display special effect triggering condition, the satisfaction time when the target account satisfies the display special effect triggering condition is determined, and the account information of the target account is generated based on the satisfaction time.
[0093] In implementation, for the interactive request triggered by the target account this time, if the live broadcast platform determines that the target account meets the preset display special effect triggering condition, it will further determine the satisfaction time when the current target account meets the display special effect triggering condition based on the time when the interactive request is triggered this time. Then, the live broadcast platform generates the account information of the target account based on the satisfaction time.
[0094] In step S130, the account information of multiple accounts including the target account is sorted in chronological order according to the satisfaction time included in the account information, and the sorted account information is stored in the cache.
[0095] Among them, multiple accounts are accounts that meet the triggering conditions for displaying special effects.
[0096] In practice, since the display of special effects is triggered based on the interaction between the account and the live broadcast account that meets certain conditions (the conditions met by the interaction also correspond to the display of special effects triggering conditions), there may be multiple accounts that meet the preset display of special effects triggering conditions within the preset time period, and these multiple accounts also include the target account that meets the display of special effects triggering conditions based on this interaction request. For these multiple accounts, the live broadcast platform sorts the account information of multiple accounts including the target account in chronological order according to the satisfaction time contained in the account information corresponding to each account (i.e., the specific satisfaction time when the display of special effects triggering conditions are met). Then, the live broadcast platform stores the account information of the sorted multiple accounts in the cache.
[0097] Optionally, the cache may be a cache space of a heap structure, a cache space of a stack structure, or a cache space in the form of a queue. The embodiment of the present disclosure does not limit the format of the cache space and may be set according to actual business needs.
[0098] In step S140 , based on the arrangement order of the multiple account information in the cache, a display effect corresponding to each account information is generated and displayed in the virtual space.
[0099] During implementation, a scheduled task is preset in the live broadcast platform. Based on the time period corresponding to the scheduled task, the live broadcast platform sequentially processes the display tasks of the display effects corresponding to each account information in the cache. Specifically, the live broadcast platform generates the display effects corresponding to each account information based on the arrangement order of multiple account information in the cache, and displays the display effects in the virtual space.
[0100] In the above information display method, the live broadcast platform responds to the interaction request and determines whether the target account corresponding to the interaction request satisfies the preset display special effect triggering condition. If the target account satisfies the preset display special effect triggering condition, the live broadcast platform determines the satisfaction time when the target account satisfies the display special effect triggering condition, and generates the account information of the target account based on the satisfaction time. Then, the live broadcast platform sorts the account information of multiple accounts including the target account in chronological order according to the satisfaction time contained in the account information, and stores the sorted account information in the cache. Based on the arrangement order of multiple account information in the cache, the live broadcast platform generates the display special effects corresponding to each account information and displays it in the virtual space. By adopting this method, the account information of multiple accounts including the target account is stored in the cache in the chronological order of satisfying the time. Then, when the display task of displaying special effects is executed, the display special effects corresponding to each account information are generated in turn based on the arrangement order of each account information in the cache, and displayed in the virtual space. Through the asynchronous mechanism of the cache, the triggering of the display special effects and the displaying of the display special effects are separated, thereby avoiding the loss of display special effects or the interruption of display special effects caused by the accumulation of display special effects triggered by multiple accounts, and ensuring the full display of the display special effects corresponding to each account information.
[0101] In an exemplary embodiment, if Figure 2 As shown, in step S110, in response to the interaction request, determining whether the target account corresponding to the interaction request meets the preset display special effect triggering condition can be specifically implemented by the following steps:
[0102] In step S211, in response to the interaction request, the account interaction activity of the target account corresponding to the interaction request is updated.
[0103] In implementation, for each account in the virtual space, the live broadcast platform records the interaction activity of each account with the live broadcast account. When the target account triggers an interaction request, the live broadcast platform responds to the interaction request and updates the account interaction activity corresponding to the target account.
[0104] Optionally, the account interaction activity index can be determined by, but is not limited to, one or more of the account's interaction times, interaction frequency, and amount of interactive virtual resources. The disclosed embodiment does not limit the method for determining the account interaction activity, which can be determined based on actual business needs.
[0105] In step S212, when the account interaction activity reaches a preset activity threshold, it is determined that the target account meets the preset display special effect triggering condition.
[0106] Among them, the live broadcast platform pre-sets an activity threshold for determining interactive activity, and the activity threshold is used to determine whether the account can trigger display effects. Therefore, the pre-set activity threshold can also be used as a trigger condition for displaying special effects.
[0107] In implementation, when the account interaction activity corresponding to the target account reaches a preset activity threshold, the live broadcast platform determines that the target account meets the preset display special effect trigger condition. The meeting of the display special effect trigger condition indicates that the live broadcast platform can generate a display special effect for the account information of the target account.
[0108] In this embodiment, the account interaction activity and the preset activity threshold are used to determine whether the target account meets the preset display special effect triggering condition, thereby realizing the inspection of the display special effect triggering condition of the target account.
[0109] In an exemplary embodiment, there are multiple types of display effects, and each type of display effect corresponds to a different display effect triggering condition, that is, each type of display effect corresponds to a different account interaction activity (that is, activity threshold), such as Figure 3 As shown, in step S212, when the account interaction activity reaches a preset activity threshold, determining whether the target account meets the preset display special effect triggering condition can be specifically achieved by the following steps:
[0110] Step S301, when the account interaction activity meets the preset activity threshold, in the corresponding relationship between the account interaction activity and the display effect, determine the target display effect corresponding to the account interaction activity of the target account.
[0111] In implementation, since there are many types of display effects, there are multiple discrimination conditions corresponding to various types of display effects, that is, there are multiple activity thresholds. When the account interaction activity meets the preset activity threshold (that is, the target activity threshold in the activity threshold), the live broadcast platform determines the target display effect corresponding to the account activity of the target account in the correspondence between the account interaction activity and the display effect. The target display effect is also the display effect corresponding to the target activity threshold. For example, the types of display effects include type A, type B, and type C. For these three types of display effects: type A display effects correspond to the first activity threshold, type B display effects correspond to the second activity threshold, and type C display effects correspond to the third activity threshold. Among them, the first activity threshold is less than the second activity threshold, and the second activity threshold is less than the third activity threshold. When the account activity of the target account reaches the second activity threshold but does not reach the third activity threshold, based on the correspondence, the live broadcast platform determines that the account activity of the target account corresponds to type B display effects.
[0112] Step S302, determining whether the target account satisfies the target display special effect triggering condition corresponding to the target display special effect.
[0113] In implementation, based on determining the account interaction activity of the target display special effect, in this case, the live broadcast platform determines that the target account currently meets the target display special effect triggering condition corresponding to the target display special effect.
[0114] In this embodiment, for various types of display effects, the live broadcast platform pre-sets a correspondence between account interaction activity and display effects, and determines the target display effects that the target account meets based on the correspondence, thereby realizing the determination of the display effects triggered by each account in the virtual space.
[0115] In an exemplary embodiment, there may be multiple types of display effects in the virtual space, and each type of display effect corresponds to a special effect identifier, such as Figure 4 As shown, in step S120, generating the account information of the target account based on the meeting time can be specifically implemented by the following steps:
[0116] Step S401, obtaining an account identifier corresponding to a target account and a special effect identifier of a target display special effect corresponding to the target account.
[0117] In implementation, the live broadcast platform obtains the account identifier corresponding to the target account and the special effect identifier of the display special effect corresponding to the target account. The account identifier of the target account may be, but is not limited to, an account ID (identify). The display special effect corresponding to the target account is determined based on the account activity of the target account, and each type of display special effect corresponds to a special effect identifier, thereby determining the special effect identifier of the display special effect corresponding to the target account.
[0118] Step S402, generating account information corresponding to the target account according to the account identifier and special effect identifier corresponding to the target account and the satisfaction time for the target account to satisfy the target display special effect.
[0119] During implementation, the live broadcast platform generates account information corresponding to the target account based on the account ID and special effect ID corresponding to the target account and the time when the target account satisfies the target display special effect.
[0120] Among them, the satisfaction time for the target account to meet the target display special effect can be the trigger time of the last interaction request that reaches the preset interaction activity within a preset time period, and the embodiment of the present disclosure is not limited to this.
[0121] Optionally, when there is only one display special effect, the account information may not include a special effect identifier, that is, a unified display special effect is used by default.
[0122] In this embodiment, account information is generated based on the special effect identifier, account identifier and satisfaction time of the display special effect. The type of the display special effect is reflected by the special effect identifier in the account information. The execution order of the display special effect is determined by the satisfaction time included in the account information. The account information can realize sequential storage of different types of display special effects triggered by multiple accounts.
[0123] In an exemplary embodiment, if Figure 5 As shown, in step S130, according to the satisfaction time included in the account information, the account information of multiple accounts including the target account is sorted in chronological order, and the sorted account information is stored in the cache. This can be specifically achieved by the following steps:
[0124] Step S501, obtaining account information corresponding to multiple accounts including a target account within a preset time period.
[0125] In implementation, since the display special effect triggering condition is determined based on the account interaction activity of each account, within a preset time period, there may be multiple accounts including the currently determined target account that meet the display special effect triggering condition, and thus corresponding multiple account information is generated. Then, the live broadcast platform obtains the account information corresponding to the multiple accounts within the preset time period.
[0126] Step S502, sorting the account information of multiple accounts including the target account according to the time sequence of the meeting time contained in the account information to obtain a first sorting result.
[0127] In implementation, the account information includes the time when the account meets the conditions for triggering the display of special effects. The live broadcast platform sorts the account information of multiple accounts including the target account according to the chronological order of the satisfaction time contained in the account information to obtain the current first sorting result.
[0128] Step S503: based on the first sorting result, the account information of multiple accounts including the target account is stored in a preset cache.
[0129] In implementation, the live broadcast platform stores the account information of multiple accounts including the target account in a cache based on the first sorting result, and the account information is used to trigger the display special effects. The account information of multiple accounts is stored in the cache to achieve asynchronous triggering and displaying of the display special effects.
[0130] In this embodiment, each account information is sorted according to the satisfaction time contained in the account information, and the sorted multiple account information is stored in the cache, the display order of the display effects corresponding to the multiple account information is clarified, and asynchronous processing of triggering the display effects and displaying the display effects is realized, thereby avoiding the problem of display effect loss and interruption when directly processing multiple display effects.
[0131] In an exemplary embodiment, if Figure 6 As shown, the method also includes:
[0132] Step S601, detecting whether there is any display effect being displayed in the current virtual space.
[0133] In implementation, the live broadcast platform detects whether there is a display effect being displayed in the current virtual space. Specifically, detecting whether there is a display effect being displayed in the virtual space can be implemented by, but not limited to, a threshold function, which is not described in detail in the embodiment of the present disclosure.
[0134] Step S602: if there is no display effect being displayed, a step of generating a display effect corresponding to each account information based on the arrangement order of the multiple account information in the cache is executed.
[0135] In implementation, if the display special effect being displayed does not exist in the virtual space, the live broadcast platform executes step S130, that is, the step of generating a display special effect corresponding to each account information based on the sorting order of the multiple account information in the cache. Specifically, the specific processing process of S130 has been described in the above embodiment and will not be repeated here.
[0136] In this embodiment, the display order of the display special effects is determined by reading the account information stored in the cache, and then, according to the display order of the display special effects, the display special effects corresponding to each account information are generated for display in the virtual space, thereby ensuring the sequential display of the display special effects and avoiding the loss and interruption of the display special effects through the cache mechanism, thereby improving the display stability of the display special effects.
[0137] In an exemplary embodiment, if Figure 7 As shown, in step S140, based on the arrangement order of multiple account information in the cache, the specific processing process of generating the display special effect corresponding to each account information includes the following steps:
[0138] Step S701: based on the arrangement order of multiple account information in the cache, the account information ranked first in the cache is used as the target account information.
[0139] In implementation, the live broadcast platform reads the account information in the cache in sequence based on the arrangement order of multiple account information in the cache. Specifically, the live broadcast platform determines the target account information based on the account information ranked first in the cache, reads the target account information, and processes it.
[0140] Step S702: Generate display effects corresponding to the target account information.
[0141] In implementation, for the read target account information, the live broadcast platform generates a display effect corresponding to the target account information based on a preset display effect generation algorithm. Optionally, the display effect may include an account identifier in the target account information, which is used to identify the account that triggers the display effect when displaying the display effect.
[0142] Optionally, the method for generating display effects may be, but is not limited to, pre-storing the display effects in the live broadcast platform, and the live broadcast platform, based on the triggering of the account information, calls the method for generating display effects to generate the corresponding display effects, and adds the account identifier contained in the account information to the display effects to distinguish the triggering object of the display effects. Therefore, the method for generating display effects in this application is not limited.
[0143] In this embodiment, the display effects corresponding to each account information stored in the cache are generated in sequence through the sorting order of each account information stored in the cache, and displayed in the virtual space, thereby ensuring the sequential display of the display effects, and avoiding the loss and interruption of the display effects through the cache mechanism, thereby improving the display stability of the display effects.
[0144] In another exemplary embodiment, for multiple types of display effects, there may also be an execution priority between each display effect. For example, when the satisfaction times corresponding to multiple account information are relatively close, that is, the satisfaction times corresponding to the multiple account information are all included in a preset duration (for example, 3 seconds), the display effects corresponding to the multiple account information can be reordered based on the priority of the display effects to ensure that the overall cache is sorted according to the satisfaction time, and the display effects with higher priority within the preset duration are displayed first, such as Figure 8 As shown, in step S140, based on the arrangement order of multiple account information in the cache, the specific processing process of generating the display special effect corresponding to each account information includes the following steps:
[0145] Step S801 : reading account information according to a preset time period based on the sorting order of multiple account information in the cache.
[0146] In implementation, the live broadcast platform reads the account information according to a preset time period based on the sorting order of multiple accounts in the cache. For example, the multiple account information in the cache is read according to a time period of 3 seconds. For example, the top 3 account information in the cache is all included in the 3-second time period. Therefore, the live broadcast platform reads the top 3 account information in the cache in the first time period.
[0147] Step S802, for each account information included in each time period, according to the correspondence between the special effect identifier contained in each account information and the display special effect priority, the account information belonging to each special effect identifier is sorted from large to small according to the display special effect priority, to obtain a second sorting result.
[0148] In implementation, for each account information contained in each time period, the live broadcast platform sorts the account information to which each special effect identifier belongs from large to small display special effect priority according to the correspondence between the special effect identifier contained in each account information and the display special effect priority, and obtains the second sorting result. For example, in the first time period, the top three account information in the cache are read, and the order of these three account information from front to back in the cache is account information A, account information B and account information C, and the special effect identifiers contained in these three account information are special effect identifier A, special effect identifier B and special effect identifier C, respectively. Based on the correspondence between the special effect identifier and the display special effect priority, the display special effect priority corresponding to these three account information can be expressed by the special effect identifier as follows: special effect identifier C (corresponding display special effect) takes precedence over special effect identifier B, and special effect identifier B takes precedence over special effect identifier A. Therefore, based on the order of the display special effect priority from large to small, the account information in the first time period is re-sorted to obtain the second sorting result, that is, from front to back, they are account information C, account information B and account information C.
[0149] Optionally, when the special effect identifiers included in the two account information are the same, indicating that the priorities of the display special effects corresponding to the two account information are the same, then at this time, the sorting order of the two account information is still maintained according to the meeting time in the two account information.
[0150] Step S803: Based on each account information included in the second sorting result, the account information ranked first in the second sorting result is determined as the target account information.
[0151] In implementation, for each account information rearranged within each time period, the live broadcast platform determines the account information ranked first in the second sorting result as the target account information based on the order of each account information included in the second sorting result.
[0152] Step S804: Generate display effects corresponding to the target account information.
[0153] In implementation, the live broadcast platform generates a display effect corresponding to the target account information. Specifically, the method for generating the display effect has been described in detail in step S702, and will not be repeated here.
[0154] In this embodiment, the display order of the display effects corresponding to the account information in each time period is re-determined in combination with the arrangement order of each account information stored in the cache and the display priority of each display effect. Then, the display effects corresponding to the account information in each time period are generated in sequence and displayed in the virtual space, thereby ensuring the sequential display of the display effects, avoiding the loss and interruption of the display effects through the cache mechanism, and improving the display stability of the display effects.
[0155] In an exemplary embodiment, if Fig. 9 As shown, an example of a method for displaying information is provided, the example comprising:
[0156] Step 901, within a preset time period, in response to an interaction request, determining whether a target account satisfies a preset display special effect triggering condition.
[0157] Step 902, generating account information corresponding to each account according to the satisfying time and account ID corresponding to the account satisfying the preset display special effect triggering condition.
[0158] Step 903: sort the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and store the sorted account information in a cache (redis).
[0159] Step 904 , detecting whether there is a display effect being displayed in the current virtual space; if there is no display effect being displayed, taking the account information ranked first in the cache as the target account information.
[0160] Step 905: Generate display effects corresponding to the target account information and display them in the virtual space.
[0161] It should be understood that although Figure 1-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 9 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0162] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0163] Fig.10 is a block diagram of a display device for information according to an exemplary embodiment. Fig.10 The device includes a first determining unit 1002, a second determining unit 1004, a sorting unit 1006 and a first generating unit 1008.
[0164] The first determining unit 1002 is configured to execute, in response to the interaction request, determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition;
[0165] The second determining unit 1004 is configured to determine the time when the target account satisfies the preset display special effect triggering condition if the target account satisfies the preset display special effect triggering condition, and generate account information of the target account based on the satisfying time;
[0166] The sorting unit 1006 is configured to sort the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and store the sorted account information in a cache; the multiple accounts are accounts that meet the display special effect triggering condition;
[0167] The first generating unit 1008 is configured to generate a display effect corresponding to each account information based on the arrangement order of the multiple account information in the cache, and display it in the virtual space.
[0168] In an exemplary embodiment, the first determining unit 1002 includes:
[0169] An updating subunit, configured to execute, in response to the interaction request, updating the account interaction activity of the target account corresponding to the interaction request;
[0170] The first determination subunit is configured to determine whether the target account meets a preset display special effect trigger condition when the account interaction activity reaches a preset activity threshold.
[0171] In an exemplary embodiment, the first determining subunit is specifically configured to determine, in the correspondence between the account interaction activity and the display effect, a target display effect corresponding to the account interaction activity of the target account when the account interaction activity satisfies a preset activity threshold;
[0172] Determine whether the target account meets the target display special effect triggering condition corresponding to the target display special effect.
[0173] In an exemplary embodiment, there are multiple types of display special effects, and each type of display special effect corresponds to a special effect identifier. The second determining unit 1004 includes:
[0174] A first acquisition subunit is configured to execute acquisition of an account identifier corresponding to a target account and a special effect identifier of a target display special effect corresponding to the account interaction activity of the target account;
[0175] The first generating subunit is configured to generate account information corresponding to the target account according to the account identifier and the special effect identifier corresponding to the target account and the satisfaction time for the target account to satisfy the target display special effect.
[0176] In an exemplary embodiment, the sorting unit 1006 includes:
[0177] A second acquisition subunit is configured to acquire account information corresponding to multiple accounts including the target account within a preset time period;
[0178] A sorting subunit is configured to sort the account information of multiple accounts including the target account according to the time sequence of the satisfying time included in the account information to obtain a first sorting result;
[0179] The storage subunit is configured to store the account information of multiple accounts including the target account in a preset cache based on the first sorting result.
[0180] In an exemplary embodiment, the apparatus 1000 further includes:
[0181] A detection unit, configured to detect whether there is a display effect being displayed in the current virtual space;
[0182] The second generating unit is configured to execute the step of generating a display special effect corresponding to each account information based on the arrangement order of the multiple account information in the cache if there is no display special effect being displayed.
[0183] In an exemplary embodiment, the first generating unit 1008 includes:
[0184] The processing subunit is configured to execute the arrangement order of the plurality of account information in the cache, and sequentially use the account information ranked first in the cache as the target account information;
[0185] The second generating subunit is configured to generate display effects corresponding to the target account information.
[0186] In another exemplary embodiment, the first generating unit 1008 includes:
[0187] A reading subunit is configured to read the account information according to a time period of a preset length based on a sorting order of the plurality of account information in the cache;
[0188] The sorting subunit is configured to perform, for each account information included in each time period, sorting the account information to which each special effect identifier belongs from large to small according to the correspondence between the special effect identifier included in each account information and the display special effect priority, to obtain a second sorting result;
[0189] The second determining subunit is configured to determine the account information ranked first in the second sorting result as the target account information based on each account information included in the second sorting result;
[0190] The second generating subunit is configured to generate display effects corresponding to the target account information.
[0191] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0192] Fig.11 1 is a block diagram of an electronic device 1100 for executing a method for displaying information according to an exemplary embodiment. For example, the electronic device 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0193] Reference Fig.11 , the electronic device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
[0194] The processing component 1102 generally controls the overall operation of the electronic device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
[0195] The memory 1104 is configured to store various types of data to support operations on the electronic device 1100. Examples of such data include instructions for any application or method operating on the electronic device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, an optical disk, or a graphene memory.
[0196] The power supply component 1106 provides power to various components of the electronic device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1100.
[0197] The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0198] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the electronic device 1100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting an audio signal.
[0199] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0200] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the electronic device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of the components, such as the display and keypad of the electronic device 1100, and the sensor assembly 1114 can also detect the position change of the electronic device 1100 or the components of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the device 1100, and the temperature change of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0201] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0202] In an exemplary embodiment, the electronic device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0203] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by a processor 1120 of the electronic device 1100 to perform the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0204] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by the processor 1120 of the electronic device 1100 to complete the above method.
[0205] Fig.12 1 is a block diagram of an electronic device 1200 for executing a method for displaying information according to an exemplary embodiment. For example, the electronic device 1200 may be a server. Fig.12 , the electronic device 1200 includes a processing component 1220, which further includes one or more processors, and a memory resource represented by a memory 1222 for storing instructions that can be executed by the processing component 1220, such as an application. The application stored in the memory 1222 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1220 is configured to execute the instructions to perform the above method.
[0206] The electronic device 1200 may further include a power supply component 1224 configured to perform power management of the electronic device 1200, a wired or wireless network interface 1226 configured to connect the electronic device 1200 to a network, and an input / output (I / O) interface 1228. The electronic device 1200 may operate based on an operating system stored in the memory S22, such as Windows Server, MacOS X, Unix, Linux, FreeBSD, or the like.
[0207] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.
[0208] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0209] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for displaying information, characterized in that: The method comprises: In response to the interaction request, determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition; If the target account satisfies a preset display special effect triggering condition, determining a satisfaction time when the target account satisfies the display special effect triggering condition, and generating account information of the target account based on the satisfaction time; According to the satisfaction time contained in the account information, the account information of multiple accounts including the target account is sorted in chronological order, and the sorted account information is stored in a cache; the multiple accounts are accounts that meet the display special effect triggering condition; Based on the arrangement order of the plurality of account information in the cache, the account information is read according to a time period of a preset duration, and the account information within the first time period is reordered based on the order of priority of the display special effects from large to small to obtain a second sorting result; Based on each account information included in the second sorting result, the account information ranked first in the second sorting result is determined as the target account information; Generate a display effect corresponding to each target account information, add the account identifier contained in the account information to the display effect, mark the display effect with a distinguishing mark of the triggering object, and display it in the virtual space.
2. The method for displaying information according to claim 1, characterized in that: The step of responding to the interaction request and determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition includes: In response to the interaction request, updating the account interaction activity of the target account corresponding to the interaction request; When the account interaction activity reaches a preset activity threshold, it is determined that the target account meets a preset display special effect trigger condition.
3. The method for displaying information according to claim 2, characterized in that: When the account interaction activity reaches a preset activity threshold, determining that the target account meets a preset display special effect trigger condition includes: When the account interaction activity meets a preset activity threshold, in the correspondence between the account interaction activity and the display effect, determining a target display effect corresponding to the account interaction activity of the target account; It is determined that the target account satisfies a target display special effect triggering condition corresponding to the target display special effect.
4. The method for displaying information according to claim 2 or 3, characterized in that: There are multiple types of display special effects, and each type of display special effect corresponds to a special effect identifier. The generating of the account information of the target account based on the satisfying time includes: Obtaining an account identifier corresponding to the target account and a special effect identifier of a target display special effect corresponding to the account interaction activity of the target account; Account information corresponding to the target account is generated according to the account identifier corresponding to the target account, the special effect identifier, and the time at which the target account satisfies the target display special effect.
5. The method for displaying information according to claim 1, characterized in that: The step of sorting the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and storing the sorted account information in a cache includes: Obtaining account information corresponding to multiple accounts including the target account within a preset time period; sorting the account information of multiple accounts including the target account according to the time sequence of the satisfying time included in the account information to obtain a first sorting result; Based on the first sorting result, the account information of multiple accounts including the target account is stored in a preset cache.
6. The method for displaying information according to any one of claims 1 to 3 or 5, characterized in that: The method further comprises: Detect whether there are any display effects being displayed in the current virtual space; If there is no display special effect being displayed, the step of generating a display special effect corresponding to each account information based on the arrangement order of the plurality of account information in the cache is performed.
7. The method for displaying information according to claim 1, characterized in that: The generating a display effect corresponding to each of the account information based on the arrangement order of the plurality of account information in the cache includes: Based on the arrangement order of the plurality of account information in the cache, the account information ranked first in the cache is sequentially used as the target account information; Generate a display effect corresponding to the target account information.
8. An information display device, characterized in that: The device comprises: A first determination unit is configured to execute, in response to the interaction request, determining whether a target account corresponding to the interaction request satisfies a preset display special effect triggering condition; A second determining unit is configured to determine, if the target account satisfies a preset display special effect triggering condition, a satisfaction time when the target account satisfies the display special effect triggering condition, and generate account information of the target account based on the satisfaction time; a sorting unit configured to sort the account information of multiple accounts including the target account in chronological order according to the satisfaction time included in the account information, and store the sorted account information in a cache; the multiple accounts are accounts that meet the display special effect triggering condition; The first generating unit is configured to execute an arrangement order of the plurality of account information in the cache, read the account information according to a time period of a preset length, reorder the account information within the first time period based on the order of priority of the display special effect from large to small, and obtain a second sorting result; based on the account information included in the second sorting result, determine the account information ranked first in the second sorting result as the target account information in turn; generate a display special effect corresponding to each target account information, add the account identifier included in the account information to the display special effect, distinguish the triggering object of the display special effect, and display it in the virtual space.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the information display method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for displaying information as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Character virtual gift giving method, device and equipment and storage medium
CN111698523A