Virtual resource sending method and device, equipment and storage medium
By generating and storing special effects data and resource icons for virtual resources using large-scale material models, the problem of low efficiency in virtual resource generation is solved, achieving efficient resource management and display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies have low efficiency in generating virtual resources, making it difficult to support rapid updates in live streaming rooms.
Images are processed using large-scale material models to generate special effects data and resource icons for virtual resources, which are then stored in a database. The terminal retrieves metadata as needed to display the special effects data or resource icons.
It significantly shortens the production cycle of virtual resources, improves generation efficiency, reduces bandwidth pressure, avoids network congestion and performance bottlenecks, and improves data access efficiency.
Smart Images

Figure CN121908024A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of multimedia technology, and in particular to a method, apparatus, device and storage medium for transmitting virtual resources. Background Technology
[0002] In a live stream, viewers can send virtual resources (such as virtual gifts) to the streamer. Currently, virtual resources are typically generated manually offline, which is time-consuming and inefficient, making it difficult to support the rapid updating of virtual resources within the live stream. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, and storage medium for sending virtual resources. The technical solution of this disclosure is as follows.
[0004] According to one aspect of the embodiments of this disclosure, a method for sending virtual resources is provided, the method comprising: In response to the material generation instruction, the image used to generate the first virtual resource is processed through the material large model to obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate materials for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource. Store the special effects data and the resource icons separately; First metadata is obtained based on the storage address of the special effects data, and second metadata is obtained based on the storage address of the resource icon. The first metadata and the second metadata are then stored in the database. In response to receiving a resource acquisition request from a terminal, the system retrieves at least one of the first metadata and the second metadata from the database and sends the retrieved metadata to the terminal. The resource acquisition request is used to request the acquisition of the first virtual resource, and the terminal is used to display the special effects data or the resource icon based on the retrieved metadata.
[0005] In some embodiments, the first virtual resource is a virtual resource that can only be sent to a first object, and the process of acquiring the image includes: Obtain images that meet preset conditions from the historical live video of the first object.
[0006] In some embodiments, the first virtual resource corresponds to multiple special effects data, and the process of processing the image used to generate the first virtual resource through a large material model to obtain the special effects data of the first virtual resource includes at least one of the following: There are multiple images in the historical live video that meet the preset conditions. The multiple images are processed by the material large model to obtain multiple special effects data. The images that meet the preset conditions are expanded using the large material model to obtain multiple expanded images. The images and the multiple expanded images are then processed to obtain multiple special effects data.
[0007] In some embodiments, the resource acquisition request is used to request the display of the first virtual resource, and the step of retrieving at least one of the first metadata and the second metadata from the database and sending the retrieved metadata to the terminal in response to receiving the resource acquisition request from the terminal includes: In response to receiving a resource acquisition request from the terminal and the terminal meeting the display scenario of the first virtual resource, the first metadata is retrieved from the database and sent to the terminal; The display scenario is associated with at least one of the following: the host of the live broadcast room displayed on the terminal, the logged-in user of the terminal, and the live broadcast room information.
[0008] In some embodiments, the resource acquisition request is used to request the display of virtual resources on the resource panel, the resource panel being used to display multiple virtual resources, and the resource acquisition request is also used to request the display of other virtual resources. The method further includes: In response to receiving a resource acquisition request from the terminal, a plurality of second virtual resources are determined, and the terminal satisfies the display strategy of the plurality of second virtual resources; Obtain first metadata of the plurality of second virtual resources from the database; Determine the display position information of the first virtual resource and the plurality of second virtual resources on the resource panel; The terminal sends the display location information of the first virtual resource and the plurality of second virtual resources, as well as the first meta-information of the plurality of second virtual resources, to the terminal. The terminal is used to display the first virtual resource and the plurality of second virtual resources on the resource panel based on the display location information and the first meta-information.
[0009] In some embodiments, the first metadata further includes other information about the special effects data, and the second metadata further includes other information about the first virtual resource. The step of retrieving at least one of the first metadata and the second metadata from the database and sending the retrieved metadata to the terminal in response to receiving a resource acquisition request from the terminal includes: When the first virtual resource can only be sent to the first object, in response to receiving the first resource acquisition request from the terminal, two pieces of metadata of the first virtual resource are obtained from the database and the special effects data and the resource icon are obtained based on the two pieces of metadata. The two pieces of metadata, the special effects data and the resource icon are sent to the terminal. The first resource acquisition request is sent when the terminal displays the live room of the first object. When the first virtual resource is only allowed to be sent by the second object, in response to receiving the second resource acquisition request from the terminal, the target metadata or the information identifier in the target metadata is obtained from the database and the target metadata or the information identifier is sent to the terminal. The second resource acquisition request is sent when the first virtual resource is sent. The information identifier is used to identify the target metadata. The terminal is used to obtain the corresponding special effects data or resource icon based on the target metadata or the information identifier. The target metadata is the metadata indicated by the second resource acquisition request in the first metadata and the second metadata.
[0010] In some embodiments, obtaining the target metadata or the information identifier in the target metadata from the database and sending the target metadata or the information identifier to the terminal includes: When the virtual resource request volume is less than a preset threshold, the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the special effects data or the resource icon based on the target metadata. When the virtual resource request volume is not less than a preset threshold, the information identifier in the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the target metadata based on the information identifier and to obtain the special effects data or the resource icon based on the target metadata. The storage address in the target metadata is replaced with the storage address of a common image of multiple virtual resources to obtain candidate metadata; in response to receiving a third resource request from the terminal, based on the login object of the terminal, the target type metadata is determined from the target metadata and the candidate metadata and the target type metadata is sent to the terminal, and the third resource request carries the information identifier.
[0011] In some embodiments, determining the target type metadata from the target metadata and the candidate metadata based on the login object of the terminal includes: If the total amount of virtual resources sent by the logged-in object meets the preset conditions, the target metadata will be determined as the metadata of the target type. If the total amount of virtual resources sent by the logged-in object does not meet the preset conditions, the candidate metadata will be determined as the metadata of the target type.
[0012] In some embodiments, the preset condition is that the total amount of virtual resources sent by the logged-in object reaches a preset threshold, or the preset condition is that the total amount of virtual resources sent by the logged-in object is ranked in the first preset position.
[0013] In some embodiments, obtaining the target metadata or the information identifier in the target metadata from the database and sending the target metadata or the information identifier to the terminal includes: If the second resource request is used to request the display of the special effects of the first virtual resource in the live broadcast room, the first meta-information or the information identifier in the first meta-information is obtained from the database and the first meta-information or the information identifier is sent to the terminal. If the second resource request is used to request the display of the resource icon of the first virtual resource in the slot of the live broadcast room, the second metadata or the information identifier in the second metadata is obtained from the database and sent to the terminal.
[0014] In some embodiments, the method further includes: In response to receiving the second resource request from the terminal, a preset time period is sent to the terminal, the preset time period being used to instruct the terminal to send the request after a delay of the preset time period after receiving the target metadata or the information identifier.
[0015] In some embodiments, the method further includes: In response to receiving a resource query request from any service, the virtual resource indicated by the resource query request is retrieved from the cache of the service. If the virtual resource indicated by the resource query request is not stored in the cache of the service, the virtual resource indicated by the resource query request is searched in the distributed cache, which is used to cache the metadata of the virtual resource in the database.
[0016] In some embodiments, the method further includes: In response to an update to any metadata of the first virtual resource in the database, the updated metadata is synchronized to the distributed cache.
[0017] In some embodiments, the method further includes at least one of the following: In response to receiving a first resource query request from any service, the metadata of multiple virtual resources is queried through a general resource interface. The first resource query request is used to query multiple virtual resources of a first type, and the virtual resources of the first type are virtual resources common to multiple objects. In response to receiving a second resource query request from any service, a virtual resource is queried based on at least one information identifier carried in the second resource query request. The second resource query request is used to query a second type of virtual resource or a third type of virtual resource. The second type of virtual resource can only be sent to one first object, and the third type of virtual resource can only be sent to one second object.
[0018] According to another aspect of the embodiments of this disclosure, a virtual resource sending apparatus is provided, the apparatus comprising: The processing unit is configured to execute a response to a material generation instruction, process the image used to generate the first virtual resource through a material large model, and obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate material for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource. The storage unit is configured to store the special effects data and the resource icons respectively; The storage unit is further configured to obtain first metadata based on the storage address of the special effects data, obtain second metadata based on the storage address of the resource icon, and store the first metadata and the second metadata in the database. The sending unit is configured to respond to a resource acquisition request received from a terminal by retrieving at least one of the first metadata and the second metadata from the database and sending the retrieved metadata to the terminal. The resource acquisition request is used to request the acquisition of the first virtual resource, and the terminal is used to display the special effects data or the resource icon based on the retrieved metadata.
[0019] In some embodiments, the first virtual resource is a virtual resource that can only be sent to a first object, and the method further includes an acquisition unit configured to perform: Obtain images that meet preset conditions from the historical live video of the first object.
[0020] In some embodiments, the first virtual resource corresponds to multiple special effects data, and the processing unit is configured to perform at least one of the following: There are multiple images in the historical live video that meet the preset conditions. The multiple images are processed by the material large model to obtain multiple special effects data. The images that meet the preset conditions are expanded using the large material model to obtain multiple expanded images. The images and the multiple expanded images are then processed to obtain multiple special effects data.
[0021] In some embodiments, the resource acquisition request is used to request the display of the first virtual resource, and the sending unit is configured to perform: In response to receiving a resource acquisition request from the terminal and the terminal meeting the display scenario of the first virtual resource, the first metadata is retrieved from the database and sent to the terminal; The display scenario is associated with at least one of the following: the host of the live broadcast room displayed on the terminal, the logged-in user of the terminal, and the live broadcast room information.
[0022] In some embodiments, the resource acquisition request is used to request the display of virtual resources on the resource panel, the resource panel being used to display multiple virtual resources, and the resource acquisition request is also used to request the display of other virtual resources. The apparatus further includes: The determining unit is configured to perform an action in response to receiving a resource acquisition request from the terminal, determining a plurality of second virtual resources, wherein the terminal satisfies the display strategy of the plurality of second virtual resources; The acquisition unit is configured to retrieve first metadata of the plurality of second virtual resources from the database; The determining unit is further configured to determine the display position information of the first virtual resource and the plurality of second virtual resources on the resource panel; The sending unit is further configured to send the display location information of the first virtual resource and the plurality of second virtual resources, as well as the first meta-information of the plurality of second virtual resources, to the terminal. The terminal is used to display the first virtual resource and the plurality of second virtual resources on the resource panel based on the display location information and the first meta-information.
[0023] In some embodiments, the first metadata further includes other information about the special effects data, and the second metadata further includes other information about the first virtual resource. The sending unit is configured to execute: When the first virtual resource can only be sent to the first object, in response to receiving the first resource acquisition request from the terminal, two pieces of metadata of the first virtual resource are obtained from the database and the special effects data and the resource icon are obtained based on the two pieces of metadata. The two pieces of metadata, the special effects data and the resource icon are sent to the terminal. The first resource acquisition request is sent when the terminal displays the live room of the first object. When the first virtual resource is only allowed to be sent by the second object, in response to receiving the second resource acquisition request from the terminal, the target metadata or the information identifier in the target metadata is obtained from the database and the target metadata or the information identifier is sent to the terminal. The second resource acquisition request is sent when the first virtual resource is sent. The information identifier is used to identify the target metadata. The terminal is used to obtain the corresponding special effects data or resource icon based on the target metadata or the information identifier. The target metadata is the metadata indicated by the second resource acquisition request in the first metadata and the second metadata.
[0024] In some embodiments, the sending unit is configured to perform: When the virtual resource request volume is less than a preset threshold, the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the special effects data or the resource icon based on the target metadata. When the virtual resource request volume is not less than a preset threshold, the information identifier in the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the target metadata based on the information identifier and to obtain the special effects data or the resource icon based on the target metadata. The storage address in the target metadata is replaced with the storage address of a common image of multiple virtual resources to obtain candidate metadata; in response to receiving a third resource request from the terminal, based on the login object of the terminal, the target type metadata is determined from the target metadata and the candidate metadata and the target type metadata is sent to the terminal, and the third resource request carries the information identifier.
[0025] In some embodiments, the sending unit is configured to perform: If the total amount of virtual resources sent by the logged-in object meets the preset conditions, the target metadata will be determined as the metadata of the target type. If the total amount of virtual resources sent by the logged-in object does not meet the preset conditions, the candidate metadata will be determined as the metadata of the target type.
[0026] In some embodiments, the preset condition is that the total amount of virtual resources sent by the logged-in object reaches a preset threshold, or the preset condition is that the total amount of virtual resources sent by the logged-in object is ranked in the first preset position.
[0027] In some embodiments, the sending unit is configured to perform: If the second resource request is used to request the display of the special effects of the first virtual resource in the live broadcast room, the first meta-information or the information identifier in the first meta-information is obtained from the database and the first meta-information or the information identifier is sent to the terminal. If the second resource request is used to request the display of the resource icon of the first virtual resource in the slot of the live broadcast room, the second metadata or the information identifier in the second metadata is obtained from the database and sent to the terminal.
[0028] In some embodiments, the sending unit is further configured to perform: In response to receiving the second resource request from the terminal, a preset time period is sent to the terminal, the preset time period being used to instruct the terminal to send the request after a delay of the preset time period after receiving the target metadata or the information identifier.
[0029] In some embodiments, the apparatus further includes a query unit configured to perform: In response to receiving a resource query request from any service, the virtual resource indicated by the resource query request is retrieved from the cache of the service. If the virtual resource indicated by the resource query request is not stored in the cache of the service, the virtual resource indicated by the resource query request is searched in the distributed cache, which is used to cache the metadata of the virtual resource in the database.
[0030] In some embodiments, the apparatus further includes an update unit configured to perform: In response to an update to any metadata of the first virtual resource in the database, the updated metadata is synchronized to the distributed cache.
[0031] In some embodiments, the query unit is further configured to perform at least one of the following: In response to receiving a first resource query request from any service, the metadata of multiple virtual resources is queried through a general resource interface. The first resource query request is used to query multiple virtual resources of a first type, and the virtual resources of the first type are virtual resources common to multiple objects. In response to receiving a second resource query request from any service, a virtual resource is queried based on at least one information identifier carried in the second resource query request. The second resource query request is used to query a second type of virtual resource or a third type of virtual resource. The second type of virtual resource can only be sent to one first object, and the third type of virtual resource can only be sent to one second object.
[0032] According to another aspect of the embodiments of this disclosure, an electronic device is provided, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the above-described method for sending virtual resources.
[0033] According to another aspect of the present disclosure, a computer-readable storage medium is provided that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-described method for sending virtual resources.
[0034] According to another aspect of the present disclosure, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the above-described method for sending virtual resources.
[0035] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0036] This disclosure provides a method for sending virtual resources. This method only requires inputting images into a large material model to automatically generate special effects data and icons for the virtual resources, eliminating the need for manual design and production of virtual resources, significantly shortening the production cycle and improving efficiency. Furthermore, the special effects data and resource icons are stored separately, achieving decoupling between the two. This allows the terminal to obtain special effects data and resource icons on demand, without downloading all data of the virtual resources each time, reducing bandwidth pressure and avoiding network congestion. In scenarios where resource icons are displayed, only the resource icons need to be loaded, avoiding lag and loading timeouts caused by simultaneously loading special effects data. This on-demand download not only improves the access efficiency of virtual resource data but also avoids performance bottlenecks. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0038] Figure 1 This is a schematic diagram illustrating an implementation environment according to an exemplary embodiment.
[0039] Figure 2 This is a flowchart illustrating a method for sending virtual resources according to an exemplary embodiment.
[0040] Figure 3 This is a flowchart illustrating another method for sending virtual resources according to an exemplary embodiment.
[0041] Figure 4 This is a flowchart illustrating the generation of a special effect according to an exemplary embodiment.
[0042] Figure 5 This is a schematic diagram illustrating a model switching according to an exemplary embodiment.
[0043] Figure 6 This is a schematic diagram of a resource panel according to an exemplary embodiment.
[0044] Figure 7 This is a flowchart illustrating the generation process of a virtual resource according to an exemplary embodiment.
[0045] Figure 8 This is a flowchart illustrating the configuration process of a resource panel according to an exemplary embodiment.
[0046] Figure 9 This is a schematic diagram of a live streaming room according to an exemplary embodiment.
[0047] Figure 10 This is a flowchart illustrating the acquisition of special effects data according to an exemplary embodiment.
[0048] Figure 11 This is a flowchart illustrating a process for obtaining a resource icon according to an exemplary embodiment.
[0049] Figure 12 This is a schematic diagram of a caching logic according to an exemplary embodiment.
[0050] Figure 13 This is a schematic diagram illustrating a multi-level cache according to an exemplary embodiment.
[0051] Figure 14 This is a flowchart illustrating the process of generating and using a virtual resource according to an exemplary embodiment.
[0052] Figure 15 This is a schematic diagram of a virtual resource link according to an exemplary embodiment.
[0053] Figure 16 This is a block diagram illustrating a virtual resource sending apparatus according to an exemplary embodiment.
[0054] Figure 17 This is a block diagram illustrating a terminal according to an exemplary embodiment.
[0055] Figure 18 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation
[0056] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0057] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0058] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the images and historical live videos involved in this disclosure were obtained with full authorization.
[0059] The method for sending virtual resources provided in this disclosure can be executed by an electronic device, which can be at least one of a terminal and a server. Figure 1 This is a schematic diagram of an implementation environment provided in this embodiment of the disclosure. See also: Figure 1 The implementation environment includes: terminal 101 and server 102.
[0060] In this embodiment, a target application is installed on terminal 101, providing live streaming and live streaming viewing functions. Viewers can send virtual resources, such as virtual gifts, to the live stream. Server 102 is the backend server for the target application, providing backend services such as the service of sending virtual resources.
[0061] In some embodiments, virtual resources sent in the live broadcast room can be generated using a large-scale material model. Server 102 processes the images using the large-scale material model to obtain the virtual resource's effects data and resource icon. Based on the effects data and resource icon, it obtains the virtual resource's metadata and stores it in a database. Subsequently, when server 102 receives a resource acquisition request from terminal 101, it retrieves the metadata from the database and sends it to terminal 101, enabling terminal 101 to display the virtual resource's effects data or resource icon.
[0062] Terminal 101 can be at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. Terminal 101 has communication capabilities and can access wired or wireless networks. Terminal 101 can refer to one of multiple terminals; those skilled in the art will understand that the number of terminals can be more or less. Server 102 can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, server 102 and terminal 101 are directly or indirectly connected via wired or wireless communication; this disclosure does not limit this. Optionally, the number of servers 102 can be more or less; this disclosure does not limit this. Of course, server 102 can also include other functional servers to provide more comprehensive and diversified services. In this embodiment, server 102 undertakes the main computing work and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work and terminal 101 undertakes the main computing work; or, server 102 or terminal 101 can each undertake computing work independently, and this embodiment does not limit this.
[0063] Figure 2 This is a flowchart illustrating a method for sending virtual resources according to an exemplary embodiment, such as... Figure 2 As shown, the method is executed by the server and includes at least one of the following steps.
[0064] In step S201, in response to the material generation instruction, the image used to generate the first virtual resource is processed through the material large model to obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate materials for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource.
[0065] The large-scale material model is a deep learning model, such as an LLM (Large Language Model). The material generation instruction is used to instruct the large-scale material model to generate materials, which include the special effects data and resource icons of the virtual resources.
[0066] The first virtual resource is displayed in the live stream after being sent by viewers. It can display special effects through special effects data or by displaying a resource icon.
[0067] Optionally, the resource icon is not only displayed in a preset slot on the live stream interface after the virtual resource is sent to represent the first virtual resource sent, but it can also be displayed on the resource panel before sending. The resource panel displays multiple virtual resources, and the user, i.e., the logged-in user of the terminal, can select any virtual resource from the resource panel to send. The resource icon displayed on the resource panel and the resource icon displayed on the resource panel can be the same or different. If they are different, two resource icons can be generated from the large material model, one for display on the resource panel and the other for display in the preset slot.
[0068] The special effects data is used to display effects after the first virtual resource is sent in the live stream. The format of the special effects data can be set as needed, such as mp4 (a file format). Optionally, after processing the image through the large material model, the output special effects data is also the special effects video. After processing the special effects video in multiple dimensions such as duration, size, and speed, the processed special effects data is obtained, which is also a material compressed package. This processed special effects data can also be called a magic table. Optionally, for the special effects video generated by the large material model, the material template service can be called to process it. The material template service includes services such as end frame processing and logo (identification) processing. The material template can be pulled by the template ID to process the special effects video.
[0069] In step S202, special effects data and resource icons are stored respectively.
[0070] Specifically, storing special effects data yields its storage address; storing resource icons yields their storage address. Both the storage addresses for special effects data and resource icons can be link addresses, such as URLs (Uniform Resource Locators).
[0071] Optionally, special effects data is stored in a special effects database, and resource icons are stored in a resource icon library. They can also be stored in the same database, without any specific limitation here.
[0072] In step S203, first meta-information is obtained based on the storage address of the special effects data, and second meta-information is obtained based on the storage address of the resource icon. The first meta-information and the second meta-information are then stored in the database.
[0073] The first element information is used to indicate the special effects data, including the storage address of the special effects data. Furthermore, the first element information also includes other information about the special effects data, such as the duration of the special effects display. Additionally, the first element information also includes an identity document (ID) used to identify the first element information and also the special effects data.
[0074] The second element information is used to indicate the first virtual resource, including the storage address of the resource icon. Further, the second element information also includes other information about the first virtual resource besides its special effects, such as the name of the first virtual resource and the resource value required to replace it. Furthermore, the second element information also includes an information identifier ID, which is used to identify both the second element information and the first virtual resource.
[0075] In this embodiment, the virtual resource generated through the large material model can be a general virtual resource, meaning that multiple objects can send the virtual resource, and it is allowed to send the virtual resource to multiple objects. The virtual resource generated through the large material model can also be exclusive to a specific object, such as a virtual resource that can only be sent to a designated first object, i.e., the broadcaster, or a virtual resource that can only be sent to a designated second object, i.e., the viewer. Furthermore, the virtual resource can only be sent from the designated second object to the designated first object.
[0076] The database is used to store metadata about multiple virtual resources. It should be noted that steps S201-S203 above also realize the generation process of virtual resources, storing their metadata, effects data, and resource icons. This data can then be retrieved directly from storage for use without having to repeat steps S201-S203.
[0077] In step S204, in response to receiving a resource acquisition request from the terminal, at least one of the first metadata and the second metadata is obtained from the database and the obtained metadata is sent to the terminal. The resource acquisition request is used to request the acquisition of the first virtual resource, and the terminal is used to display special effects data or resource icons based on the obtained metadata.
[0078] A resource acquisition request can request two pieces of metadata or one piece of metadata.
[0079] In this process, the server can send metadata to the terminal, which then uses this metadata to retrieve special effects data and resource icons. Alternatively, the server can retrieve the special effects data and resource icons based on the metadata and then send these data, along with the metadata, to the terminal.
[0080] Among them, the resource acquisition request can be triggered when the terminal requests to display special effects data or resource icons, that is, the terminal acquires virtual resources in real time; the resource acquisition request can also be triggered when the terminal needs to pre-cache virtual resources, so that the terminal can cache the metadata, special effects data and resource icons locally in advance, and use them directly later without needing to acquire them in real time.
[0081] This disclosure provides a method for sending virtual resources. This method only requires inputting images into a large material model to automatically generate special effects data and icons for the virtual resources, eliminating the need for manual design and production of virtual resources, significantly shortening the production cycle and improving efficiency. Furthermore, the special effects data and resource icons are stored separately, achieving decoupling between the two. This allows the terminal to obtain special effects data and resource icons on demand, without downloading all data of the virtual resources each time, reducing bandwidth pressure and avoiding network congestion. In scenarios where resource icons are displayed, only the resource icons need to be loaded, avoiding lag and loading timeouts caused by simultaneously loading special effects data. This on-demand download not only improves the access efficiency of virtual resource data but also avoids performance bottlenecks.
[0082] The above Figure 2 The diagram shown is merely the basic process of this disclosure. The following section, based on a specific implementation method, further elaborates on the solution provided in this disclosure. See also... Figure 3 , Figure 3 This is a flowchart illustrating another method for sending virtual resources according to an exemplary embodiment, the method being performed by a server, and the method including at least one of the following steps.
[0083] In step S301, an image is obtained for generating the first virtual resource.
[0084] The first virtual resource can be a virtual resource shared by multiple objects; it can also be a virtual resource that can only be sent to the first object, i.e., exclusive to the first object; or it can be a virtual resource that can only be sent by the second object, i.e., exclusive to the second object. Optionally, the virtual resource exclusive to the first object is named a PGC virtual resource, and the virtual resource exclusive to the second object is named a UGC virtual resource.
[0085] In some embodiments, taking a first virtual resource as an example that can only be sent to a first object, the process of obtaining an image includes the following steps: obtaining an image that meets preset conditions from the historical live video of the first object.
[0086] The images obtained from historical live stream videos are essentially video frames. Optionally, multiple candidate images are obtained from the historical live stream videos, these images are scored, and the image with the highest score is used subsequently to generate virtual resources. The multiple candidate images can be selected randomly or at preset time intervals; no specific limitation is made here.
[0087] The system can score images based on factors such as resolution, content, the location and number of faces, and facial expressions to select high-quality images. Optionally, a large scoring model can be used to score multiple candidate images individually.
[0088] In other embodiments, if the first virtual resource is a virtual resource common to multiple objects or a virtual resource exclusive to the second object, the image can be an uploaded image or an image obtained from an uploaded video that meets preset conditions, without specific limitations here.
[0089] Optionally, after acquiring an image, its compliance and risk assessment are checked. Only if the image meets both compliance and risk requirements is it used to generate source material, thus controlling the image's compliance. Conversely, if an image fails to meet either requirement, it needs to be re-uploaded or re-acquired from the video.
[0090] In this embodiment, the first virtual resource is exclusive to a first object, and the image materials originate from the actual live stream footage of the first object. This means the virtual resource, exclusive to the first object, carries the object's personalized characteristics, enhancing the audience's sense of identification with the virtual resource. The style and scene of the images obtained from the live stream video are highly matched to the first object, resulting in higher coordination between the generated special effects data and resource icons. Furthermore, the images inherently possess live stream scene attributes, naturally adapting the generated virtual resource to the atmosphere of the live stream, improving its suitability and thus resulting in higher quality virtual resources. Moreover, there is no need to specially shoot and acquire image materials, saving the manpower and time costs of image material production, further improving the generation efficiency of virtual resources.
[0091] In step S302, in response to the material generation instruction, the image used to generate the first virtual resource is processed through the material large model to obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate the material of the virtual resource based on the image, and the resource icon is used to represent the first virtual resource.
[0092] In some embodiments, the first virtual resource corresponds to multiple special effects data. The process described above, which processes the images used to generate the first virtual resource through a large material model to obtain the special effects data of the first virtual resource, includes at least one of the following: there are multiple images in the historical live video that meet the preset conditions; the large material model is used to process the multiple images to obtain multiple special effects data; the large material model is used to expand the images that meet the preset conditions to obtain multiple extended images; the images and the multiple extended images are processed to obtain multiple special effects data.
[0093] The large-scale models used to process and expand the images can be different or the same; no specific restrictions are imposed here.
[0094] The first virtual resource corresponds to multiple special effect data, and each special effect data is used to display one special effect. Optionally, after each first virtual resource is sent, the special effects corresponding to these multiple special effect data are displayed in the live broadcast room, or after each first virtual resource is sent, the special effect corresponding to one special effect data is displayed. The special effect data used each time can be set as needed, such as using multiple special effect data in turn or in a certain order, without specific limitations here.
[0095] In this embodiment, all images are from the first object's historical live streams, and the generated special effects all bear the first object's personal unique characteristics, ensuring the exclusivity of the virtual resources. Furthermore, there is no need to design and create separate image materials for multiple special effects; images are directly extracted or expanded from existing live stream videos, saving the manpower and time costs of multiple rounds of material production. Moreover, since multiple images come from the same live stream video, and multiple expanded images come from the same image, the generated special effects will not have a disjointed style, but will be coordinated as a whole, thus ensuring the quality of multiple special effects.
[0096] In some embodiments, images are processed based on a large-scale material model and generated prompts to obtain special effects data and resource icons. The generated prompts indicate to the large-scale material model what kind of special effects data and resource icons should be generated. For example, the prompts may suggest the style of the special effects data and resource icons to be generated.
[0097] In some embodiments, for large asset models, the parameters of the large asset models can be adjusted based on the generated special effects and resource icons to optimize the large asset models and improve their performance.
[0098] In some embodiments, after the special effects are generated, they are reviewed to obtain a score. Only if the score meets certain conditions is the special effect used as the first virtual resource. If the score does not meet the conditions, the special effects are regenerated based on the original image or a new image using a large material model.
[0099] In some embodiments, special effects can be automatically reviewed using a large scoring model, or they can be reviewed manually; no specific limitations are specified here. Review rules can be set as needed, such as reviewing special effects based on the position, number, and expression of faces in the effects.
[0100] In some embodiments, when generating special effects from a large material model, the large material model is called through model routing. Since there may be multiple requests calling the large material model at the same time, these requests can be handled based on priority or rate limiting strategies. If the generation fails, the generation of special effects can be retried, and the generation progress can be queried and callbacks can be made. The callback is to output a notification message that the special effects were successfully generated.
[0101] For example, see Figure 4 , Figure 4 This is a flowchart illustrating the generation of special effects according to an exemplary embodiment.
[0102] In some embodiments, different large-scale resource models can be used, and each large-scale resource model can correspond to a template. The template includes the identifier of the large-scale resource model used, its custom parameters, and the image information to be input. For tasks generated using large-scale resource models, the image information to be used is filled into the template, thus obtaining the task-specific information. In some embodiments, users need to pay to generate virtual resources using large-scale resource models; that is, each task generating virtual resources corresponds to an order, and therefore the task-specific information is the information in the order.
[0103] In some embodiments, users need to pay before using the large asset model. In other embodiments, after generating a virtual resource from the large asset model, payment for the virtual resource can be deducted from the corresponding replacement virtual resource when the virtual resource is sent. Using the large asset model requires payment of replacement virtual resources, and each virtual resource corresponds to a certain value of replacement virtual resources, which is the value of replacement virtual resources the user needs to pay to send the virtual resource.
[0104] For example, if the first virtual resource is exclusive to a first object, and the first object generates the first virtual resource using a large asset model, then after another object sends this virtual resource to the first object, the first object can obtain the corresponding replacement virtual resource. Therefore, a portion of the replacement virtual resource obtained by the first object can be deducted as payment for the virtual resource. Similarly, if the first virtual resource is exclusive to a second object, and the second object generates the first virtual resource using a large asset model, then after the second object sends the first virtual resource, a portion can be deducted from the corresponding replacement virtual resource to realize payment for the virtual resource.
[0105] Different large-scale asset models can be used. When switching between large-scale asset models, completed tasks are unaffected by the model switch; new tasks simply use the new large-scale asset model's usage protocol. For example, see... Figure 5 , Figure 5 This is a schematic diagram illustrating a model switching according to an exemplary embodiment.
[0106] After a task is submitted, the material generation service is provided by the material big model. Input parameters include the workflow name, callback address, serial number, image URL, and effect duration. Output parameters include a response code, task ID, and task status. The response code indicates whether the call to the material big model was successful. When querying results, the input parameter is either the task ID or serial number, and the output parameters include a response code, error message, task status, effect link address, and duration. The material big model can also proactively send notifications, such as providing a response code, after the task is completed or fails.
[0107] In step S303, special effects data and resource icons are stored respectively.
[0108] In some embodiments, an artificial intelligence service can be invoked to process the special effects data and package it into a material compressed package. The material compressed package is stored in the material platform, and the storage address and identifier of the special effects data are obtained. This identifier is also the information identifier of the first element information, which is used to identify both the special effects data and the first element information.
[0109] In step S304, the first meta-information is obtained based on the storage address of the special effects data, and the second meta-information is obtained based on the storage address of the resource icon. The first meta-information and the second meta-information are then stored in the database.
[0110] The storage locations for special effects data, resource icons, and the two metadata items can be set as needed; the three can be stored in the same or different locations. For example, resource icons and the two metadata items can be stored in one database, while special effects data can be stored in another database, such as in the media platform.
[0111] In some embodiments, the resource entity of the virtual resource is obtained through the first metadata and the second metadata.
[0112] Optionally, a type identifier is added to the first virtual resource to identify whether the first virtual resource is a general virtual resource, a virtual resource specific to the first object, or a virtual resource specific to the second object.
[0113] In some embodiments, the generated virtual resources are initialized and configured, that is, it is determined which object these generated virtual resources belong to, such as generating an ownership table, so as to facilitate the use of these virtual resources based on different objects in the future.
[0114] In some embodiments, a display strategy is configured for the generated virtual resources to determine in which scenarios and in which locations the virtual resources can be displayed.
[0115] The display strategy includes at least one of the following: the display scenario of the first virtual resource, the display priority of the first virtual resource on the resource panel, and the display position. The display scenario is associated with at least one of the following: the host of the live broadcast room displayed by the terminal, the login object of the terminal, and the live broadcast room information. The resource panel is used to display multiple virtual resources.
[0116] In some embodiments, the display scenarios include basic scenarios, activity scenarios, gender scenarios, PK scenarios, and AIGC (Artificial Intelligence Generated Content) scenarios. AIGC scenarios are those that display virtual resources generated through a large-scale material model. Basic scenarios are those other than special scenarios such as activity scenarios, PK scenarios, and gender scenarios. Each virtual resource can be displayed in one or more scenarios. Live stream information may include live stream type, version information, etc.
[0117] It should be noted that, for AIGC scenarios, the virtual resources exclusive to the first object in the live stream and the virtual resources exclusive to the current second object are displayed. The current second object is also the login object of the terminal.
[0118] In some embodiments, the live stream room displayed on the terminal may correspond to multiple display scenarios, and virtual resources corresponding to multiple display scenarios can be overlaid on the resource panel. Accordingly, these multiple virtual resources can be displayed on the resource panel based on the priority of the multiple display scenarios or the priority of the virtual resources, such as inserting virtual resources generated from the large model of the materials into the virtual resources of a certain display scenario. The priority of the multiple display scenarios and the priority of the virtual resources can also be determined based on at least one of the following: the host of the live stream room, the logged-in user of the terminal, and the live stream room information.
[0119] Accordingly, after acquiring multiple virtual resources based on the terminal's display scenario, since the virtual resources displayed on the current resource panel are determined based on the actual situation of the current live broadcast room and the logged-in user, different resource panels can be displayed for different viewers, thus forming a personalized resource panel for each user and realizing the personalized presentation of the resource panel.
[0120] Specifically, for any second object, after entering the live stream room of the first object, the user can view the virtual resources exclusive to the first object and the virtual resources exclusive to the second object on the resource panel of the live stream room.
[0121] For example, see Figure 6 , Figure 6 This is a schematic diagram of a resource panel according to an exemplary embodiment.
[0122] In some embodiments, the virtual resources exclusive to the first object are also automatically configured for gradual rollout, that is, the visibility of the virtual resources is gradually increased according to preset rules, from a small number of viewers to all viewers in stages, rather than being launched all at once. For example, 1% of viewers can see it after 1 minute, 10% of viewers can see it after 2 minutes, and 100% of viewers can see it after 5 minutes, so that the proportion of viewers who can see the virtual resources gradually increases. If all viewers can see the new virtual resources exclusive to the streamer at once, a large number of users may click to view and gift them at the same time, causing a sudden surge in server request peaks. By gradually rolling out the resources, the requests are distributed over several minutes, allowing the server to gradually handle the load and avoiding overload and lag.
[0123] For example, see Figure 7 , Figure 7 This is a flowchart illustrating the generation process of a virtual resource according to an exemplary embodiment.
[0124] In some embodiments, a display strategy is also configured on the resource panel for virtual resources specific to the second object. Specifically, in scenarios requiring the display of virtual resources specific to the second object, displaying these virtual resources on the virtual panel requires calling an RPC service. The activity RPC carries the specific virtual resource display strategy, ultimately determining the display format of the virtual resources specific to the second object in the resource panel through a three-level process: slot allocation, replacement of streamer-specific virtual resources, and replacement of user-historical-specific virtual resources. Slot allocation defines the display position and quantity of virtual resources specific to the second object in the resource panel. Streamer-specific virtual resource replacement adapts to the live streaming scenario, prioritizing the display of current streamer-specific virtual resources and replacing other streamer-specific virtual resources. User-historical-specific virtual resource replacement dynamically adjusts the display priority of virtual resources specific to the second object based on user behavior. Through this streamer-specific plus historical behavior replacement rule, the resource panel seen by users in different live streaming rooms and at different times is customized, avoiding a monotonous virtual resource display and enhancing the user's sense of identification with exclusive virtual resources.
[0125] It's important to note that business users need to pre-register their services within the system. This allows the system to recognize when a business scenario requires custom virtual resource display rules. The business side needs to develop a Remote Procedure Call (RPC) service to determine whether a user should display a specific virtual resource in a live stream—the virtual resource display hit logic. When a user opens the resource panel, the system forwards the user's request to the downstream registered RPC service. This service then performs three core checks: whether to display the virtual resource (e.g., some virtual resources are exclusive to the broadcaster or viewers); which virtual resources to display (i.e., filtering for eligible virtual resources); and the display position of the virtual resource on the resource panel (i.e., sorting and layout rules). The business-side RPC service first checks if the current broadcaster has exclusive virtual resources; if so, it prioritizes displaying them. Next, it checks if the currently logged-in user has exclusive virtual resources. Finally, it returns the results to the resource display service provider based on priority, which then displays the virtual resources on the resource panel.
[0126] For example, see Figure 8 , Figure 8 This is a flowchart illustrating the configuration process of a resource panel according to an exemplary embodiment.
[0127] In some embodiments, when displaying a virtual resource generated from a large material model on the resource panel, further advanced information can be shown. For example, selecting the virtual resource on the resource panel can display some interactive components corresponding to the virtual resource. Optionally, these interactive components can be displayed at the top of the resource panel to facilitate advanced operations based on these components. For example, the interactive components can be used to display other virtual resources associated with the virtual resource, thereby enabling the modification of the top component (Top Kit, TK) of the resource panel. Optionally, the display of virtual resources on the resource panel can be achieved through RPC open capabilities, such as the display of the top component.
[0128] In some embodiments, for virtual resources generated from large material models, the interaction when sending virtual resources can be customized, and the ways to use virtual resources can be expanded. For example, after sending virtual resources in a live broadcast room, if the version of the target application installed on the terminal is too low and the special effects cannot be displayed, the logged-in user of the terminal will be prompted to upgrade the version.
[0129] Finally, after completing the configuration of the first virtual resource, the ID of the first virtual resource is returned to the virtual resource service provider, which is also the backend service provider for displaying the virtual resource on the terminal.
[0130] It should be noted that the above steps S301-S304 are only used to illustrate the generation of one virtual resource. Through the above steps, multiple virtual resources can be generated and their metadata, effects data and resource icons can be stored, and then these data can be used to utilize the virtual resources.
[0131] In step S305, when the first virtual resource can only be sent to the first object, in response to receiving the first resource acquisition request from the terminal, two pieces of metadata of the first virtual resource are obtained from the database, and special effects data and resource icon are obtained based on the two pieces of metadata. The two pieces of metadata, special effects data and resource icon are sent to the terminal. The first resource acquisition request is sent when the terminal displays the live room of the first object.
[0132] The first element information also includes other information about the special effects data, and the second element information also includes other information about the first virtual resource.
[0133] In other embodiments, two pieces of metadata may be sent to the terminal, which then uses these two pieces of metadata to obtain special effects data and resource icons.
[0134] In step S306, when the first virtual resource only allows the second object to send, in response to receiving the second resource acquisition request from the terminal, the target metadata or the information identifier in the target metadata is obtained from the database and sent to the terminal. The second resource acquisition request is sent when the first virtual resource is sent. The information identifier is used to identify the target metadata. The terminal is used to obtain the corresponding special effects data or resource icon based on the target metadata or the information identifier. The target metadata is the metadata indicated by the second resource acquisition request in the first metadata and the second metadata.
[0135] In some embodiments, the method of determining whether to send target metadata or information identifier to the terminal based on the virtual resource request volume includes the following implementation: when the virtual resource request volume is less than a preset threshold, target metadata is obtained from the database and sent to the terminal, and the terminal is used to obtain special effects data or resource icons based on the target metadata; when the virtual resource request volume is not less than the preset threshold, information identifier in the target metadata is obtained from the database and sent to the terminal, and the terminal is used to obtain target metadata based on the information identifier and obtain special effects data or resource icons based on the target metadata; the storage address in the target metadata is replaced with the storage address of a common image of multiple virtual resources to obtain candidate metadata; in response to receiving a third resource request from the terminal, based on the login object of the terminal, target type metadata is determined from the target metadata and candidate metadata and sent to the terminal, and the third resource request carries an information identifier.
[0136] The virtual resource request volume can be defined as the number of requests for virtual resources received by the server per second, also known as QPS (Queries Per Second). The preset threshold can be set as needed.
[0137] In some embodiments, the virtual resource request volume is calculated separately for different requests for special effects data and requests for resource icons. That is, when requesting special effects data, it is determined whether the request volume of special effects data has reached a first threshold, and when requesting resource icons, it is determined whether the request volume of resource icons has reached a second threshold. The first threshold and the second threshold can be set as needed, such as the first threshold being 420,000 and the second threshold being 4,200.
[0138] For example, referring to Table 1, which is a schematic diagram of QPS and bandwidth cost according to an exemplary embodiment, requests for special effects data and requests for special effects icons correspond to different QPS and bandwidth costs. In this embodiment, a preset threshold is used to control the request volume and bandwidth cost, balancing bandwidth cost and user experience.
[0139] Table 1
[0140] In this embodiment, when the number of virtual resource requests is high, the server first sends an information identifier. Since the information identifier has a small data size, this reduces the amount of data transmitted in a single request, alleviating network bandwidth pressure under high concurrency and preventing the server from becoming overloaded due to massive data transmission. The two-step request process disperses request peaks, avoiding a concentrated impact when the number of virtual resource requests surges, resulting in a more balanced allocation of server resources and improving the system's concurrency resistance. Furthermore, only sending real metadata to eligible login objects reduces resource consumption from low-value requests, prioritizing bandwidth and storage resources for core scenarios. When virtual resource requests are low, metadata is sent directly without requiring additional requests from the terminal, resulting in smoother virtual resource loading and meeting the real-time experience needs in low-concurrency scenarios. When virtual resource requests are high, different strategies are executed based on the login object. For example, high-value login objects receive real metadata to ensure that their virtual resources are displayed without delay and with complete effects; ordinary objects receive a fallback image to avoid loading failures, black screens, and other issues, ensuring a basic display experience without completely affecting interaction. In other words, this fallback strategy avoids situations where virtual resources cannot be displayed due to insufficient resources during peak virtual resource request periods, maintaining user engagement.
[0141] In some embodiments, for the special effects display of virtual resources exclusive to the second object, not only can each terminal download the special effects data in real time, but the special effects data can also be merged into the data stream of the live broadcast room on the broadcaster's side. Thus, when the data stream of the live broadcast room is distributed to each terminal in the live broadcast room, each terminal can not only display the live broadcast room based on the data stream, but also display special effects in the live broadcast room.
[0142] The generic image is used to display effects and resource icons when the terminal does not have the necessary data. Since a generic image can be used by multiple virtual resources, it can be pre-cached on the terminal. Therefore, the image can be retrieved directly from the terminal based on its storage address, eliminating the need to retrieve it from the server and further reducing bandwidth costs.
[0143] In some embodiments, the server can selectively send target metadata and candidate metadata to multiple terminals during the metadata sending phase, and can also selectively send special effects data / resource icons and general images to multiple terminals during the special effects data / resource icon sending phase.
[0144] The second resource request can be used to request special effects data or resource icons. Optionally, the process of obtaining target metadata or information identifiers from the database and sending the target metadata or information identifiers to the terminal includes the following implementation methods: if the second resource request is used to request the display of special effects of the first virtual resource in the live broadcast room, the first metadata or information identifiers from the database are obtained and sent to the terminal; if the second resource request is used to request the display of resource icons of the first virtual resource in the slot of the live broadcast room, the second metadata or information identifiers from the database are obtained and sent to the terminal.
[0145] After the first virtual resource is sent to the live stream, it can either display its special effects within the live stream or its resource icon in a designated slot within the live stream. These two scenarios correspond to effect rendering and slot rendering, respectively. Displaying special effects requires effect data, while displaying the resource icon requires obtaining the resource icon. Therefore, in these two different scenarios, the corresponding metadata or information identifiers can be obtained respectively.
[0146] For example, see Figure 9 , Figure 9 This is a schematic diagram of a live streaming room according to an exemplary embodiment. In this diagram, special effects 901 are displayed on the live streaming room interface, and resource icons 902 are displayed in the slots of the live streaming room.
[0147] In this embodiment, the display timing of special effects and resource icons is completely different. Special effects are triggered in infrequent but have high user experience requirements, while icons are accessed in frequent scenarios. Returning them separately allows the terminal to load them on demand, avoiding the waste of resources caused by loading special effects data along with the icons. This ensures that the acquired resources are accurately adapted to the current scenario, reduces the load, and optimizes the performance experience.
[0148] In some embodiments, the process of determining the target type metadata from the target metadata and candidate metadata for the terminal-based login object includes the following implementation: when the total amount of virtual resources sent by the login object meets the preset conditions, the target metadata is determined as the target type metadata; when the total amount of virtual resources sent by the login object does not meet the preset conditions, the candidate metadata is determined as the target type metadata.
[0149] The preset condition indicates that the logged-in user has sent a sufficient amount of virtual resources. Optionally, the preset condition is that the total amount of virtual resources sent by the logged-in user reaches a preset threshold, or that the total amount of virtual resources sent by the logged-in user ranks in the top preset positions.
[0150] The total amount can refer to the total amount of virtual resources sent by the logged-in user in the current live stream room, or it can refer to the total amount of virtual resources sent by the logged-in user in multiple live stream rooms over a period of time, such as the total amount of virtual resources sent by the logged-in user in multiple live stream rooms in the past 30 days.
[0151] The total quantity can refer to the total number of virtual resources. However, since each virtual resource has a certain resource value, such as a price, the total quantity can also refer to the total resource value of the virtual resources sent out.
[0152] If the preset condition is that the total amount of virtual resources sent by the logged-in user ranks in the top preset positions, then the viewers in the live stream are ranked based on the total amount of virtual resources sent by each individual viewer. The larger the total amount, the higher the ranking. The top preset positions can be set as needed, such as the top 10%. Alternatively, the top preset positions can also be determined based on the amount of virtual resource requests. The larger the amount of virtual resource requests, the fewer the top preset positions, thus reducing bandwidth pressure.
[0153] In this embodiment, login users who send out more virtual resources receive real metadata, with smooth loading and complete display of resource effects and icons, meeting their immediate needs for high-frequency interaction. Login users who send out fewer virtual resources receive a fallback image to avoid situations where no display is possible due to resource loading failures. This concentrates limited server resources and bandwidth on login users who send out more virtual resources, ensuring their experience is not compromised. It achieves the goal of maximizing the experience for core login users and providing basic coverage for ordinary login users at the lowest cost, guaranteeing basic interactive experience while avoiding wasting terminal memory and bandwidth due to low-frequency use.
[0154] In some embodiments, in response to receiving a second resource request from a terminal, a preset time period is sent to the terminal. The preset time period is used to instruct the terminal to send the request after a delay of the preset time period after receiving the target metadata or information identifier.
[0155] This request includes requests to obtain special effects data / resource icons based on target metadata and requests to obtain target metadata based on information identifiers.
[0156] The preset time period, also known as the scattering time, can be set as needed, such as 5 seconds. This means that after receiving target metadata or information identifiers, the terminal does not immediately send a request based on the target metadata or information identifiers. Instead, it randomly selects a point in time within the preset time period to send the request. For example, if the preset time period is 5 seconds, the request can be sent after a 3-second interval after receiving the target metadata or information identifiers.
[0157] It should be noted that without the time-sharing mechanism, a large number of terminals will initiate requests simultaneously after receiving metadata or information identifiers, forming a request peak. This can easily lead to server bandwidth saturation and processor overload. The time-sharing mechanism disperses the terminal requests over time, breaking down the concentrated request peaks, allowing the server to handle them more easily and avoiding overload and crashes.
[0158] It should be noted that after the terminal obtains metadata, effects data, and resource icons, it caches them on the terminal for direct use later, without needing to retrieve them from the server each time. Therefore, after obtaining the target metadata, the terminal can first determine whether it has cached the effects data or resource icon indicated by the target metadata. If not, it then retrieves the corresponding effects data or resource icon from the server based on the target metadata. Similarly, after obtaining the information identifier, the terminal can first determine whether it has cached the metadata indicated by the information identifier. If not, it then retrieves the corresponding target metadata from the server based on the information identifier.
[0159] For example, see Figure 10 , Figure 10 This is a flowchart illustrating a process for acquiring special effects data according to an exemplary embodiment. After the first virtual resource is sent to the live stream, the server sends special effects display signaling to the terminals of each viewer in the live stream. Based on whether the QPS exceeds a preset threshold, the server sends first metadata or information identifiers, and the distribution time is staggered. On the terminal side, it determines whether the server has sent the first metadata. If not, it checks if the first metadata is cached locally. If not, it requests the first metadata via an interface. At this point, a crowd staggered request strategy can be used to determine whether to send target metadata or candidate metadata. If the server has sent the first metadata or the first metadata is cached locally, it directly checks if the special effects data is cached locally based on the first metadata. If a match is found, the data is displayed directly. If no match is found, the special effects data is downloaded in real-time using the crowd staggered request strategy, then displayed and cached.
[0160] For example, see Figure 11 , Figure 11 This is a flowchart illustrating a resource icon acquisition process according to an exemplary embodiment. The process is similar to that described above. Figure 10 The process is the same and will not be repeated here.
[0161] The above description uses the example of a first virtual resource being a virtual resource exclusive to a specific object. In other embodiments, the first virtual resource is a virtual resource shared by multiple objects. Optionally, multiple resource acquisition requests for the first virtual resource are triggered when the target application is cold-started, so as to pre-cache the two metadata items, special effects data, and resource icon of the first virtual resource on the terminal.
[0162] Optionally, the server also determines whether to send special effects data and resource icons of general virtual resources to the terminal based on the terminal's login status. Specifically, if the probability of the logged-in user entering the live stream is greater than a preset probability, then the special effects data and resource icons of general virtual resources are sent to them. If the probability of the logged-in user entering the live stream is less than the preset probability, only two pieces of metadata about the general virtual resources are sent to them. The special effects data and resource icons are only sent when the terminal enters the live stream, thus achieving frequency control of general virtual resources. The probability of the logged-in user entering the live stream can be determined based on the logged-in user's historical behavior.
[0163] Accordingly, all general virtual resources can be cached on the terminal in advance using the methods described above.
[0164] In this embodiment, different strategies are used to download different types of virtual resources. See Table 2, which shows a comparison of download strategies for different types of virtual resources.
[0165] Table 2
[0166] In this embodiment of the disclosure, the stage in which virtual resources are downloaded in advance can be referred to as the warm-up stage. Since the general virtual resources and the virtual resources specific to the first object have been cached on the terminal in advance during the warm-up stage, they can be displayed on the terminal in real time, resulting in no display delay.
[0167] In some embodiments, since there are many general virtual resources and virtual resources specific to the first object, the download is slow. Therefore, in some cases, the virtual resources to be displayed may not have been downloaded locally on the terminal yet. In such cases, the resource material API (Application Programming Interface) interface can be requested separately to obtain them.
[0168] For example, see Figure 12 , Figure 12 This is a schematic diagram of caching logic according to an exemplary embodiment. When a terminal requests to display special effects data or resource icons, it queries the local cache for corresponding metadata based on the information identifier carried in the request. If no match is found, a resource acquisition request is triggered to obtain the corresponding metadata and the corresponding feature data or resource icons. If a match is found, the local cache is checked again for the corresponding special effects data or resource icons. If a match is found, the data is displayed; otherwise, it is downloaded in real time and then displayed and cached.
[0169] In this embodiment, steps S305-S306 described above implement the process of responding to a resource acquisition request from a terminal, retrieving at least one of the first metadata and the second metadata from the database, and sending the retrieved metadata to the terminal. In this embodiment, the amount of virtual resources exclusive to the broadcaster is small, and pre-caching will not occupy too much memory and bandwidth on the terminal. Furthermore, all viewers entering the live broadcast room share the same batch of cached resources, making the server's batch distribution more efficient and avoiding repeated requests during subsequent high-frequency sending, thus reducing high-concurrency pressure. The amount of virtual resources exclusive to viewers is large, and on-demand requests avoid resource waste caused by all viewers pre-caching massive amounts of exclusive virtual resources. The terminal only requests resources when needed, significantly reducing server storage and transmission costs.
[0170] In other embodiments, where the resource acquisition request is used to request the display of a first virtual resource, the above-mentioned response to receiving the resource acquisition request from the terminal, retrieving at least one of first metadata and second metadata from the database and sending the retrieved metadata to the terminal, includes the following implementation: in response to receiving the resource acquisition request from the terminal and the terminal satisfying the display scenario of the first virtual resource, retrieving the first metadata from the database and sending the first metadata to the terminal; wherein, the display scenario is associated with at least one of the following: the host of the live broadcast room displayed by the terminal, the login object of the terminal, and the live broadcast room information.
[0171] In this embodiment, the display scenario is strongly correlated with the broadcaster, logged-in user, and live stream information. The terminal only receives the first metadata of virtual resources that match the current display scenario. This allows the virtual resources displayed by the terminal to be personalized to different viewers, achieving a personalized display tailored to the display scenario. Furthermore, the server only returns the corresponding metadata when the terminal meets the display scenario requirements. The terminal does not need to load the metadata of all virtual resources, significantly reducing bandwidth usage and memory consumption. The server filters out virtual resources that do not meet the conditions in advance by using the display scenario, distributing only accurate metadata and avoiding the transmission of useless data to the terminal. This effectively reduces the network bandwidth pressure and data processing costs of the server, especially suitable for high-concurrency live stream scenarios.
[0172] In some embodiments, where the resource acquisition request is used to request the display of virtual resources on a resource panel, and the resource panel is used to display multiple virtual resources, and the resource acquisition request is also used to request the display of other virtual resources, the following implementation method is further included: in response to receiving the resource acquisition request from the terminal, determining multiple second virtual resources, and the terminal satisfying the display strategy of the multiple second virtual resources; obtaining first metadata of the multiple second virtual resources from the database; determining the display position information of the first virtual resource and the multiple second virtual resources on the resource panel; sending the display position information of the first virtual resource and the multiple second virtual resources, as well as the first metadata of the multiple second virtual resources, to the terminal, and the terminal is used to display the first virtual resource and the multiple second virtual resources on the resource panel based on the display position information and the first metadata.
[0173] The display position of the first virtual resource and multiple second virtual resources can be determined based on the display priority among the virtual resources. For example, the higher the priority, the earlier the ranking.
[0174] In this embodiment, a single request retrieves all eligible virtual resources, eliminating the need for multiple requests to the server and resulting in faster resource panel loading. Furthermore, the server pre-plans the display positions of all virtual resources, allowing users to see an orderly arrangement of resources upon opening the resource panel, eliminating the need for manual filtering and optimizing the user experience.
[0175] In some embodiments, the terminal also uses isolation strategies to isolate different types of virtual resources cached on the terminal, such as general virtual resources, virtual resources specific to a first object, and virtual resources specific to a second object. General virtual resources are the basic, high-frequency resources of the live streaming room, used in almost every live interaction, while specific virtual resources are personalized, low-frequency resources. Their usage attributes and priorities are completely different. By isolating different types of virtual resources, the caching and cleanup operations of low-frequency, personalized virtual resources can be allowed to expand without affecting general virtual resources. After isolation, independent storage quota limits can be set for different types of virtual resources: for example, specific virtual resource caches have a certain limit, and when full, older specific virtual resources are cleaned up using LRU (Least Recently Used); while general virtual resource caches have separate limits with higher limits, fundamentally preventing the expansion of specific virtual resources from causing the cleanup of general virtual resources.
[0176] In step S307, in response to receiving a resource query request from any service, the virtual resource indicated by the resource query request is searched from the service's cache library.
[0177] In this embodiment of the disclosure, the server has multiple services associated with virtual resources, such as the service of displaying a resource panel, the service of ranking based on virtual resources in the activity list, the service of displaying a voting plugin in the group broadcast, the service of scoring based on virtual resources in the PK scenario, and the service of accumulating progress based on virtual resources in the wish list.
[0178] Each business has its own cache library, which is also the local cache of each business.
[0179] In step S308, if the virtual resource indicated by the resource query request is not stored in the service's cache library, the virtual resource indicated by the resource query request is searched from the distributed cache. The distributed cache is used to cache the metadata of the virtual resource in the database.
[0180] In this embodiment, the business cache, also known as the first-level cache, acts as a local cache for the business, prioritizing the response to query requests and enabling fast access. The distributed cache, also known as the second-level cache, supplements the local cache and can cache virtual resources associated with multiple businesses.
[0181] The database is used to cache the metadata of all virtual resources. If the distributed cache does not cache the virtual resource indicated by the resource query request, it can be retrieved by going back to the database.
[0182] In some embodiments, in response to an update of any metadata of a first virtual resource in the database, the updated metadata is synchronized to the distributed cache. This embodiment uses the first virtual resource as an example for illustration. Correspondingly, for any update of any metadata of any virtual resource in the CNC library, the updated metadata is synchronized to the distributed cache. Correspondingly, the database may also store resource icons; if the resource icon of any virtual resource is updated, the updated resource icon is also synchronized to the distributed cache. Similarly, the database may also store special effects data; if the special effects data of any virtual resource is updated, the updated special effects data is also synchronized to the distributed cache.
[0183] Optionally, data changes in the database can trigger CacheReload via the Kbus service (data bus / message queue), updating the data in the distributed cache in real time. Simultaneously, consistent polling tasks are used to periodically check data consistency between the database and the distributed cache, further preventing inconsistencies between the distributed cache and the database. For example, see... Figure 13 , Figure 13 This is a schematic diagram illustrating a multi-level cache according to an exemplary embodiment.
[0184] In this embodiment, the distributed cache serves as a fallback cache for all services. After synchronization and updates, regardless of which service's first-level cache misses, the latest resources can be retrieved when querying the distributed cache, thus avoiding the inconsistency problem where the database has been updated but the distributed cache still contains old data.
[0185] In this embodiment, to address the issue of excessively large amounts of cached data in a single query, the query chain is transformed into a multi-level cache-origin approach. The business's cache library, also known as the first-level cache, stores frequently accessed virtual resources for this business, offering fast response times and meeting the needs of high-frequency access scenarios. The distributed cache, also known as the second-level cache, serves as a fallback for all virtual resources and is faster than directly querying the database. Through this two-level cache hierarchy, most queries are completed in the first-level cache, with only a small number of requests entering the second-level cache, significantly improving overall query efficiency.
[0186] In some embodiments, different methods are used to query different types of virtual resources, including at least one of the following implementation methods: In response to receiving a first resource query request from any service, the metadata of multiple virtual resources is queried through a general resource interface. The first resource query request is used to query multiple virtual resources of a first type, and the virtual resources of the first type are virtual resources common to multiple objects; In response to receiving a second resource query request from any service, the virtual resources are queried based on at least one information identifier carried by the second resource query request. The second resource query request is used to query virtual resources of a second type or a third type. The virtual resources of the second type can only be sent to one first object, and the virtual resources of the third type can only be sent to one second object.
[0187] The first type of virtual resource is a virtual resource that is common to multiple objects, meaning it can be sent to multiple first objects or sent by multiple second objects. These common virtual resources may or may not include common virtual resources generated from the large asset model.
[0188] The second type of virtual resource is a virtual resource exclusive to a specific first object (the broadcaster), and the third type of virtual resource is a virtual resource exclusive to a specific second object (the viewer). Optionally, both the second and third types of virtual resources are virtual resources generated from large-scale material models.
[0189] In this process, at least one information identifier is used to query at least one virtual resource. Each information identifier is used to query one virtual resource. The information identifier is used to indicate the virtual resource and can be an information identifier of the first element or an information identifier of the second element.
[0190] Therefore, for both types of virtual resources, multiple virtual resources can be queried at once, that is, multiple virtual resources can be queried through an identifier list composed of multiple information identifiers.
[0191] In this embodiment, there are few general virtual resources, and the full query interface can return all data at once. After the terminal obtains the data, it can be cached for a long time without frequent requests, greatly reducing the pressure of repeated queries. Due to the large number of broadcasters and viewers, there are many virtual resources exclusive to broadcasters and viewers. Precise query by identifier can avoid redundant data transmission of massive amounts of exclusive virtual resources, returning only the target virtual resource information, saving server bandwidth and database query costs, and avoiding query timeouts.
[0192] In this embodiment, virtual resources are generated using large-scale material models, solving the problem of digitizing the process of creating millions of virtual resources online. This allows for the creation, display, and delivery of a single virtual resource within minutes. Furthermore, it addresses bandwidth costs by dynamically decomposing and distributing the special effects data and resource icons of millions of virtual resources for download, preventing unlimited expansion of bandwidth costs. The system architecture also supports the real-time generation of millions of gifts. Through multi-level caching, it enables real-time querying and display of virtual resources, thus resolving issues related to system availability and real-time performance.
[0193] For example, see Figure 14 , Figure 14 This is a flowchart illustrating the process of generating and using a virtual resource according to an exemplary embodiment. The process includes four stages: material generation, virtual resource generation, virtual resource display, and virtual resource delivery.
[0194] For example, see Figure 15 , Figure 15 This is a schematic diagram of a virtual resource link according to an exemplary embodiment. The link includes four main models: virtual resource configuration, panel display, terminal preloading, and virtual resource effect delivery. Virtual resources can be configured online through the main resource model, or individually offline. Once configured, they are stored in a database and subsequently used for terminal preloading, displaying the resource panel, and displaying special effects and icons after the virtual resources are sent out.
[0195] This disclosure provides a method for sending virtual resources. This method only requires inputting images into a large material model to automatically generate special effects data and icons for the virtual resources, eliminating the need for manual design and production of virtual resources, significantly shortening the production cycle and improving efficiency. Furthermore, the special effects data and resource icons are stored separately, achieving decoupling between the two. This allows the terminal to obtain special effects data and resource icons on demand, without downloading all data of the virtual resources each time, reducing bandwidth pressure and avoiding network congestion. In scenarios where resource icons are displayed, only the resource icons need to be loaded, avoiding lag and loading timeouts caused by simultaneously loading special effects data. This on-demand download not only improves the access efficiency of virtual resource data but also avoids performance bottlenecks.
[0196] Figure 16 This is a block diagram illustrating a virtual resource sending apparatus according to an exemplary embodiment. (Refer to...) Figure 16 The device includes: The processing unit 1601 is configured to execute a response to a material generation instruction, process the image used to generate the first virtual resource through a material large model, and obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate material for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource. Storage unit 1602 is configured to store special effects data and resource icons separately; Storage unit 1602 is also configured to obtain first meta-information based on the storage address of special effects data, obtain second meta-information based on the storage address of resource icon, and store the first meta-information and second meta-information in the database. The sending unit 1603 is configured to respond to a resource acquisition request received from a terminal by retrieving at least one of first metadata and second metadata from a database and sending the retrieved metadata to the terminal. The resource acquisition request is used to request the acquisition of a first virtual resource, and the terminal is used to display special effects data or resource icons based on the retrieved metadata.
[0197] In some embodiments, the first virtual resource is a virtual resource that can only be sent to a first object, and the method further includes an acquisition unit configured to perform: Extract images that meet preset conditions from the historical live video of the first object.
[0198] In some embodiments, the first virtual resource corresponds to multiple effects data, and the processing unit 1601 is configured to perform at least one of the following: There are multiple images in the historical live video that meet the preset conditions. The multiple images are processed separately using the large material model to obtain multiple special effects data. The images that meet the preset conditions are expanded using a large model of the source material to obtain multiple expanded images. The images and the multiple expanded images are then processed to obtain multiple special effects data.
[0199] In some embodiments, the resource acquisition request is used to request the display of a first virtual resource, and the sending unit 1603 is configured to perform: In response to receiving a resource acquisition request from a terminal and the terminal meeting the display scenario of the first virtual resource, the system retrieves the first metadata from the database and sends the first metadata to the terminal. Among them, the display scene is associated with at least one of the following: the host of the live broadcast room displayed on the terminal, the logged-in user of the terminal, and the live broadcast room information.
[0200] In some embodiments, the resource acquisition request is used to request the display of virtual resources on a resource panel, the resource panel being used to display multiple virtual resources, and the resource acquisition request is also used to request the display of other virtual resources. The apparatus further includes: The determining unit is configured to perform a response to receiving a resource acquisition request from the terminal, determining multiple second virtual resources, and the terminal satisfying the display strategy of the multiple second virtual resources; The acquisition unit is configured to retrieve first metadata of multiple second virtual resources from the database; The determining unit is also configured to determine the display position information of the first virtual resource and multiple second virtual resources on the resource panel; The sending unit 1603 is also configured to send the display location information of the first virtual resource and a plurality of second virtual resources, as well as the first element information of the plurality of second virtual resources, to the terminal, which is used to display the first virtual resource and the plurality of second virtual resources on the resource panel based on the display location information and the first element information.
[0201] In some embodiments, the first metadata also includes other information about the special effects data, and the second metadata also includes other information about the first virtual resource. The sending unit 1603 is configured to execute: When the first virtual resource can only be sent to the first object, in response to receiving the first resource acquisition request from the terminal, two pieces of metadata of the first virtual resource are obtained from the database and special effects data and resource icon are obtained based on the two pieces of metadata. The two pieces of metadata, special effects data and resource icon are sent to the terminal. The first resource acquisition request is sent when the terminal displays the live room of the first object. When the first virtual resource only allows the second object to send, in response to receiving the second resource acquisition request from the terminal, the target metadata or the information identifier in the target metadata is obtained from the database and sent to the terminal. The second resource acquisition request is sent when the first virtual resource is sent. The information identifier is used to identify the target metadata. The terminal is used to obtain the corresponding special effects data or resource icon based on the target metadata or the information identifier. The target metadata is the metadata indicated by the second resource acquisition request in the first metadata and the second metadata.
[0202] In some embodiments, the sending unit 1603 is configured to perform: When the virtual resource request volume is less than a preset threshold, target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain special effects data or resource icons based on the target metadata. When the virtual resource request volume is not less than a preset threshold, the information identifier in the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the target metadata based on the information identifier and to obtain special effects data or resource icons based on the target metadata. The storage address in the target metadata is replaced with the storage address of a common image of multiple virtual resources to obtain candidate metadata. In response to receiving a third resource request from the terminal, the target type metadata is determined from the target metadata and candidate metadata based on the terminal's login object, and the target type metadata is sent to the terminal. The third resource request carries an information identifier.
[0203] In some embodiments, the sending unit 1603 is configured to perform: If the total amount of virtual resources sent by the logged-in object meets the preset conditions, the target metadata will be determined as the metadata of the target type. If the total amount of virtual resources sent by the logged-in object does not meet the preset conditions, the candidate metadata will be determined as the metadata of the target type.
[0204] In some embodiments, the preset condition is that the total amount of virtual resources sent by the logged-in object reaches a preset threshold, or the preset condition is that the total amount of virtual resources sent by the logged-in object is ranked in the top preset position.
[0205] In some embodiments, the sending unit 1603 is configured to perform: If the second resource request is used to request the display of the special effects of the first virtual resource in the live broadcast room, the first meta information or the information identifier in the first meta information is obtained from the database and the first meta information or the information identifier is sent to the terminal. If the second resource request is used to request the display of the resource icon of the first virtual resource in the slot of the live broadcast room, the second meta-information or the information identifier in the second meta-information is obtained from the database and sent to the terminal.
[0206] In some embodiments, the sending unit 1603 is further configured to perform: In response to receiving a second resource request from the terminal, a preset time period is sent to the terminal. The preset time period is used to instruct the terminal to send the request after a delay of the preset time period after receiving the target metadata or information identifier.
[0207] In some embodiments, the apparatus further includes a query unit configured to perform: In response to receiving a resource query request from any service, the virtual resource indicated by the resource query request is retrieved from the service's cache. If the virtual resource indicated by the resource query request is not stored in the business's cache, the virtual resource indicated by the resource query request is retrieved from the distributed cache. The distributed cache is used to cache the metadata of the virtual resource in the database.
[0208] In some embodiments, the apparatus further includes an update unit configured to perform: In response to an update to any metadata of the first virtual resource in the database, the updated metadata is synchronized to the distributed cache.
[0209] In some embodiments, the query unit is also configured to perform at least one of the following: In response to receiving a first resource query request from any service, the metadata of multiple virtual resources is queried through the general resource interface. The first resource query request is used to query multiple virtual resources of the first type, which are virtual resources common to multiple objects. In response to receiving a second resource query request from any service, a virtual resource is queried based on at least one information identifier carried in the second resource query request. The second resource query request is used to query a second type of virtual resource or a third type of virtual resource. The second type of virtual resource can only be sent to one first object, and the third type of virtual resource can only be sent to one second object.
[0210] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0211] In some embodiments, the electronic device is provided as a terminal. Figure 17A structural block diagram of a terminal 1700 provided in an exemplary embodiment of this disclosure is shown. The terminal 1700 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1700 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0212] Typically, terminal 1700 includes a processor 1701 and a memory 1702.
[0213] Processor 1701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1701 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1701 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1701 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0214] The memory 1702 may include one or more computer-readable storage media, which may be non-transitory. The memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1702 are used to store at least one program code, which is executed by the processor 1701 to implement the virtual resource delivery method provided in the method embodiments of this disclosure.
[0215] In some embodiments, the terminal 1700 may also optionally include a peripheral device interface 1703 and at least one peripheral device. The processor 1701, memory 1702, and peripheral device interface 1703 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.
[0216] Peripheral interface 1703 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1701 and memory 1702. In some embodiments, processor 1701, memory 1702 and peripheral interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1701, memory 1702 and peripheral interface 1703 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0217] The radio frequency (RF) circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1704 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1704 may also include circuitry related to NFC (Near Field Communication), which is not limited in this disclosure.
[0218] Display screen 1705 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1705 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1701 for processing. In this case, display screen 1705 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1705, which serves as the front panel of terminal 1700; in other embodiments, there may be at least two display screens 1705, respectively disposed on different surfaces of terminal 1700 or in a folded design; in still other embodiments, display screen 1705 may be a flexible display screen, disposed on a curved or folded surface of terminal 1700. Furthermore, display screen 1705 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0219] The camera assembly 1706 is used to acquire images or videos. Optionally, the camera assembly 1706 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0220] The audio circuit 1707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1701 for processing, or input to the radio frequency circuit 1704 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1700. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1707 may also include a headphone jack.
[0221] Power supply 1708 is used to power the various components in terminal 1700. Power supply 1708 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1708 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0222] Those skilled in the art will understand that Figure 17 The structure shown does not constitute a limitation on terminal 1700 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0223] Figure 18 This is a schematic diagram of a server structure according to an embodiment of this application. The server 1800 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1801 and one or more memories 1802. The memories 1802 are used to store executable program code, and the processors 1801 are configured to execute the executable program code to implement the virtual resource sending methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated here.
[0224] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the aforementioned method for sending virtual resources. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0225] In an exemplary embodiment, a computer program product is also provided, the computer program product including a computer program that, when executed by a processor, implements the above-described method for sending virtual resources.
[0226] In some embodiments, the computer program product involved in this disclosure may be deployed on an electronic device for execution, or on multiple electronic devices located in one location, or on multiple electronic devices distributed in multiple locations and interconnected through a communication network. The multiple electronic devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0227] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims. All the above-described optional technical solutions can be combined in any way to form optional embodiments of this application, and will not be elaborated upon here.
[0228] It should be noted that the term "response" mentioned in this disclosure is used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which the operation depends are met, one or more operations performed may be performed in real time or may have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0229] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for sending virtual resources, characterized in that, The method includes: In response to the material generation instruction, the image used to generate the first virtual resource is processed through the material large model to obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate materials for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource. Store the special effects data and the resource icons separately; First metadata is obtained based on the storage address of the special effects data, and second metadata is obtained based on the storage address of the resource icon. The first metadata and the second metadata are then stored in the database. In response to receiving a resource acquisition request from a terminal, the system retrieves at least one of the first metadata and the second metadata from the database and sends the retrieved metadata to the terminal. The resource acquisition request is used to request the acquisition of the first virtual resource, and the terminal is used to display the special effects data or the resource icon based on the retrieved metadata.
2. The method for sending virtual resources according to claim 1, characterized in that, The first virtual resource is a virtual resource that can only be sent to the first object, and the process of acquiring the image includes: Images that meet preset conditions are obtained from the historical live video of the first object.
3. The method for sending virtual resources according to claim 2, characterized in that, The first virtual resource corresponds to multiple special effects data. The process of processing the image used to generate the first virtual resource through a large material model to obtain the special effects data of the first virtual resource includes at least one of the following: There are multiple images in the historical live video that meet the preset conditions. The multiple images are processed by the material large model to obtain multiple special effects data. The images that meet the preset conditions are expanded using the large material model to obtain multiple expanded images. The images and the multiple expanded images are then processed to obtain multiple special effects data.
4. The method for sending virtual resources according to claim 1, characterized in that, The resource acquisition request is used to request the display of the first virtual resource. The step of responding to receiving the resource acquisition request from the terminal by retrieving at least one of the first metadata and the second metadata from the database and sending the retrieved metadata to the terminal includes: In response to receiving a resource acquisition request from the terminal and the terminal meeting the display scenario of the first virtual resource, the first metadata is retrieved from the database and sent to the terminal; The display scenario is associated with at least one of the following: the host of the live broadcast room displayed on the terminal, the logged-in user of the terminal, and the live broadcast room information.
5. The method for sending virtual resources according to claim 4, characterized in that, The resource acquisition request is used to request the display of virtual resources on the resource panel, the resource panel being used to display multiple virtual resources, and the resource acquisition request is also used to request the display of other virtual resources. The method further includes: In response to receiving a resource acquisition request from the terminal, a plurality of second virtual resources are determined, and the terminal satisfies the display strategy of the plurality of second virtual resources; Obtain first metadata of the plurality of second virtual resources from the database; Determine the display position information of the first virtual resource and the plurality of second virtual resources on the resource panel; The terminal sends the display location information of the first virtual resource and the plurality of second virtual resources, as well as the first meta-information of the plurality of second virtual resources, to the terminal. The terminal is used to display the first virtual resource and the plurality of second virtual resources on the resource panel based on the display location information and the first meta-information.
6. The method for sending virtual resources according to claim 1, characterized in that, The first metadata also includes other information about the special effects data, and the second metadata also includes other information about the first virtual resource. The step of responding to receiving a resource acquisition request from the terminal, retrieving at least one of the first metadata and the second metadata from the database, and sending the retrieved metadata to the terminal, includes: When the first virtual resource can only be sent to the first object, in response to receiving the first resource acquisition request from the terminal, two pieces of metadata of the first virtual resource are obtained from the database and the special effects data and the resource icon are obtained based on the two pieces of metadata. The two pieces of metadata, the special effects data and the resource icon are sent to the terminal. The first resource acquisition request is sent when the terminal displays the live room of the first object. When the first virtual resource only allows the second object to send, in response to receiving the second resource acquisition request from the terminal, the target metadata or the information identifier in the target metadata is obtained from the database and sent to the terminal. The second resource acquisition request is sent when the first virtual resource is sent. The information identifier is used to identify the target metadata. The terminal is used to obtain the corresponding special effects data or resource icon based on the target metadata or the information identifier. The target metadata is the metadata indicated by the second resource acquisition request in the first metadata and the second metadata.
7. The method for sending virtual resources according to claim 6, characterized in that, The step of obtaining the target metadata or the information identifier in the target metadata from the database and sending the target metadata or the information identifier to the terminal includes: When the virtual resource request volume is less than a preset threshold, the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the special effects data or the resource icon based on the target metadata. When the virtual resource request volume is not less than a preset threshold, the information identifier in the target metadata is obtained from the database and sent to the terminal. The terminal is used to obtain the target metadata based on the information identifier and to obtain the special effects data or the resource icon based on the target metadata. The storage address in the target metadata is replaced with the storage address of a common image of multiple virtual resources to obtain candidate metadata; in response to receiving a third resource request from the terminal, based on the login object of the terminal, the target type metadata is determined from the target metadata and the candidate metadata and the target type metadata is sent to the terminal, and the third resource request carries the information identifier.
8. The method for sending virtual resources according to claim 7, characterized in that, The login object based on the terminal determines the target type metadata from the target metadata and the candidate metadata, including: If the total amount of virtual resources sent by the logged-in object meets the preset conditions, the target metadata will be determined as the metadata of the target type. If the total amount of virtual resources sent by the logged-in object does not meet the preset conditions, the candidate metadata will be determined as the metadata of the target type.
9. The method for sending virtual resources according to claim 8, characterized in that, The preset condition is that the total amount of virtual resources sent by the logged-in object reaches a preset threshold, or the preset condition is that the total amount of virtual resources sent by the logged-in object is ranked in the first preset position.
10. The method for sending virtual resources according to claim 6, characterized in that, The step of obtaining the target metadata or the information identifier in the target metadata from the database and sending the target metadata or the information identifier to the terminal includes: If the second resource request is used to request the display of the special effects of the first virtual resource in the live broadcast room, the first meta-information or the information identifier in the first meta-information is obtained from the database and the first meta-information or the information identifier is sent to the terminal. If the second resource request is used to request the display of the resource icon of the first virtual resource in the slot of the live broadcast room, the second metadata or the information identifier in the second metadata is obtained from the database and sent to the terminal.
11. The method for sending virtual resources according to claim 6, characterized in that, The method further includes: In response to receiving the second resource request from the terminal, a preset time period is sent to the terminal, the preset time period being used to instruct the terminal to send the request after a delay of the preset time period after receiving the target metadata or the information identifier.
12. The method for sending virtual resources according to claim 1, characterized in that, The method further includes: In response to receiving a resource query request from any service, the virtual resource indicated by the resource query request is retrieved from the cache of the service. If the virtual resource indicated by the resource query request is not stored in the cache of the service, the virtual resource indicated by the resource query request is searched in the distributed cache, which is used to cache the metadata of the virtual resource in the database.
13. The method for sending virtual resources according to claim 12, characterized in that, The method further includes: In response to an update to any metadata of the first virtual resource in the database, the updated metadata is synchronized to the distributed cache.
14. The method for sending virtual resources according to claim 12, characterized in that, The method further includes at least one of the following: In response to receiving a first resource query request from any service, the metadata of multiple virtual resources is queried through a general resource interface. The first resource query request is used to query multiple virtual resources of a first type, and the virtual resources of the first type are virtual resources common to multiple objects. In response to receiving a second resource query request from any service, a virtual resource is queried based on at least one information identifier carried in the second resource query request. The second resource query request is used to query a second type of virtual resource or a third type of virtual resource. The second type of virtual resource can only be sent to one first object, and the third type of virtual resource can only be sent to one second object.
15. A device for sending virtual resources, characterized in that, The device includes: The processing unit is configured to execute a response to a material generation instruction, process the image used to generate the first virtual resource through a material large model, and obtain the special effects data and resource icon of the first virtual resource. The material large model is used to generate material for the virtual resource based on the image, and the resource icon is used to represent the first virtual resource. The storage unit is configured to store the special effects data and the resource icons respectively; The storage unit is further configured to obtain first metadata based on the storage address of the special effects data, obtain second metadata based on the storage address of the resource icon, and store the first metadata and the second metadata in the database. The sending unit is configured to respond to a resource acquisition request received from a terminal by retrieving at least one of the first metadata and the second metadata from the database and sending the retrieved metadata to the terminal. The resource acquisition request is used to request the acquisition of the first virtual resource, and the terminal is used to display the special effects data or the resource icon based on the retrieved metadata.
16. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for sending virtual resources as described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method of sending virtual resources as described in any one of claims 1 to 14.
18. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method for sending virtual resources as described in any one of claims 1 to 14.