A picture display method and device, computer equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2022-11-07
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]在虚拟社交中,通常会建立社交房间进行社交,例如建立房间开音乐会,当用户端对应的虚拟形象进入社交房间之后,会在用户端渲染社交房间对应的场景画面,然而当社交房间内的虚拟形象数量较多时,用户端的渲染压力就会比较大,而若限制社交房间的虚拟形象数量,则会影响用户体验
[0071]本公开提供的画面展示方法、装置、计算机设备及存储介质中,当目标房间的虚拟形象的个数达到目标个数之后,再进入目标房间的虚拟形象的目标用户端,可以获取目标房间当前包含的第一虚拟形象的参与用户端产生的事件数据,然后在目标用户端基于获取的事件数据、执行触发操作的目标时刻的渲染数据以及目标用户端的第二虚拟形象,对目标房间的场景画面进行渲染,这样对于各目标用户端来说,在进入目标房间之后所需要渲染的数据仅仅包括目标个数的第一虚拟形象、目标个数的第一虚拟形象的事件数据、以及各目标用户端本身的第二虚拟形象,这样无需对目标房间进行人数限制即可将目标用户端的渲染压力保持在可控范围内,另一方面,由于仅将第二虚拟形象渲染在目标用户端的目标房间的场景画面中,对于目标用户端来说,目标用户端的第二虚拟形象也加入了目标房间,但是由于目标房间的渲染数据并不包含目标用户端的第二虚拟形象,因此并未增加其他用户端的渲染压力,目标房间可以容纳更多的用户端的虚拟形象,提升了用户体验。
Smart Images

Figure CN115686416B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a screen display method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the development of computer technology, virtual social technology has become increasingly mature. In virtual social interaction, each user can have a corresponding virtual avatar, and the user can control the virtual avatar to interact with the virtual avatars of other users.
[0003] In virtual social interactions, social rooms are typically created for social interaction, such as creating a room to hold a concert. When a user's corresponding virtual avatar enters the social room, the corresponding scene of the social room is rendered on the user's device. However, when there are a large number of virtual avatars in the social room, the rendering pressure on the user's device will be relatively high. Limiting the number of virtual avatars in a social room will affect the user experience. Summary of the Invention
[0004] This disclosure provides at least one screen display method, apparatus, computer device, and storage medium.
[0005] In a first aspect, embodiments of this disclosure provide a screen display method, applied to a target user terminal, including:
[0006] In response to a trigger operation targeting a target room, obtain the rendering data of the target room at the target time corresponding to the trigger operation;
[0007] When the number of first virtual figures currently included in the target room reaches the target number corresponding to the target room, at least one event frame corresponding to the target room is acquired. The event frame includes event data generated by the participating user terminal controlling the first virtual figure at each event acquisition time. The first virtual figure is a virtual figure added to the target room when the number of virtual figures included in the target room has not reached the target number.
[0008] Based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user, the scene of the target room is rendered and displayed.
[0009] In one possible implementation, rendering and displaying the scene of the target room based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user includes:
[0010] Based on the first frame number of the at least one event frame and the second frame number of the rendering data, the event frame to be rendered in the at least one event frame is determined; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time.
[0011] Based on the rendering data, the event frame to be rendered, and the second virtual image, the scene of the target room is rendered and displayed.
[0012] In one possible implementation, determining the event frame to be rendered in the at least one event frame based on the first frame number of the at least one event frame and the second frame number of the rendering data includes:
[0013] The event frame whose frame number is greater than or equal to the second frame number in the at least one event frame is taken as the event frame to be rendered.
[0014] In one possible implementation, obtaining at least one event frame corresponding to the target room includes:
[0015] Obtain the first event frame before the event frame acquisition time corresponding to the target room, wherein the event frame acquisition time is the time when the first event frame is acquired after the target time;
[0016] The method further includes:
[0017] After acquiring the first event frame, a second event frame is acquired at a preset period after the event frame acquisition time.
[0018] The scene rendering of the target room is updated based on the second event frame.
[0019] In one possible implementation, obtaining at least one event frame corresponding to the target room includes:
[0020] Obtain event frames within the target time period corresponding to the target room, wherein the target time period is the time period between the initial time and the event frame acquisition time, the initial time is the time before the target time that is a preset time interval from the target time, and the event frame acquisition time is the time when the first event frame is acquired after the target time.
[0021] In one possible implementation, when the event frame includes multiple frames, the scene of the target room is rendered and displayed based on the rendering data, the multiple event frames, and the second virtual avatar corresponding to the target user, including:
[0022] According to the frame number order of the multi-frame event frames, based on the rendering data, the event data in each event frame, and the second virtual image, the scene of the target room is rendered and displayed.
[0023] In one possible implementation, before rendering and displaying the scene of the target room based on the rendering data, event data in each event frame, and the second virtual avatar, the method further includes:
[0024] Perform frame drop detection on each event frame;
[0025] If the frame loss detection result is no frame loss, the scene of the target room is rendered and displayed based on the rendering data, the time data in each event frame, and the second virtual image.
[0026] In one possible implementation, the frame loss detection for each event frame includes:
[0027] For any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it is determined that the event frame has lost a frame, wherein the number of empty frames preceding the event frame is the number of empty frames between the previous event frame and the event frame.
[0028] In one possible implementation, the method further includes:
[0029] If the frame loss detection result is a frame loss, obtain the latest rendering data at the event acquisition time, and re-acquire at least one event frame corresponding to the target room;
[0030] The scene of the target room is rendered based on the rendering data at the latest event acquisition time and at least one newly acquired event frame.
[0031] In one possible implementation, after rendering and displaying the scene of the target room, the method further includes:
[0032] In response to a control operation targeting the second virtual avatar, determine the target event frame corresponding to the control operation;
[0033] The target event frame is cached, and the scene of the target room is updated and rendered based on the target event frame.
[0034] In one possible implementation, if the number of first virtual images currently contained in the target room is not less than the number of targets corresponding to the target room, the display state of the second virtual image in the rendered scene of the target room is different from the display state of the first virtual image.
[0035] After rendering the scene of the target room, the method further includes:
[0036] If it is detected that the number of first virtual avatars currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the identity type of the virtual avatar corresponding to the target user terminal is changed from the second virtual avatar to the first virtual avatar, and the display status of the virtual avatar corresponding to the target user terminal is updated.
[0037] Secondly, this disclosure also provides a screen display device for use on a target user terminal, comprising:
[0038] The first acquisition module is used to respond to a trigger operation for a target room and acquire the rendering data of the target room at the target time corresponding to the trigger operation.
[0039] The second acquisition module is used to acquire at least one event frame corresponding to the target room when the number of first virtual images currently included in the target room reaches the target number corresponding to the target room. The event frame includes event data generated by the participating user terminal controlling the first virtual image at each event acquisition time. The first virtual image is a virtual image added to the target room when the number of virtual images included in the target room does not reach the target number.
[0040] The rendering module is used to render the scene of the target room based on the rendering data, the at least one event frame, and the second virtual image corresponding to the target user terminal.
[0041] In one possible implementation, the rendering module, when rendering and displaying the scene of the target room based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user, is used to:
[0042] Based on the first frame number of the at least one event frame and the second frame number of the rendering data, the event frame to be rendered in the at least one event frame is determined; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time.
[0043] Based on the rendering data, the event frame to be rendered, and the second virtual image, the scene of the target room is rendered and displayed.
[0044] In one possible implementation, the rendering module, when determining the event frame to be rendered among the at least one event frame based on the first frame number of the at least one event frame and the second frame number of the rendering data, is configured to:
[0045] The event frame whose frame number is greater than or equal to the second frame number in the at least one event frame is taken as the event frame to be rendered.
[0046] In one possible implementation, the second acquisition module, when acquiring at least one event frame corresponding to the target room, is used to:
[0047] Obtain the first event frame before the event frame acquisition time corresponding to the target room, wherein the event frame acquisition time is the time when the first event frame is acquired after the target time;
[0048] The second acquisition module is further configured to:
[0049] After acquiring the first event frame, a second event frame is acquired at a preset period after the event frame acquisition time.
[0050] The rendering module is further configured to: update the scene rendering of the target room based on the second event frame.
[0051] In one possible implementation, the second acquisition module, when acquiring at least one event frame corresponding to the target room, is used to:
[0052] Obtain event frames within the target time period corresponding to the target room, wherein the target time period is the time period between the initial time and the event frame acquisition time, the initial time is the time before the target time that is a preset time interval from the target time, and the event frame acquisition time is the time when the first event frame is acquired after the target time.
[0053] In one possible implementation, when the event frame includes multiple frames, the rendering module, when rendering and displaying the scene of the target room based on the rendering data, the multiple event frames, and the second virtual avatar corresponding to the target user terminal, is used to:
[0054] According to the frame number order of the multi-frame event frames, based on the rendering data, the event data in each event frame, and the second virtual image, the scene of the target room is rendered and displayed.
[0055] In one possible implementation, before rendering and displaying the scene of the target room based on the rendering data, event data in each event frame, and the second virtual avatar, the rendering module is further configured to:
[0056] Perform frame drop detection on each event frame;
[0057] If the frame loss detection result is no frame loss, the scene of the target room is rendered and displayed based on the rendering data, the time data in each event frame, and the second virtual image.
[0058] In one possible implementation, the rendering module, when performing frame drop detection on each event frame, is used to:
[0059] For any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it is determined that the event frame has lost a frame, wherein the number of empty frames preceding the event frame is the number of empty frames between the previous event frame and the event frame.
[0060] In one possible implementation, the second acquisition module is further configured to:
[0061] If the frame loss detection result is a frame loss, obtain the latest rendering data at the event acquisition time, and re-acquire at least one event frame corresponding to the target room;
[0062] The rendering module is further configured to: render the scene of the target room based on the rendering data at the latest event acquisition time and at least one newly acquired event frame.
[0063] In one possible implementation, after rendering and displaying the scene of the target room, the rendering module is further configured to:
[0064] In response to a control operation targeting the second virtual avatar, determine the target event frame corresponding to the control operation;
[0065] The target event frame is cached, and the scene of the target room is updated and rendered based on the target event frame.
[0066] In one possible implementation, if the number of first virtual images currently contained in the target room is not less than the number of targets corresponding to the target room, the display state of the second virtual image in the rendered scene of the target room is different from the display state of the first virtual image.
[0067] After rendering the scene of the target room, the rendering module is further used for:
[0068] If it is detected that the number of first virtual avatars currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the identity type of the virtual avatar corresponding to the target user terminal is changed from the second virtual avatar to the first virtual avatar, and the display status of the virtual avatar corresponding to the target user terminal is updated.
[0069] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0070] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0071] In the display method, apparatus, computer equipment, and storage medium provided in this disclosure, once the number of virtual avatars in the target room reaches the target number, the target user terminal entering the target room can obtain event data generated by the participating user terminals of the first virtual avatar currently included in the target room. Then, based on the obtained event data, the rendering data at the target time of the triggering operation, and the second virtual avatar of the target user terminal, the target user terminal renders the scene of the target room. Thus, for each target user terminal, the data that needs to be rendered after entering the target room only includes the target number of first virtual avatars, the target number of event data of the first virtual avatars, and the second virtual avatar of each target user terminal itself. This eliminates the need to limit the number of users in the target room, keeping the rendering pressure on the target user terminals within a controllable range. On the other hand, since only the second virtual avatar is rendered in the scene of the target room on the target user terminal, the second virtual avatar of the target user terminal is also added to the target room for the target user terminal. However, since the rendering data of the target room does not include the second virtual avatar of the target user terminal, it does not increase the rendering pressure on other user terminals. The target room can accommodate more virtual avatars of user terminals, improving the user experience.
[0072] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0073] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0074] Figure 1 A flowchart illustrating a screen display method provided by an embodiment of this disclosure is shown;
[0075] Figure 2 This diagram illustrates the event acquisition moment in the screen display method provided in this embodiment of the present disclosure;
[0076] Figure 3 This illustration shows the overall time flow table of a screen display method provided in an embodiment of the present disclosure;
[0077] Figure 4 A schematic diagram of a screen display device provided in an embodiment of this disclosure is shown;
[0078] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0080] In virtual social interactions, once a user controls their virtual avatar to perform an action, the action data needs to be synchronized with other users via a server to ensure synchronized scene visuals. When a scene room is created, the user's virtual avatar, upon entering the scene room, needs to obtain the action data of all users within the scene room and render the visuals based on this data. Therefore, when there are many users in the scene room, the amount of action data that each user needs to receive will be substantial, resulting in significant rendering pressure on the user's device.
[0081] In related technologies, the number of users in each scene room is usually limited. When the number of users in a scene room reaches a certain number, other users are prevented from joining. This results in a poor experience for users who have not yet joined.
[0082] Another method is to participate in the scene room by watching the scene room live. However, in this way, the virtual user on the user side cannot truly participate in the interaction of the scene room, and the user experience is still poor.
[0083] Based on this, this disclosure provides a screen display method, apparatus, computer device, and storage medium. When the number of virtual avatars in the target room reaches the target number, the target user terminal entering the target room can obtain the event data generated by the participating user terminals of the first virtual avatar currently included in the target room. Then, based on the obtained event data, the rendering data at the target time of the triggering operation, and the second virtual avatar of the target user terminal, the scene screen of the target room is rendered on the target user terminal. In this way, for each target user terminal, the data that needs to be rendered after entering the target room only includes the target number of first virtual avatars, the target number of event data of the first virtual avatars, and the second virtual avatar of each target user terminal itself. This way, the rendering pressure of the target user terminal can be kept within a controllable range without limiting the number of people in the target room. On the other hand, since only the second virtual avatar is rendered in the scene screen of the target room on the target user terminal, the second virtual avatar of the target user terminal is also added to the target room for the target user terminal. However, since the rendering data of the target room does not include the second virtual avatar of the target user terminal, the rendering pressure of other user terminals is not increased. The target room can accommodate more virtual avatars of user terminals, thus improving the user experience.
[0084] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0085] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0086] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0087] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0088] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0089] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0090] To facilitate understanding of this embodiment, a screen display method disclosed in this disclosure will first be described in detail. The screen display method provided in this disclosure is generally executed by a terminal device, such as a smartphone, tablet computer, personal computer, smart wearable device, etc.
[0091] See Figure 1 The diagram shows a flowchart of a screen display method provided in an embodiment of this disclosure. The method includes steps 101 to 103, wherein:
[0092] Step 101: Respond to the trigger operation for the target room and obtain the rendering data of the target room at the target time corresponding to the trigger operation.
[0093] Step 102: When the number of first virtual images currently included in the target room reaches the target number corresponding to the target room, acquire at least one event frame corresponding to the target room. The event frame includes event data generated by the participating user terminal controlling the first virtual image at each event acquisition time. The first virtual image is a virtual image added to the target room when the number of virtual images included in the target room has not reached the target number.
[0094] Step 103: Based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user terminal, render and display the scene of the target room.
[0095] The following is a detailed explanation of the above steps. In the following text, the virtual avatar joining the target room and the user joining the target room have the same meaning.
[0096] Regarding step 101,
[0097] The target room can be a room created within a target scene, which can be a scene within an application, such as a game lobby. After the target room is created, users who join the target room can control the corresponding virtual avatar to perform interactive actions that match the target room. For example, if the target room is a concert room, users who join the target room can control the corresponding virtual avatar to perform music control.
[0098] The triggering operation for the target room can refer to the triggering operation of applying to join the target room. Specifically, a user can actively apply to join the target room. The triggering operation for the target room can be, for example, a click operation on the room identifier of the target room, or the creator of the target room can invite a user to join the target room. The creation operation for the target room can be, for example, a receiving operation of the invitation information of the target room.
[0099] The rendering data of the target room at a certain moment can be understood as a snapshot of the target room at a certain moment. Specifically, the target room may contain multiple virtual avatars of users, and the state (e.g., position, action, etc.) of these virtual avatars may change at different times. Therefore, the rendering data of the target room at a certain moment is used to represent the state of the target room and the virtual avatars contained in the target room at that moment.
[0100] In practical applications, after the target room is created, its rendering data can be stored at each event collection time. This way, when any user joins the target room, the rendering data of the target room can be obtained to display the target room.
[0101] Regarding step 102,
[0102] The target number corresponding to the target room can refer to the maximum number of virtual images that the target room can accommodate. The target number can be a preset value or a value determined according to the room type of the target room. For example, for rooms with less interaction, such as concerts, the target number can be set higher, while for rooms with more interaction, such as games, the target number can be set lower.
[0103] For example, after determining the room type of the target room, the number of rooms that match the room type of the target room can be used as the target number.
[0104] The first virtual avatar can be understood as a virtual avatar that joins the target room when the number of virtual avatars in the target room has not reached the target number, and the participating user terminal is the user terminal corresponding to the first virtual avatar; the second virtual avatar can be understood as a virtual avatar that applies to join the target room when the number of virtual avatars in the target room has reached the target number, and the target user terminal is the user terminal corresponding to the second virtual avatar.
[0105] For example, if the number of virtual avatars currently joining the target room is 10, and the target room corresponds to 10 targets, then when the 11th user applies to join the target room, the number of first virtual avatars currently included in the target room is equal to the number of targets corresponding to the target room. In this case, the 11th user is the target user, and the virtual avatar corresponding to the 11th user is the second virtual avatar. Conversely, if the number of virtual avatars currently joining the target room is 9, and the target room corresponds to 10 targets, then when the 10th user applies to join the target room, the number of first virtual avatars currently included in the target room is less than the number of targets corresponding to the target room. In this case, the 10th user is the participating user, and the virtual avatar corresponding to the 10th user is the first virtual avatar.
[0106] After the first virtual avatar joins the target room, participating user terminals can control the first virtual avatar. The operation data generated by controlling the first virtual avatar is the event data, or simply an event. After the participating user terminal generates an event, it can upload the event to the server, and the server will then distribute the event to other user terminals to achieve unified screen display across all user terminals.
[0107] The server can send events to the user terminal according to a preset period. The time when the server sends the event can be understood as the event collection time. Therefore, the event collection time also has a fixed period, or in other words, the time interval between each event collection time is the same.
[0108] At the same event acquisition time, multiple participating user terminals may have performed operations. Therefore, at the same event acquisition time, multiple participating user terminals may generate multiple events. The multiple events generated by the multiple user terminals at the same event acquisition time constitute the event frame at that event acquisition time.
[0109] It should be noted that the server receives event data from participating user terminals, but not event data from target user terminals. The events sent by the server may be sent only to each participating user terminal, and the target user terminal may actively obtain the events; or the events sent by the server may be sent to each user terminal that enters the target room, which may include both participating user terminals and target user terminals.
[0110] Since the rendering data obtained by the target user is the rendering data at the target time, only event frames after the target time have rendering significance for the target user. Therefore, in one possible implementation, when obtaining at least one event frame corresponding to the target room, the event frame of the target room can be obtained according to a preset period after responding to the trigger operation for the target room. The event frame obtained in each period is the event frame after the target time that has not been obtained. For example, it can be the event frame generated between the time of the last event frame acquisition and the time of the current event frame acquisition. The time of the first event frame acquisition can be the target time.
[0111] In this way, the target user terminal can obtain the latest event frames in real time, so as to achieve screen synchronization between the target user terminal and the participating user terminals.
[0112] However, since the time a target user joins the target room and the time it begins acquiring the target room may not be adjacent—for example, due to network issues, the target user might only begin acquiring event frames some time after joining the target room—the server needs to store the event frames. In this way, when the target user acquires rendering data, it can retrieve event frames that were not acquired by the target user from the server's stored event frames at a preset period.
[0113] When the target user terminal first obtains an event frame, it obtains the event frames between the target time and the time when the event frame is first obtained (hereinafter referred to as the event frame acquisition time). The server needs to filter out the event frames between the target time and the event frame acquisition time based on the target time.
[0114] Since the server stores a large number of event frames, when there are many target user terminals, the stored event frames may include event frames prior to the target time for each target user terminal. The target times for different target user terminals may differ, meaning different target user terminals may enter the target room at different times. For each target user terminal, the server may need to filter event frames, potentially increasing server load. Therefore, in one possible implementation, when a target user terminal obtains at least one event frame corresponding to the target room, it may do so after responding to a trigger operation for the target room, by obtaining the first event frame prior to the event frame acquisition time corresponding to the target room.
[0115] Thus, since the first event frame obtained by the target user terminal is all event frames before the event frame acquisition time, the first event frame must contain event frames between the target time and the event frame acquisition time.
[0116] After the target user receives the event frame, it can then filter the event frame on the target user's end. This reduces the burden of data filtering on each user end and alleviates the server load.
[0117] In addition, after acquiring the first event frame, the target user terminal can also acquire the second event frame after the event frame acquisition time according to a preset period, and then update the scene rendering of the target room based on the second event frame.
[0118] In practical applications, the target user terminal pulls event frames from the server according to a preset period. Each time an event frame is pulled, it is an event frame generated between the time corresponding to the last time an event frame is pulled and the current time of pulling. Therefore, the server needs to store some event frames, and the target user terminal may pull multiple event frames each time.
[0119] In one possible scenario, the server may store a large number of event frames at the current moment. For example, if the target user joins the target room half an hour after its creation, the server may store all event frames generated from the creation of the target room to the time the event frames are acquired. If the target user also receives these event frames when acquiring the event frames corresponding to the target room, most of these event frames will be useless to the target user. Therefore, the target user may acquire event frames within the target time period corresponding to the target room, where the target time period is the time period between the initial time and the time the event frames are acquired. The initial time is a time before the target time that is a preset time interval away from the target time, and the time the event frames are acquired is the time when the first event frame is acquired after the target time.
[0120] Here, the target time period includes the time between the moment the target user terminal joins the target room and the moment the event frame is acquired, that is, the first event frame acquired by the target user terminal includes the event frames of each event acquisition moment from the target moment to the moment the event frame is acquired.
[0121] For example, if the target time is t5 and the event frame acquisition time is t7, then the target user terminal acquires event frames before t7. If the initial time is three times before the event frame acquisition time, then the target user terminal acquires event frames between t4 and t7.
[0122] For the server, each event frame can be marked with its validity period, for example, the validity period is the length of the target time period mentioned above. In this way, when the target user obtains the first event frame, it can directly obtain the event frame within the validity period.
[0123] In practical applications, the target user terminal may pull a large number of event frames due to network or other reasons. However, the data transmission capacity is limited. Therefore, the target user terminal can pull no more than a preset number of event frames each time.
[0124] For example, such as Figure 2As shown, if the target user terminal retrieves an event frame at time A, according to the preset period, the next time to retrieve an event frame should be at time B. However, due to network issues at the target user terminal, the target user terminal fails to retrieve an event frame at time B, and only retrieves an event frame again at time C. The retrieved event frames are those generated between time A and time C. However, there may be a large number of event frames, so the target user terminal may only retrieve a portion of the event frames. In this case, the time D corresponding to the last event frame of this portion of event frames is taken as the current retrieval time. If the next retrieval is at time E, then the retrieved event frames are those between time D and time E.
[0125] In another possible implementation, in order to alleviate the pressure on the server, after each participating user client uploads an event to the server, the server can package and send the newly generated event frames to the live streaming platform (or another server) according to a preset period. The target user client can obtain the event frames corresponding to the target room from the live streaming platform.
[0126] Regarding step 103,
[0127] In one possible implementation, if the event frame corresponding to the target room obtained by the target user terminal is an event frame after the target time, then when rendering the scene of the target room, rendering can be performed directly based on the rendering data, the obtained event frame, and the second virtual image corresponding to the target user terminal.
[0128] If the event frames corresponding to the target room obtained by the target user terminal include the first event frame mentioned above, and the first event frame includes event frames before the target time, these event frames do not need to be rendered by the target user terminal, so the obtained event frames can be filtered first.
[0129] Specifically, the event frame to be rendered in the at least one event frame can be determined first based on the first frame number of the at least one event frame and the second frame number of the rendering data; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time; then, the scene of the target room can be rendered based on the rendering data, the event frame to be rendered, and the second virtual image.
[0130] Here, when determining the event frame to be rendered, event frames with a first frame number less than the second frame number can be discarded, and event frames with a first frame number greater than or equal to the second frame number can be used as the event frames to be rendered.
[0131] Since the event frame whose first frame number is equal to the second frame number is the event frame at the target time, and the rendering data is the rendering data at the target time, and the event frame whose first frame number is greater than the second frame number is the event frame that occurs after the target time, this is how the state changes of the first virtual image can be obtained at the target time and at each time after the target time.
[0132] In the case where the event frame includes multiple frames, in one possible implementation, when rendering the scene of the target room based on the rendering data, the multiple event frames, and the second virtual image corresponding to the target user terminal, the scene of the target room can be rendered according to the frame number order of the multiple event frames, based on the rendering data, the event data in each event frame, and the second virtual image.
[0133] However, in real-world scenarios, frame drops may occur due to network fluctuations. Therefore, before rendering the scene of the target room based on the rendering data, the event data in each event frame, and the second virtual image, frame drop detection can be performed on each event frame. If the frame drop detection result is that no frames are dropped, the scene of the target room is rendered based on the rendering data, the time data in each event frame, and the second virtual image.
[0134] In one possible implementation, when performing frame drop detection on each event frame, it can be detected whether the frame number of the event frame to be rendered is consecutive with that of the already rendered event frames. If they are consecutive, then no frame drop has occurred.
[0135] However, in real-world scenarios, at certain event collection moments, no events may be generated, meaning that none of the participating user clients have interacted with the first virtual avatar. Therefore, there may be empty event frames in such cases. If frame loss detection is performed according to the above implementation method, empty event frames can also be sent to the user client. This means that there can be corresponding event frames at each event collection moment, with some event collection moments having empty event frames.
[0136] Empty event frames do not have any rendering effect. Therefore, in order to save data transmission resources, the number of preceding empty frames can be sent to the user terminal. The number of preceding empty frames is the number of empty frames between the preceding event frame and the current event frame.
[0137] Correspondingly, in another possible implementation, when performing frame loss detection on each event frame, for any event frame, packet loss detection is performed on the event frame based on the frame number of the event frame, the frame number of the previous event frame, and the number of preceding empty frames.
[0138] Specifically, for any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it can be determined that the event frame has lost a frame.
[0139] For example, packet loss detection can be performed using the following formula:
[0140] The frame number of the event frame minus the number of preceding empty frames > the frame number of the event frame preceding this event frame + 1
[0141] If the above formula is satisfied, the frame dropping detection result can be determined to be a frame dropping result; if the above formula is not satisfied, the frame dropping detection result can be determined to be a frame dropping result.
[0142] For example, if the frame number of the current event frame is 7, the number of preceding empty frames is 2, and the frame number of the previous frame of the current event frame is 4, then 7-2=4+1, which does not satisfy the above formula, so it can be determined that no frame was lost; if the frame number of the previous frame of the current event frame is 3, then 7-2>3+1, which satisfies the above formula, so it can be determined that a frame was lost.
[0143] If the frame loss detection result indicates a frame loss, since it is impossible to determine which specific frame is lost, the latest rendering data at the event acquisition time can be directly obtained, and at least one event frame corresponding to the target room can be re-acquired. Then, based on the latest rendering data at the event acquisition time and the re-acquired at least one event frame, the scene of the target room can be rendered. The previously acquired rendering data and event frames can be discarded.
[0144] Here, the method for re-acquiring at least one event frame corresponding to the target room is the same as the method described above, and will not be repeated here.
[0145] It should be noted that after the target user terminal obtains the event frame corresponding to the target room, it can proceed with the subsequent rendering process after the above-mentioned filtering and frame loss detection. Since the participating user terminals in the target room will continuously generate events, it is necessary to repeat the steps 102 to 103.
[0146] The following section will describe the process of acquiring event frames, rendering data, and rendering, using a specific timetable as an example. (Refer to...) Figure 3 The table shown is the overall timeline provided in this disclosure. Each event acquisition moment has corresponding rendering data and event frames. Event frames for some event acquisition moments (t5, t6) are empty. Assuming the target user joins the target room at time t3, then:
[0147] Read the rendering data "Rendering Data 3" at time t3;
[0148] Event frames are acquired starting at time t4. The event frames acquired at time t4 include: event frame 0, event frame 1, event frame 2, event frame 3, and event frame 4. The target user can poll for event frames every 3 time intervals. Event frame 7 is acquired again at time t7, along with the previous empty frame number 2. Event frames 8, 9, and 10 are acquired at time t10.
[0149] At the same time, starting at time t4, the acquired event frames are filtered. If the frame number of event frames 0 to 2 is less than the frame number of rendering data 3, they are discarded directly. Starting from event frame 3, the scene is rendered frame by frame based on the rendering data and each event frame.
[0150] Optionally, after rendering the scene of the target room, the system can also respond to control operations on the second virtual avatar, determine the target event frame corresponding to the control operation, cache the target event frame, and update the scene of the target room based on the target event frame.
[0151] Here, after the target user terminal generates an event by controlling the second virtual image, since the second virtual image is only displayed on the target user terminal and not on other target user terminals or participating user terminals, the event generated by the target user terminal does not need to be uploaded to the server.
[0152] The second virtual avatar is displayed in the target room, so from the perspective of the target user, the second virtual avatar has joined the target room. However, from the perspective of the participating user and other target user, the second virtual avatar is not displayed in the target room. Therefore, the second virtual avatar cannot directly interact with the first virtual avatar of the participating user and the virtual avatars of other target user, such as greeting each other.
[0153] In addition, to highlight the difference between the second virtual avatar and the first virtual avatar, the display state of the second virtual avatar in the scene of the target room rendered by the target user terminal can be different from that of the first virtual avatar. For example, the display state of the second virtual avatar can be the first display state, and the display state of the first virtual avatar can be the second display state. The first display state can be different from the normal display state, for example, it can be displayed by white lines, and the second display state can be the normal display state.
[0154] After a target user joins the target room, the number of participating user terminals in the target room may change, and some participating user terminals may leave the target room. Therefore, the identity information of the target user terminal may change.
[0155] For example, if it is detected that the number of first virtual images currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the display state of the second virtual image is changed to the second display state.
[0156] Here, the identity change instruction can be issued by the server. When the server detects that the number of first virtual images currently contained in the target room is less than the number of targets corresponding to the target room, it can send an identity change instruction based on the feature information of each target user terminal.
[0157] For example, an identity change instruction can be sent to the target user terminal that first joined the target room.
[0158] After receiving the identity change instruction, the target user terminal can also update its identity information to that of a participating user terminal, change the identity type of the virtual avatar corresponding to the target user terminal from the second virtual avatar to the first virtual avatar, and update the display status of the virtual avatar corresponding to the target user terminal, for example, to a normal display status.
[0159] In this way, the updated participating user terminal can send the generated events to the server, and the server can synchronize the events to other participating user terminals in the target room and display the updated virtual image of the participating user terminal on the other participating user terminals. At this time, the server's rendering data includes the updated virtual image of the participating user terminal.
[0160] It should be noted that the participating user terminal and the target user terminal can be understood as two types of user terminals within the target room. The participating user terminal is the user terminal that joins the target room when the number of people in the target room is less than the target number, and the target user terminal is the user terminal that joins the target room when the number of people in the target room is not less than the target number.
[0161] The first virtual avatar of the participating user terminal is displayed on each user terminal in the target room, including the participating user terminal and the target user terminal. The second virtual avatar of the target user terminal is only displayed on the target user terminal. Events generated by the participating user terminal controlling the first virtual avatar need to be uploaded to the server and then distributed to each user terminal in the target room by the server. Events generated by the target user terminal controlling the second virtual avatar are only stored on the target user terminal. The participating user terminal can receive event frames actively distributed by the server at each event collection time. The target user terminal needs to poll and obtain event frames according to a preset period. Therefore, there is a certain event delay between the scene screens displayed by the participating user terminal and the target user terminal.
[0162] In the display method provided in this disclosure, once the number of virtual avatars in the target room reaches the target number, the target user terminal entering the target room can obtain the event data generated by the participating user terminals of the first virtual avatar currently included in the target room. Then, based on the obtained event data, the rendering data at the target time of the triggering operation, and the second virtual avatar of the target user terminal, the scene of the target room is rendered on the target user terminal. In this way, for each target user terminal, the data that needs to be rendered after entering the target room only includes the target number of first virtual avatars, the target number of event data of the first virtual avatars, and the second virtual avatar of each target user terminal itself. This way, the rendering pressure of the target user terminal can be kept within a controllable range without limiting the number of people in the target room. On the other hand, since only the second virtual avatar is rendered in the scene of the target room on the target user terminal, the second virtual avatar of the target user terminal is also added to the target room for the target user terminal. However, since the rendering data of the target room does not include the second virtual avatar of the target user terminal, the rendering pressure of other user terminals is not increased. The target room can accommodate more virtual avatars of user terminals, thus improving the user experience.
[0163] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0164] Based on the same inventive concept, this disclosure also provides a screen display device corresponding to the screen display method. Since the principle of the device in this disclosure for solving the problem is similar to the screen display method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0165] Reference Figure 4 The diagram shown is a schematic representation of the architecture of a screen display device provided in an embodiment of this disclosure. The device includes: a first acquisition module 401, a second acquisition module 402, and a rendering module 403; wherein,
[0166] The first acquisition module 401 is used to respond to a trigger operation for a target room and acquire the rendering data of the target room at the target time corresponding to the trigger operation.
[0167] The second acquisition module 402 is used to acquire at least one event frame corresponding to the target room when the number of first virtual images currently included in the target room reaches the target number corresponding to the target room. The event frame includes event data generated by the participating user terminal controlling the first virtual image at each event acquisition time. The first virtual image is a virtual image added to the target room when the number of virtual images included in the target room does not reach the target number.
[0168] The rendering module 403 is used to render the scene of the target room based on the rendering data, the at least one event frame, and the second virtual image corresponding to the target user terminal.
[0169] In one possible implementation, the rendering module 403, when rendering and displaying the scene of the target room based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user terminal, is used to:
[0170] Based on the first frame number of the at least one event frame and the second frame number of the rendering data, the event frame to be rendered in the at least one event frame is determined; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time.
[0171] Based on the rendering data, the event frame to be rendered, and the second virtual image, the scene of the target room is rendered and displayed.
[0172] In one possible implementation, the rendering module 403, when determining the event frame to be rendered among the at least one event frame based on the first frame number of the at least one event frame and the second frame number of the rendering data, is configured to:
[0173] The event frame whose frame number is greater than or equal to the second frame number in the at least one event frame is taken as the event frame to be rendered.
[0174] In one possible implementation, the second acquisition module 402, when acquiring at least one event frame corresponding to the target room, is used to:
[0175] Obtain the first event frame before the event frame acquisition time corresponding to the target room, wherein the event frame acquisition time is the time when the first event frame is acquired after the target time;
[0176] The second acquisition module 402 is further configured to:
[0177] After acquiring the first event frame, a second event frame is acquired at a preset period after the event frame acquisition time.
[0178] The rendering module 403 is further configured to: update the scene rendering of the target room based on the second event frame.
[0179] In one possible implementation, the second acquisition module 402, when acquiring at least one event frame corresponding to the target room, is used to:
[0180] Obtain event frames within the target time period corresponding to the target room, wherein the target time period is the time period between the initial time and the event frame acquisition time, the initial time is the time before the target time that is a preset time interval from the target time, and the event frame acquisition time is the time when the first event frame is acquired after the target time.
[0181] In one possible implementation, when the event frame includes multiple frames, the rendering module 403, when rendering and displaying the scene of the target room based on the rendering data, the multiple event frames, and the second virtual avatar corresponding to the target user terminal, is used to:
[0182] According to the frame number order of the multi-frame event frames, based on the rendering data, the event data in each event frame, and the second virtual image, the scene of the target room is rendered and displayed.
[0183] In one possible implementation, before rendering and displaying the scene of the target room based on the rendering data, the event data in each event frame, and the second virtual image, the rendering module 403 is further configured to:
[0184] Perform frame drop detection on each event frame;
[0185] If the frame loss detection result is no frame loss, the scene of the target room is rendered and displayed based on the rendering data, the time data in each event frame, and the second virtual image.
[0186] In one possible implementation, the rendering module 403, when performing frame drop detection on each frame event frame, is used to:
[0187] For any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it is determined that the event frame has lost a frame, wherein the number of empty frames preceding the event frame is the number of empty frames between the previous event frame and the event frame.
[0188] In one possible implementation, the second acquisition module 402 is further configured to:
[0189] If the frame loss detection result is a frame loss, obtain the latest rendering data at the event acquisition time, and re-acquire at least one event frame corresponding to the target room;
[0190] The rendering module 403 is further configured to: render the scene of the target room based on the rendering data at the latest event acquisition time and at least one newly acquired event frame.
[0191] In one possible implementation, after rendering and displaying the scene of the target room, the rendering module 403 is further configured to:
[0192] In response to a control operation targeting the second virtual avatar, determine the target event frame corresponding to the control operation;
[0193] The target event frame is cached, and the scene of the target room is updated and rendered based on the target event frame.
[0194] In one possible implementation, if the number of first virtual images currently contained in the target room is not less than the number of targets corresponding to the target room, the display state of the second virtual image in the rendered scene of the target room is different from the display state of the first virtual image.
[0195] After rendering the scene of the target room, the rendering module 403 is further configured to:
[0196] If it is detected that the number of first virtual avatars currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the identity type of the virtual avatar corresponding to the target user terminal is changed from the second virtual avatar to the first virtual avatar, and the display status of the virtual avatar corresponding to the target user terminal is updated.
[0197] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0198] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 5The diagram shows the structure of a computer device 500 provided in this embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. The memory 502 stores execution instructions and includes main memory 5021 and external memory 5022. The main memory 5021, also called internal memory, is used to temporarily store computational data in the processor 501 and data exchanged with external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the main memory 5021. When the computer device 500 is running, the processor 501 and the memory 502 communicate through the bus 503, causing the processor 501 to execute the following instructions:
[0199] In response to a trigger operation targeting a target room, obtain the rendering data of the target room at the target time corresponding to the trigger operation;
[0200] When the number of first virtual figures currently included in the target room reaches the target number corresponding to the target room, at least one event frame corresponding to the target room is acquired. The event frame includes event data generated by the participating user terminal controlling the first virtual figure at each event acquisition time. The first virtual figure is a virtual figure added to the target room when the number of virtual figures included in the target room has not reached the target number.
[0201] Based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user, the scene of the target room is rendered and displayed.
[0202] In one possible implementation, the instructions executed by processor 501, which include rendering and displaying the scene of the target room based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user terminal, include:
[0203] Based on the first frame number of the at least one event frame and the second frame number of the rendering data, the event frame to be rendered in the at least one event frame is determined; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time.
[0204] Based on the rendering data, the event frame to be rendered, and the second virtual image, the scene of the target room is rendered and displayed.
[0205] In one possible implementation, the instruction executed by processor 501, which determines the event frame to be rendered in the at least one event frame based on the first frame number of the at least one event frame and the second frame number of the rendering data, includes:
[0206] The event frame whose frame number is greater than or equal to the second frame number in the at least one event frame is taken as the event frame to be rendered.
[0207] In one possible implementation, the instruction executed by processor 501, which involves acquiring at least one event frame corresponding to the target room, includes:
[0208] Obtain the first event frame before the event frame acquisition time corresponding to the target room, wherein the event frame acquisition time is the time when the first event frame is acquired after the target time;
[0209] The method further includes:
[0210] After acquiring the first event frame, a second event frame is acquired at a preset period after the event frame acquisition time.
[0211] The scene rendering of the target room is updated based on the second event frame.
[0212] In one possible implementation, the instruction executed by processor 501, which involves acquiring at least one event frame corresponding to the target room, includes:
[0213] Obtain event frames within the target time period corresponding to the target room, wherein the target time period is the time period between the initial time and the event frame acquisition time, the initial time is the time before the target time that is a preset time interval from the target time, and the event frame acquisition time is the time when the first event frame is acquired after the target time.
[0214] In one possible implementation, the instructions executed by processor 501, when the event frame includes multiple frames, render and display the scene of the target room based on the rendering data, the multiple event frames, and the second virtual avatar corresponding to the target user terminal, including:
[0215] According to the frame number order of the multi-frame event frames, based on the rendering data, the event data in each event frame, and the second virtual image, the scene of the target room is rendered and displayed.
[0216] In one possible implementation, before rendering and displaying the scene of the target room based on the rendering data, event data in each event frame, and the second virtual image, the instructions executed by processor 501 further include:
[0217] Perform frame drop detection on each event frame;
[0218] If the frame loss detection result is no frame loss, the scene of the target room is rendered and displayed based on the rendering data, the time data in each event frame, and the second virtual image.
[0219] In one possible implementation, the instruction executed by processor 501, which involves performing frame loss detection on each event frame, includes:
[0220] For any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it is determined that the event frame has lost a frame, wherein the number of empty frames preceding the event frame is the number of empty frames between the previous event frame and the event frame.
[0221] In one possible implementation, the instructions executed by processor 501 further include:
[0222] If the frame loss detection result is a frame loss, obtain the latest rendering data at the event acquisition time, and re-acquire at least one event frame corresponding to the target room;
[0223] The scene of the target room is rendered based on the rendering data at the latest event acquisition time and at least one newly acquired event frame.
[0224] In one possible implementation, after rendering and displaying the scene of the target room, the instructions executed by processor 501 further include:
[0225] In response to a control operation targeting the second virtual avatar, determine the target event frame corresponding to the control operation;
[0226] The target event frame is cached, and the scene of the target room is updated and rendered based on the target event frame.
[0227] In one possible implementation, in the instructions executed by the processor 501, if the number of first virtual images currently contained in the target room is not less than the number of targets corresponding to the target room, the display state of the second virtual image in the rendered scene of the target room is different from the display state of the first virtual image.
[0228] After rendering the scene of the target room, the process also includes:
[0229] If it is detected that the number of first virtual avatars currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the identity type of the virtual avatar corresponding to the target user terminal is changed from the second virtual avatar to the first virtual avatar, and the display status of the virtual avatar corresponding to the target user terminal is updated.
[0230] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the screen display method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0231] This disclosure also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the screen display method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0232] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0233] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0234] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0235] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0236] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0237] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for displaying images, characterized in that, Applied to the target user end, including: In response to a trigger operation targeting a target room, obtain the rendering data of the target room at the target time corresponding to the trigger operation; When the number of first virtual figures currently included in the target room reaches the target number corresponding to the target room, at least one event frame corresponding to the target room is acquired. The event frame includes event data generated by the participating user terminal controlling the first virtual figure at each event acquisition time. The first virtual figure is a virtual figure added to the target room when the number of virtual figures included in the target room has not reached the target number. Based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user, the scene of the target room is rendered and displayed.
2. The method according to claim 1, characterized in that, The process of rendering and displaying the scene of the target room based on the rendering data, the at least one event frame, and the second virtual avatar corresponding to the target user terminal includes: Based on the first frame number of the at least one event frame and the second frame number of the rendering data, the event frame to be rendered in the at least one event frame is determined; wherein, the frame number of the rendering data at any event acquisition time is the same as the frame number of the event frame at that event acquisition time. Based on the rendering data, the event frame to be rendered, and the second virtual image, the scene of the target room is rendered and displayed.
3. The method according to claim 2, characterized in that, The step of determining the event frame to be rendered in the at least one event frame based on the first frame number of the at least one event frame and the second frame number of the rendering data includes: The event frame whose frame number is greater than or equal to the second frame number in the at least one event frame is taken as the event frame to be rendered.
4. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining at least one event frame corresponding to the target room includes: Obtain the first event frame before the event frame acquisition time corresponding to the target room, wherein the event frame acquisition time is the time when the first event frame is acquired after the target time; The method further includes: After acquiring the first event frame, a second event frame is acquired at a preset period after the event frame acquisition time. The scene rendering of the target room is updated based on the second event frame.
5. The method according to claim 1, characterized in that, The step of obtaining at least one event frame corresponding to the target room includes: Obtain event frames within the target time period corresponding to the target room, wherein the target time period is the time period between the initial time and the event frame acquisition time, the initial time is the time before the target time that is a preset time interval from the target time, and the event frame acquisition time is the time when the first event frame is acquired after the target time.
6. The method according to claim 1, characterized in that, When the event frame includes multiple frames, based on the rendering data, the multiple event frames, and the second virtual avatar corresponding to the target user terminal, the scene of the target room is rendered and displayed, including: According to the frame number order of the multi-frame event frames, based on the rendering data, the event data in each event frame, and the second virtual image, the scene of the target room is rendered and displayed.
7. The method according to claim 6, characterized in that, Before rendering and displaying the scene of the target room based on the rendering data, the event data in each event frame, and the second virtual avatar, the method further includes: Perform frame drop detection on each event frame; If the frame loss detection result is no frame loss, the scene of the target room is rendered and displayed based on the rendering data, the time data in each event frame, and the second virtual image.
8. The method according to claim 7, characterized in that, The step of performing frame loss detection on each event frame includes: For any event frame, if the difference between the frame number of the event frame and the number of empty frames preceding the event frame is greater than the frame number of the previous event frame plus 1, it is determined that the event frame has lost a frame, wherein the number of empty frames preceding the event frame is the number of empty frames between the previous event frame and the event frame.
9. The method according to claim 7, characterized in that, The method further includes: If the frame loss detection result is a frame loss, obtain the latest rendering data at the event acquisition time, and re-acquire at least one event frame corresponding to the target room; The scene of the target room is rendered based on the rendering data at the latest event acquisition time and at least one newly acquired event frame.
10. The method according to claim 1, characterized in that, After rendering and displaying the scene of the target room, the method further includes: In response to a control operation targeting the second virtual avatar, determine the target event frame corresponding to the control operation; The target event frame is cached, and the scene of the target room is updated and rendered based on the target event frame.
11. The method according to claim 1, characterized in that, If the number of first virtual images currently contained in the target room is not less than the number of targets corresponding to the target room, the display state of the second virtual image in the rendered scene of the target room is different from the display state of the first virtual image. After rendering the scene of the target room, the method further includes: If it is detected that the number of first virtual avatars currently contained in the target room is less than the number of targets corresponding to the target room, after receiving the identity change instruction, the identity type of the virtual avatar corresponding to the target user terminal is changed from the second virtual avatar to the first virtual avatar, and the display status of the virtual avatar corresponding to the target user terminal is updated.
12. A display device, characterized in that, Applied to the target user end, including: The first acquisition module is used to respond to a trigger operation for a target room and acquire the rendering data of the target room at the target time corresponding to the trigger operation. The second acquisition module is used to acquire at least one event frame corresponding to the target room when the number of first virtual images currently included in the target room reaches the target number corresponding to the target room. The event frame includes event data generated by the participating user terminal controlling the first virtual image at each event acquisition time. The first virtual image is a virtual image added to the target room when the number of virtual images included in the target room is less than the target number. The rendering module is used to render and display the scene of the target room based on the rendering data, the at least one event frame, and the second virtual image corresponding to the target user terminal.
13. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the screen display method as described in any one of claims 1 to 11 are performed.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the screen display method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Live broadcast method and device based on artificial intelligence, equipment and storage medium
CN111010586A
Information display method and device in live broadcast room, storage medium and electronic equipment
CN111866537A