Virtual item display method and device, storage medium and electronic device

CN116051230BActive Publication Date: 2026-09-04SHANGHAI BILIBILI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211667634.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2026-09-04
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

在虚拟物品的数量较多时,上述方案会导致虚拟物品的展示过程出现卡顿,影响虚拟物品的展示效果

Benefits of technology

[0012] In the various embodiments provided in this disclosure, a large number of virtual items are generated using a second architecture layer other than the first architecture layer. This avoids the shortcomings of the first architecture layer's operating mechanism (such as memory residue, untimely cache warm-up, etc.), reduces lag during the display of virtual items, and effectively improves the display effect of virtual items.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116051230B_ABST
    Figure CN116051230B_ABST
Patent Text Reader

Abstract

The present disclosure provides a virtual item display method, device, computer program product, non-transitory computer-readable storage medium and electronic device. The method comprises: generating a first virtual item in a first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; generating a second virtual item in a second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items; and displaying the first virtual item and the second virtual item. Embodiments of the present disclosure can reduce the lag in the virtual item display process and improve the display effect of the virtual item.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure generally relates to the field of computer technology, and more specifically to a method, apparatus, computer program product, non-transitory computer-readable storage medium, and electronic device for displaying virtual items. Background Technology

[0002] This section is intended to introduce aspects of the art that may relate to the various aspects of this disclosure described below and / or claimed. It is believed that this section will help provide background information to facilitate a better understanding of the various aspects of this disclosure. Therefore, it should be understood that these statements should be interpreted in this context and not as an admission of prior art.

[0003] In scenarios such as live streaming, virtual items (such as virtual avatars and virtual gifts) are often introduced to enrich the visual effects.

[0004] In known solutions, virtual items are not destroyed after creation but are cached for later use. However, when there are a large number of virtual items, this solution can cause lag during the display process, affecting the overall presentation of the virtual items.

[0005] Therefore, it is necessary to propose a virtual item display scheme to alleviate or solve at least one of the above-mentioned technical problems. Summary of the Invention

[0006] The purpose of this disclosure is to provide a method, apparatus, computer program product, non-transitory computer-readable storage medium, and electronic device for displaying virtual items, so as to reduce lag during the display of virtual items and improve the display effect of virtual items.

[0007] According to a first aspect of this disclosure, a method for displaying virtual items is provided, comprising: generating a first virtual item in a first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; generating a second virtual item in a second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items; and displaying the first virtual item and the second virtual item.

[0008] According to a second aspect of this disclosure, a device for displaying virtual items is provided, comprising: a first generation module for generating a first virtual item in a first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; a second generation module for generating a second virtual item in a second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items; and a display module for displaying the first virtual item and the second virtual item.

[0009] According to a third aspect of this disclosure, a computer program product is provided, including program code instructions that, when executed by a computer, cause the computer to perform the method described according to a first aspect of this disclosure.

[0010] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described according to a first aspect of this disclosure.

[0011] According to a fifth aspect of this disclosure, an electronic device is provided, comprising: a processor; a memory in electronic communication with the processor; and instructions stored in the memory and executable by the processor to cause the electronic device to perform the method according to a first aspect of this disclosure.

[0012] In the various embodiments provided in this disclosure, a large number of virtual items are generated using a second architecture layer other than the first architecture layer. This avoids the shortcomings of the first architecture layer's operating mechanism (such as memory residue, untimely cache warm-up, etc.), reduces lag during the display of virtual items, and effectively improves the display effect of virtual items.

[0013] It should be understood that the content described in this section is not intended to identify key or essential features of the claimed invention, nor is it intended to be used alone to determine the scope of the claimed invention. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, the same reference numerals refer to similar but not necessarily the same elements.

[0015] Figure 1 A system architecture diagram is shown for one embodiment of the method for displaying virtual items according to the present disclosure;

[0016] Figure 2 A flowchart illustrating one embodiment of the method for displaying virtual items according to the present disclosure is shown;

[0017] Figure 3A A schematic diagram illustrating the display effect of the virtual item display method according to this disclosure is shown;

[0018] Figure 3BA schematic diagram of the parameter setting interface for the method of displaying virtual items according to this disclosure is shown;

[0019] Figure 3C A schematic diagram illustrating a specific example of a method for displaying virtual items according to this disclosure is shown;

[0020] Figure 4 An exemplary block diagram of a virtual item display device according to an embodiment of the present disclosure is shown;

[0021] Figure 5 A schematic diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown.

[0022] Specific implementation method

[0023] The present disclosure will be described more fully below with reference to the accompanying drawings. However, the present disclosure may be embodied in many alternative forms and should not be construed as limited to the embodiments described herein. Therefore, although the present disclosure is readily adaptable to various modifications and alternatives, specific embodiments thereof are shown by way of example in the accompanying drawings and will be described in detail herein. However, it should be understood that this is not intended to limit the present disclosure to the specific forms disclosed, but rather, the present disclosure covers all modifications, equivalents, and alternatives falling within the spirit and scope of the present disclosure as defined by the claims.

[0024] It should be understood that although various elements may be described herein using terms such as first, second, etc., these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the teachings of this disclosure.

[0025] This document describes several examples using block diagrams and / or flowcharts, where each block represents a section of circuitry, modular blocks, or code comprising one or more executable instructions for implementing a specified logical function. It should also be noted that in other implementations, the functions described in the blocks may occur in a different order. For example, depending on the function involved, two blocks shown consecutively may actually execute substantially simultaneously, or these blocks may sometimes execute in reverse order.

[0026] The phrases “according to… embodiments” or “in… embodiments” as used herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one implementation of this disclosure. The phrases “according to… embodiments” or “in… embodiments” appearing in different places throughout this document do not necessarily refer to the same embodiment, nor are they necessarily separate or alternative embodiments that are mutually exclusive with other embodiments.

[0027] Figure 1An exemplary system architecture 100 is shown, illustrating embodiments of methods, apparatuses, terminal devices, and storage media for displaying virtual items according to this disclosure.

[0028] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0029] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as voice interaction applications, video conferencing applications, short video social applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0030] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with microphones and speakers, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), portable computers, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0031] Server 105 can be a server that provides various services. For example, server 105 is a backend server that processes virtual item display requests sent by terminal devices 101, 102, and 103.

[0032] In some cases, the virtual item display method provided in this disclosure can be executed by terminal devices 101, 102, and 103. Correspondingly, the virtual item display device can also be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.

[0033] In some cases, the virtual item display method provided in this disclosure can be jointly executed by terminal devices 101, 102, 103 and server 105. Correspondingly, the virtual item display device can also be respectively set in terminal devices 101, 102, 103 and server 105.

[0034] For example, server 105 is a web live streaming server, and terminal devices 101, 102, and 103 are terminal devices used for live streaming or for watching live streams.

[0035] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0037] Figure 2 A flowchart illustrating an embodiment of a method for displaying virtual items according to the present disclosure is shown. The method in this embodiment can be... Figure 1 Implemented by the terminal equipment in, or by Figure 1 The terminal devices and servers in the process are implemented together.

[0038] In this embodiment, virtual items refer to items that exist or are presented virtually, such as virtual avatars or virtual gifts. Virtual items can be displayed to users using hardware devices, enriching the visual experience and other functions.

[0039] In this embodiment, a virtual object can act independently or interact with other virtual objects. For example, a virtual object can fall, bounce, or collide with other virtual objects.

[0040] like Figure 2 As shown, the method 200 for displaying the virtual item may include the following steps:

[0041] Step 210: Generate the first virtual item in the first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture.

[0042] In this embodiment, the first architecture layer adopts an object-oriented programming (OOG) architecture. For example, the first architecture layer is the Mono layer.

[0043] In an optional embodiment, the first virtual item can be generated using Live2dSDK (a two-dimensional image development tool) in the first architecture layer.

[0044] In an optional embodiment, the first virtual item is, for example, a virtual avatar in a live webcast. In this case, step 210 may further include: generating a virtual avatar in a first architectural layer in response to a live broadcast initiation operation by a first user (e.g., a broadcaster).

[0045] Step 220: Generate a second virtual item in the second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of second virtual items is greater than the number of first virtual items.

[0046] In this embodiment, the second architecture layer adopts a data-oriented programming (DOP) architecture. For example, the second architecture layer is an ECS (Entity-Component-System) layer.

[0047] The second virtual item is generated in the second architecture layer, which in turn generates the corresponding entity. If there are multiple second virtual items, each second virtual item corresponds to one entity.

[0048] In this embodiment, the number of second virtual items is greater than the number of first virtual items. Because the operating mechanism of the second architecture layer is more efficient than that of the first architecture layer—for example, it uses memory more efficiently, does not use a cache pool, and has a garbage collection mechanism—this embodiment utilizes the second architecture layer to generate a larger number of second virtual items. This avoids the first architecture layer experiencing performance lag when the number of virtual items is large. For example, a known solution can only display a maximum of one thousand virtual items simultaneously, while the solution in this embodiment can display tens of thousands of virtual items simultaneously.

[0049] In an optional embodiment, the second virtual item is, for example, a virtual gift in a live webcast. In this case, step 220 may further include generating a virtual gift in a second architectural layer in response to a gift-giving operation by a second user (e.g., a viewer).

[0050] Step 230: Display the first virtual item and the second virtual item.

[0051] In this embodiment, after generating the first virtual item in the first architecture layer and the second virtual item in the second architecture layer, the first virtual item and the second virtual item are displayed simultaneously.

[0052] For example, in a live stream, the first virtual item might be a virtual avatar set up by the streamer, and the second virtual item might be a virtual gift sent by a viewer. In this case, after a viewer sends a gift, displaying both the virtual gift and the virtual avatar simultaneously creates a vivid gift-giving effect, effectively enhancing the user experience for both the viewer and the streamer.

[0053] In this embodiment, a large number of virtual items are generated using a second architecture layer outside the first architecture layer. This avoids the shortcomings of the first architecture layer's operating mechanism (such as memory residue, untimely cache warm-up, etc.), reduces lag during the display of virtual items, and effectively improves the display effect of virtual items.

[0054] In an optional embodiment, the first virtual item and the second virtual item can interact, such as colliding with each other. To do this, a collider corresponding to the first virtual item can be introduced into the second structural layer, using the collider to replace the first virtual item in interacting with the second virtual item. A specific example is as follows:

[0055] The first step is to generate a collider corresponding to the first virtual item in the second architecture layer. In this embodiment, the collider is located in the same position as the first virtual item, and its shape can be the same or different. For example, the shape of the collider is a rectangle or a circle. Furthermore, the collider is invisible. Generating the collider in the second architecture layer means generating the entity corresponding to the collider in the second architecture layer.

[0056] The second step is to determine the collision position between the second virtual object and the collider. In this embodiment, there is relative motion between the second virtual object and the first virtual object (or collider). For example, in a live webcast, the virtual avatar can remain in a fixed position, while the virtual gift can fall. The collision position between the second virtual object and the collider can be determined using the physics engine in the second architecture layer.

[0057] The third step involves sending the collision location to the first architecture layer, and generating a collision effect at the corresponding position on the first virtual object within the first architecture layer. In this embodiment, the collision effect may be achieved through particle effects such as stars or lightning. The first and second architecture layers can exchange data via an intermediate layer.

[0058] The fourth step is to showcase the collision effect. For example, in a live stream, when a virtual gift collides with a virtual avatar, particle effects such as stars or lightning can be displayed at the collision point to further enhance the interactivity and fun of the gift-giving process.

[0059] The above method enables efficient and smooth interaction between the first and second virtual items.

[0060] Figure 3A A schematic diagram illustrating the display effect of the virtual item display method according to this disclosure is shown. For example... Figure 3A As shown in the image, the character is the streamer's virtual avatar, and the various icons represent virtual gifts. After a viewer sends a gift, multiple virtual gifts fall from top to bottom. A "star" collision effect is created at the point where the virtual gifts collide with the virtual avatar.

[0061] In an optional embodiment, the displacement generated by the colliding body under the impact of the second virtual object can be further determined, the displacement is sent to the first architecture layer, and the position of the first virtual item is modified in the first architecture layer according to the displacement. For example, in a live web broadcast, when the head of a virtual avatar is hit by a virtual gift, a downward displacement occurs, resulting in a head-down motion.

[0062] The above methods are conducive to further enhancing the interactivity and fun of the gift-giving process.

[0063] In an optional embodiment, the host can pre-set the virtual avatar's actions and expressions after receiving a gift. In this case, the virtual avatar's expression can be modified to the preset actions and expressions after the viewer performs the gift-giving action, in order to achieve a more personalized gift-giving feedback.

[0064] In an optional embodiment, the streamer can set gift parameters and collision parameters to freely define the gift display effect. The gift parameters may include at least one of the following: gift quantity, falling speed, display duration, and gift appearance. The collision parameters may include at least one of the following: collision intensity and particle effects.

[0065] Figure 3B A schematic diagram of the parameter setting interface for a method of displaying virtual items according to this disclosure is shown. Figure 3B As shown, the "Gift Drop" interface displays settings for multiple gifts (such as "Little Flowers," "Heart-Fluttering Chocolates," and "Love Bubbles"). For each gift, users can click "Enable Settings" to access the "Individual Gift Settings" interface. In the "Individual Gift Settings" interface, users can set gift parameters such as "Drop Image," "Image Size," "Gift Display Duration," "How Many Gifts to Drop at Once," "Number of Drops," and "Drop Speed," as well as collision parameters such as "Collision Effect" and "Collision Intensity." For each gift, users can also click "Emojis" to access the "Gift Action and Expression Mapping" interface, where they can set the virtual avatar's actions and expressions when receiving gifts.

[0066] Figure 3C A schematic diagram illustrating a specific example of a method for displaying virtual items according to this disclosure is shown. For example... Figure 3CAs shown, the architecture in this example includes a Mono layer, an ECS layer, and a binding layer (i.e., an intermediate layer) between them. After the user loads the virtual avatar, the Mono layer uses the Live2d SDK to load the corresponding virtual avatar and notifies the collider generation system in the ECS layer through the binding layer. The collider generation system then generates the entity corresponding to the collider. After the user gives a gift, the Mono layer retrieves the configuration settings and plays the virtual avatar's actions and expressions according to the action and expression configuration. Furthermore, the Mono layer notifies the gift generation system of the above configuration through the binding layer. The gift generation system then generates the entity corresponding to the gift. The entity corresponding to the collider and the entity corresponding to the gift perform a falling collision interaction, obtaining the collision position and the displacement of the virtual avatar. The system synchronizing collider information notifies the Mono layer of the virtual avatar's displacement through the binding layer, and the Mono layer modifies the virtual avatar's position accordingly. The system synchronizing falling collisions notifies the Mono layer of the collision position through the binding layer, and the Mono layer generates particle effects at the collision position accordingly.

[0067] Figure 4 An exemplary block diagram of a virtual item display device according to an embodiment of the present disclosure is shown. Figure 4 As shown, the virtual item display device 400 includes: a first generation module 410, used to generate a first virtual item in a first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; a second generation module 420, used to generate a second virtual item in a second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items; and a display module 430, used to display the first virtual item and the second virtual item.

[0068] It should be understood that Figure 4 The various modules of the device 400 shown can be connected to the reference. Figure 2 The steps in method 200 described correspond to each other. Therefore, the operations, features, and advantages described above for method 200 also apply to apparatus 400 and its included modules. For the sake of brevity, some operations, features, and advantages will not be repeated here.

[0069] In an optional embodiment, the device 400 further includes a collision module (not shown). The collision module is configured to: generate a collider corresponding to the first virtual object in the second architecture layer; determine the collision position between the second virtual object and the collider; send the collision position to the first architecture layer; and generate a collision effect at the position corresponding to the collision position on the first virtual object in the first architecture layer. The display module 430 is further configured to: display the collision effect.

[0070] In an optional embodiment, the collision module is further configured to: determine the displacement generated by the collider under the impact of the second virtual object; send the displacement to the first architecture layer; and modify the position of the first virtual item in the first architecture layer according to the displacement.

[0071] In an optional embodiment, the first virtual item is a virtual avatar, and the second virtual item is a virtual gift. The first generation module 410 is further configured to: generate the virtual avatar in the first architecture layer in response to the first user's live streaming operation. The second generation module 420 is further configured to: generate the virtual gift in the second architecture layer in response to the second user's gift-giving operation.

[0072] In an optional embodiment, the display module 430 is further configured to: in response to the gift-giving operation of the second user, modify the action and expression of the virtual image to a preset action and expression.

[0073] In an optional embodiment, the display module 430 is further configured to: display the virtual gifts according to preset gift parameters, wherein the gift parameters include at least one of the following: gift quantity, falling speed, display duration, and gift appearance.

[0074] In an optional embodiment, the collision module is further configured to: generate the above-mentioned collision effect according to preset collision parameters, wherein the above-mentioned collision parameters include at least one of collision force and particle effects.

[0075] In an optional embodiment, data transmission between the first architecture layer and the second architecture layer is performed through an intermediate layer.

[0076] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. See also Figure 5 The present invention describes a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein. Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504. Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 706, such as a keyboard, mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, optical disk, etc.; and a communication unit 509, such as a network card, modem, wireless transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0077] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the method of displaying virtual items. For example, in some embodiments, the method of displaying virtual items may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the method of displaying virtual items described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method of displaying virtual items by any other suitable means (e.g., by means of firmware).

[0078] The various illustrative logics, logic blocks, modules, circuits, and algorithmic processes described in conjunction with the aspects disclosed herein can be implemented as electronic hardware, computer software, or a combination of both. The interchangeability of hardware and software has been generally described in terms of functionality and illustrated in the aforementioned illustrative components, blocks, modules, circuits, and processes. Whether this functionality is implemented in hardware or software depends on the specific application and the design constraints on the overall system.

[0079] Hardware and data processing apparatuses for implementing the various illustrative logics, logic blocks, modules, and circuits described in conjunction with the aspects disclosed herein may be implemented or performed by general-purpose single-chip or multi-chip processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor or any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In some aspects, specific processes and methods may be performed by circuits specific to a given function.

[0080] In one or more aspects, the described functionality can be implemented in hardware, digital electronic circuits, computer software, firmware (including the structures disclosed in this specification and their equivalents) or any combination thereof. The aspects of the subject matter described in this specification can also be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a computer storage medium for execution by a data processing apparatus or for controlling the operation of a data processing apparatus.

[0081] If implemented in software, the functionality can be stored or transferred as one or more instructions or code onto a computer-readable medium. The processes of the methods or algorithms disclosed herein can be implemented in a processor-executable software module that may reside on a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium capable of transferring a computer program from one place to another. Storage media can be any available medium accessible to a computer. By way of example and not limitation, this computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage devices, or any other medium that can be used to store the required program code in the form of instructions or data structures and is accessible to a computer. Furthermore, any connection can be properly referred to as a computer-readable medium. The disks and discs used herein include high-density optical discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, wherein disks typically magnetically copy data, while discs optically copy data using lasers. Combinations of the above should also be included within the scope of computer-readable media. Additionally, the operation of a method or algorithm may be one or any combination or set of code and instructions on a machine-readable and computer-readable medium, which may be incorporated into a computer program product.

[0082] The various embodiments in this disclosure are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments are basically similar to the method embodiments, so the descriptions are relatively simple, and relevant parts can be referred to the descriptions of the method embodiments.

Claims

1. A method for displaying virtual items, comprising: The first virtual item is generated in the first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; A second virtual item is generated in the second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items; Display the first virtual item and the second virtual item; The method further includes, after generating the first virtual item in the first architecture layer and the second virtual item in the second architecture layer: In the second architecture layer, a collider corresponding to the first virtual item is generated; Determine the collision position between the second virtual item and the collider; The collision location is sent to the first architecture layer, and a collision effect is generated at the location corresponding to the collision location on the first virtual item in the first architecture layer. The collision effect is shown.

2. The method according to claim 1, wherein, After generating the collider corresponding to the first virtual item in the second architecture layer, the method further includes: Determine the displacement of the collider under the impact of the second virtual object; The displacement is sent to the first architecture layer; In the first architecture layer, the position of the first virtual item is modified according to the displacement.

3. The method according to claim 1, wherein, The first virtual item is a virtual avatar, and the second virtual item is a virtual gift; The generation of the first virtual item in the first architecture layer includes: In response to the first user's live broadcast operation, the virtual image is generated in the first architecture layer; The generation of the second virtual item in the second architecture layer includes: In response to the gift-giving operation of the second user, the virtual gift is generated in the second architecture layer.

4. The method according to claim 3, wherein, The method further includes: In response to the second user's gift-giving action, the virtual avatar's actions and expressions are modified to preset actions and expressions.

5. The method according to claim 3, wherein, The display of the first virtual item and the second virtual item includes: The virtual gifts are displayed according to preset gift parameters, wherein the gift parameters include at least one of the following: gift quantity, falling speed, display duration, and gift appearance.

6. The method according to claim 1, wherein, The generated collision effect includes: The collision effect is generated according to preset collision parameters, wherein the collision parameters include at least one of collision force and particle effects.

7. The method according to any one of claims 1-6, wherein, Data transmission between the first architecture layer and the second architecture layer is achieved through an intermediate layer.

8. A device for displaying virtual items, comprising: A first generation module is used to generate a first virtual item in a first architecture layer, wherein the first architecture layer adopts an object-oriented programming architecture; The second generation module is used to generate a second virtual item in the second architecture layer, wherein the second architecture layer adopts a data-oriented programming architecture, and the number of the second virtual items is greater than the number of the first virtual items. The display module is used to display the first virtual item and the second virtual item; The device further includes a collision module, configured to: generate a collider corresponding to the first virtual item in the second architecture layer; determine the collision position between the second virtual item and the collider; send the collision position to the first architecture layer; and generate a collision effect in the first architecture layer at a position on the first virtual item corresponding to the collision position. The display module is also used to: display the collision effect.

9. A computer program product comprising program code instructions that, when executed by a computer, cause the computer to perform the method of at least one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to at least one of claims 1-7.

11. An electronic device, comprising: processor, A memory that communicates electronically with the processor; as well as Instructions, which are stored in the memory and can be executed by the processor, to cause the electronic device to perform the method according to at least one of claims 1-7.

Citation Information

Patent Citations

  • Live broadcast room virtual gift interaction method, electronic device and device

    CN111083505A