Virtual live broadcast processing method and device, equipment and storage medium
By receiving the display request, the live broadcast data stream and attribute information are obtained, the virtual live broadcast screen is pre-created and the first frame image is rendered, which solves the problem of slow and stuck image display in the first frame of the virtual live broadcast and improves the user experience.
Patent Information
- Application Number
- CN202310900314.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2025-01-21
AI Technical Summary
The existing virtual live broadcast technology has the problem of slow and stuttering display of first frame images that can be perceived by users, and lacks effective solutions.
By receiving display requests for the target live broadcast room, obtaining live data streams and display attribute information, creating virtual live screens in advance, and rendering screens based on the first frame image to reduce waiting time and improve display efficiency.
This method can quickly render the first frame image after the creation of the virtual live broadcast screen, improve the user experience, and reduce the problem of slow display and stuttering.
Smart Images

Figure CN119342236A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a virtual live broadcast processing method, device, equipment and storage medium. Background Art
[0002] With the development of live broadcast technology and virtual reality technology, virtual live broadcast has begun to appear. By utilizing virtual live broadcast technology, realistic virtual effects can be created, bringing a more intuitive, vivid, real and immersive experience to the audience.
[0003] However, current virtual live broadcasts have the problem of slow display and freezing of the first frame image, which is perceptible to users. There is currently no effective solution to this problem. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a virtual live broadcast processing method, device, equipment and storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides a virtual live broadcast processing method, the method comprising:
[0006] Receiving a display request for a target live broadcast room;
[0007] Obtain the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room;
[0008] Create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room;
[0009] Render a virtual live screen based on the first frame image in the live data stream of the target live room.
[0010] A second aspect of an embodiment of the present disclosure provides a virtual live broadcast processing device, the device comprising:
[0011] A first receiving module, configured to receive a display request for a target live broadcast room;
[0012] A first acquisition module is used to acquire the live broadcast data stream of a target live broadcast room and display attribute information corresponding to the target live broadcast room;
[0013] A creation module, used to create a virtual live broadcast screen based on display attribute information corresponding to the target live broadcast room;
[0014] The rendering module is used to render a virtual live screen based on the first frame image in the live data stream of the target live room.
[0015] A third aspect of an embodiment of the present disclosure provides an electronic device, the server comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.
[0016] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.
[0017] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0018] The disclosed embodiment can receive a display request for a target live broadcast room; obtain the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room; create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room; and render the virtual live broadcast screen based on the first frame image in the live broadcast data stream of the target live broadcast room. According to the disclosed embodiment, the live broadcast data stream of the target live broadcast room can be obtained in advance, reducing the probability of waiting for the first frame image in the target live broadcast data stream after the virtual live screen is created. In this way, after the virtual live screen is created, the virtual live screen can be rendered based on the first frame image as soon as possible, thereby improving the problem of slow display and jamming of the first frame image that can be perceived by users, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 is a flow chart of a virtual live broadcast processing method provided by an embodiment of the present disclosure;
[0022] Figure 2 is a schematic diagram of a display page provided by an embodiment of the present disclosure;
[0023] Figure 3 is a schematic diagram of another display page provided by an embodiment of the present disclosure;
[0024] Figure 4 It is a flowchart of a virtual live broadcast process provided by an embodiment of the present disclosure;
[0025] Figure 5 It is a flowchart of another virtual live broadcast processing method provided by an embodiment of the present disclosure;
[0026] Figure 6 is a flowchart of another virtual live broadcast processing process provided by an embodiment of the present disclosure;
[0027] Figure 7 is a structural diagram of a virtual live broadcast processing device provided by an embodiment of the present disclosure;
[0028] Figure 8 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0031] The virtual live broadcast processing process provided by the relevant technology is usually as follows: when the user clicks on the card corresponding to the target live broadcast room, a virtual live broadcast environment is created for the target live broadcast room; then, the stream address corresponding to the target live broadcast room is obtained and the live broadcast data stream is pulled according to the stream address, and a virtual live broadcast screen is created for the target live broadcast room in the pull stream callback; thus, the virtual live broadcast screen is rendered based on the first frame image in the live broadcast data stream to display the first frame image. However, the applicant has found through research that it takes a long time to pull the live broadcast data stream, resulting in the fact that after the virtual live broadcast screen is created, the first frame image in the live broadcast data stream cannot be rendered to the virtual live broadcast screen immediately, but the first frame image must be waited for. When the first frame image is parsed from the live broadcast data stream and then the virtual live broadcast screen is rendered based on the first frame image, the user will be able to perceive the first frame image as slow and stuck.
[0032] In view of this, the present disclosure provides a virtual live broadcast processing method, device, equipment and storage medium to improve the above problems. Below, the virtual live broadcast processing method provided by the present disclosure is first described.
[0033] Figure 1It is a flowchart of a virtual live broadcast processing method provided by an embodiment of the present disclosure, and the method can be executed by an electronic device. In one embodiment of the present disclosure, the electronic device may include only a terminal, and the method is executed entirely by the terminal. The terminal can be understood as, for example, virtual reality (VR) glasses, VR helmets, VR all-in-one machines, and other VR devices with VR functions, but is not limited to this. In another embodiment of the present disclosure, the electronic device may include a terminal and a server, and the method can be executed by the terminal and the server. The server can be understood as, for example, a cloud server, an integrated server, and other servers with VR functions, but is not limited to this. The present disclosure does not limit this.
[0034] like Figure 1 As shown, the method provided in this embodiment includes the following steps:
[0035] S110: Receive a display request for a target live broadcast room.
[0036] In the disclosed embodiment, if the user wants to enter the target live broadcast room, the user can send a display request for the target live broadcast room to the electronic device. The electronic device receives the display request for the target live broadcast room and can obtain the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room.
[0037] Specifically, the target live broadcast room may include a virtual live broadcast room, but is not limited to this.
[0038] Specifically, the display request for the target live room can be any request that can trigger the electronic device to obtain the live data stream of the target live room and the display attribute information corresponding to the target live room. For example, the display request for the target live room may include a trigger operation for a card corresponding to the target live room.
[0039] S120, obtaining the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room.
[0040] Specifically, the live broadcast data stream is a data stream generated by the live broadcast, which may include image data, audio data, etc., but is not limited thereto.
[0041] Specifically, the display attribute information is information relied upon for creating a virtual live screen, and may include size information corresponding to the live data stream, such as the width and height of the live data stream image, but is not limited thereto.
[0042] Specifically, the electronic device can pull the live broadcast data stream according to the stream pulling information corresponding to the target live broadcast room, and obtain the display attribute information in the stream pulling callback, but is not limited to this.
[0043] The stream pulling information is information relied upon for pulling the live data stream, and may include a stream address, etc., but is not limited thereto.
[0044] There are many specific ways to obtain the streaming information corresponding to the target live broadcast room. Typical examples are explained below, but they do not constitute a limitation of this application.
[0045] In some embodiments, after S110, the streaming information corresponding to the target live broadcast room is obtained.
[0046] In other embodiments, before S110, the stream pulling information corresponding to the candidate live broadcast rooms is obtained in advance, so that after S110, the stream pulling information corresponding to the target live broadcast room is selected from the stream pulling information corresponding to the candidate live broadcast rooms.
[0047] S130. Create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room.
[0048] Specifically, when the display attribute information includes the width and height of the live broadcast data stream, the electronic device can create a virtual live broadcast screen that matches the width and height of the live broadcast data stream, but is not limited thereto.
[0049] Specifically, the virtual live screen (surface) is the carrier of the images in the live data stream. The images in the live data stream are drawn and rendered on the virtual live screen, and the user can watch the live screen in the virtual three-dimensional space. The virtual three-dimensional space is a three-dimensional virtual space used for virtual display, which provides users with a feeling of being in a virtual environment.
[0050] S140, rendering a virtual live broadcast screen based on the first frame image in the live broadcast data stream of the target live broadcast room.
[0051] In an embodiment of the present disclosure, after parsing the first frame image from the live data stream of the target live broadcast room and creating a virtual live screen, the electronic device can render the virtual live screen based on the first frame image, thereby realizing the display of the first frame image.
[0052] Specifically, the electronic device can determine the texture information corresponding to the virtual live screen, create a canvas according to the texture information corresponding to the virtual live screen, and render the canvas based on the first frame image, but is not limited to this.
[0053] The disclosed embodiment can receive a display request for a target live broadcast room; obtain the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room; create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room; and render the virtual live broadcast screen based on the first frame image in the live broadcast data stream of the target live broadcast room. According to the disclosed embodiment, the live broadcast data stream of the target live broadcast room can be obtained in advance, reducing the probability of waiting for the first frame image in the target live broadcast data stream after the virtual live screen is created. In this way, after the virtual live screen is created, the virtual live screen can be rendered based on the first frame image as soon as possible, thereby improving the problem of slow display and jamming of the first frame image that can be perceived by users, and improving the user experience.
[0054] In another embodiment of the present disclosure, before receiving a display request for a target live room, it also includes: receiving a display request for a target page; obtaining the pull stream information corresponding to the candidate live rooms in the target page, and displaying the target page. Accordingly, obtaining the live data stream of the target live room and the display attribute information corresponding to the target live room includes: selecting the pull stream information corresponding to the target live room from the pull stream information corresponding to the candidate live rooms; obtaining the live data stream of the target live room and the display attribute information corresponding to the target live room based on the pull stream information corresponding to the target live room.
[0055] Specifically, the display request for the target page can be any request that can trigger the electronic device to obtain the pull stream information corresponding to the candidate live room in the target page and display the target page. For example, the display request for the target page can include a trigger operation for a tag corresponding to the target page, an input operation for a URL corresponding to the target page, etc., but is not limited thereto.
[0056] In one example, receiving a display request for a target page includes: receiving a trigger operation for a tag corresponding to the target page; displaying the target page includes: in response to the trigger operation for the tag corresponding to the target page, obtaining card information corresponding to candidate live broadcast rooms in the target page, and displaying the target page according to the card information, wherein a live broadcast room introduction corresponding to the card information is displayed on the target page; wherein, receiving a display request for a target live broadcast room includes: receiving a trigger operation for a card corresponding to the target live broadcast room in the target page.
[0057] Specifically, multiple labels corresponding to candidate pages can be displayed in a virtual three-dimensional space. When the electronic device receives a trigger operation for a label corresponding to a target page among multiple candidate pages, the card information and streaming information corresponding to the candidate live broadcast rooms in the target page can be obtained, and the target page can be displayed in the virtual three-dimensional space according to the card information. The target page displays a card corresponding to the card information, that is, a card corresponding to the candidate live broadcast room. When the electronic device receives a trigger operation for a live broadcast room introduction corresponding to a target live broadcast room among the candidate live broadcast rooms in the target page, the streaming information corresponding to the target live broadcast room can be selected from the streaming information corresponding to the candidate live broadcast rooms in the target page.
[0058] Specifically, the card information may include live broadcast room introduction information, recommendation information, etc. The introduction information and recommendation information may be presented in the form of text or images, but are not limited to this.
[0059] Figure 2 is a schematic diagram of a display page provided by an embodiment of the present disclosure. Figure 2 As shown, the virtual three-dimensional space displays the "Recommendation" label and the "Live" label. In response to the trigger operation of the "Live" label, the cards 1, 2, 3, 4, and 5 corresponding to the five candidate live broadcast rooms in the target page corresponding to the "Live" label are obtained, as well as the five pull-stream information corresponding to the five candidate live broadcast rooms; the target page corresponding to the "Live" label is displayed in the virtual three-dimensional space, and the five cards are displayed on the target page. In response to the trigger operation of "Card 1", the live broadcast data stream and display attribute information of the target live broadcast room are obtained according to the pull-stream information corresponding to the target live broadcast room corresponding to "Card 1".
[0060] It can be understood that by setting up to receive display requests for the target page and obtaining the streaming information corresponding to the candidate live rooms in the target page, when a display request corresponding to the target live room in the candidate live rooms is received, the streaming information corresponding to the target live room can be selected from the streaming information corresponding to the candidate live rooms as soon as possible, and then the live data stream of the target live room is obtained according to the pre-acquired streaming information corresponding to the target live room, and then the live data stream is obtained as soon as possible, thereby improving the speed of displaying the first frame image and improving the user experience.
[0061] Optionally, the method further includes: when the target page meets a preset refresh condition, re-obtaining the streaming information corresponding to the new candidate live broadcast room in the target page.
[0062] Specifically, the preset refresh conditions may include that the continuous display time of the card information corresponding to the currently displayed candidate live room is greater than the preset time threshold, receiving a trigger operation for the refresh control, etc., but are not limited to this.
[0063] Optionally, when the target page meets the preset refresh conditions, the card information and streaming information corresponding to the new candidate live broadcast rooms in the target page are re-acquired; and the card information corresponding to multiple new candidate live broadcast rooms is refreshed and displayed in the virtual three-dimensional space.
[0064] Figure 3 is a schematic diagram of another display page provided by an embodiment of the present disclosure. Figure 3 As shown, when the continuous display time of Card 1, Card 2, Card 3, Card 4, and Card 5 is greater than the preset time threshold, Card 6, Card 7, Card 8, Card 9 corresponding to the four new candidate live broadcast rooms in the target page corresponding to the "Live" label, and the four candidate stream pulling information corresponding to the four candidate live broadcast rooms are re-acquired; the target page is refreshed and displayed in the virtual three-dimensional space, and the target page includes the new four cards. In response to the triggering operation of "Card 7", the live broadcast data stream and display attribute information of the target live broadcast room are obtained according to the stream pulling information corresponding to the target live broadcast room corresponding to "Card 7".
[0065] It can be understood that by re-acquiring the streaming information corresponding to the new candidate live broadcast room in the target page when the target page meets the preset refresh conditions, the pre-acquired streaming information can be updated as the candidate live broadcast rooms in the target page are updated, ensuring that when a display request for the target live broadcast room in the new candidate live broadcast room is received, the streaming information corresponding to the target live broadcast room is selected from the streaming information corresponding to the new candidate live broadcast room as soon as possible, and then the live data stream of the target live broadcast room is obtained as soon as possible, thereby improving the speed of displaying the first frame of the image and improving the user experience.
[0066] In another embodiment of the present disclosure, creating a virtual live broadcast screen based on display attribute information corresponding to the target live broadcast room includes: creating a virtual live broadcast environment corresponding to the target live broadcast room in a virtual three-dimensional space; creating a virtual live broadcast screen in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
[0067] Specifically, the virtual live broadcast environment is the virtual environment where the virtual live broadcast screen is located. The virtual live broadcast environment may include a virtual live broadcast scene (e.g., a background wall, props for assisting live broadcast, etc.), and virtual interactive components (e.g., like components, comment components, gift sending components, etc.), but is not limited thereto. After the virtual live broadcast environment is created in the virtual three-dimensional space, the user can see the virtual live broadcast environment in the virtual three-dimensional space.
[0068] Optionally, the live broadcast type corresponding to the target live broadcast room may be obtained, and a virtual live broadcast environment corresponding to the target live broadcast room may be created in a virtual three-dimensional space according to the live broadcast type, but the present invention is not limited thereto.
[0069] Exemplarily, when the live broadcast type corresponding to the target live broadcast room is a concert, a virtual live broadcast scene (for example, including a stage, a microphone, etc.) and virtual interactive components (for example, a comment component, etc.) that match the concert can be created; when the live broadcast type corresponding to the target live broadcast room is a live event, a virtual live broadcast scene (for example, including a competition area, etc.) and virtual interactive components (for example, including a like component, a comment component, etc.) that match the live event can be created.
[0070] For example, Figure 4 1 is a flow chart of a virtual live broadcast process provided by an embodiment of the present disclosure. The virtual live broadcast process is executed by a terminal and a server, wherein the terminal includes a logic processing module and a virtual display module. Figure 4 As shown, the virtual live broadcast process includes the following steps:
[0071] S401. The logic processing module receives a trigger operation of a card corresponding to a target live broadcast room displayed in a virtual three-dimensional space, obtains a live data stream of the target live broadcast room according to the pull stream information corresponding to the target live broadcast room, and sends a scene creation request to the virtual display module.
[0072] Among them, the scene creation request carries the live broadcast room information corresponding to the target live broadcast room, and the live broadcast room information includes the live broadcast type.
[0073] Specifically, obtaining the live data stream of the target live broadcast room according to the stream pulling information corresponding to the target live broadcast room may include: the logic processing module sends a stream pulling request to its corresponding first server, wherein the stream pulling request carries the stream pulling information corresponding to the target live broadcast room, and the stream pulling request is used to enable the first server to feedback the live data stream of the target live broadcast room; the logic processing module receives the live data stream of the target live broadcast room.
[0074] S402. The virtual display module responds to the scene creation request and creates a virtual live scene corresponding to the target live room according to the live room information corresponding to the target live room.
[0075] S403: After the virtual live broadcast scene is created, the virtual display module sends a scene creation completion notification to the logic processing module.
[0076] S404: After receiving the notification of completion of scene creation, the logic processing module creates a virtual interaction component corresponding to the target live broadcast room.
[0077] S405: The logic processing module obtains display attribute information in the stream pull callback and sends a screen creation request to the virtual display module.
[0078] Specifically, the logic processing module obtains the display attribute information in the stream pull callback, including: the logic processing module sends a display attribute request to the second server corresponding to the virtual display module in the stream pull callback, the display attribute request is used to make the second server feedback the display attribute information; the logic processing module receives the display attribute information.
[0079] The screen creation request carries display attribute information.
[0080] S406. The virtual display module creates a virtual live screen according to the display attribute information in response to the screen creation request.
[0081] S407. After the virtual live screen is created, the virtual display module sends texture information corresponding to the virtual live screen to the logic processing module.
[0082] S408: The logic processing module creates a canvas according to the texture information.
[0083] S409, the logic processing module parses the live broadcast data stream of the target live broadcast room and obtains the first frame image.
[0084] S410: The logic processing module renders a canvas based on the first frame image.
[0085] It can be understood that by setting up a virtual live broadcast environment corresponding to the target live broadcast room in a virtual three-dimensional space, and creating a virtual live broadcast screen in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room, the virtual live broadcast environment can give users an immersive feeling, thereby enhancing the user's sense of immersion in the live broadcast process.
[0086] Figure 5 1 is a flow chart of another virtual live broadcast processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.
[0087] like Figure 5 As shown, the virtual live broadcast processing method may include the following steps.
[0088] S510: Receive a display request for a target live broadcast room.
[0089] Specifically, S510 is similar to S110 and will not be described in detail here.
[0090] Optionally, after S510, the method may further include: when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, setting the value of the preset flag to a first value.
[0091] Specifically, the preset flag is used to identify the valid state of the live data stream of the target live room. Therefore, according to the value of the preset flag, it can be determined whether the valid live data stream corresponding to the target live room has been pre-acquired.
[0092] S520, obtaining the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room.
[0093] Specifically, S520 is similar to S120 and will not be described in detail here.
[0094] S530: Create a virtual live broadcast environment corresponding to the target live broadcast room in the virtual three-dimensional space.
[0095] Specifically, please refer to the previous text for the explanation of S530, which will not be repeated here.
[0096] S540: When the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, a virtual live broadcast screen is created in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
[0097] Specifically, the live broadcast status includes the host is broadcasting live and the host has temporarily left. It should be noted that the host's temporary departure means that the host temporarily leaves the live broadcast room, rather than ending the live broadcast.
[0098] Optionally, when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live and the value of the preset flag is a first value, a virtual live broadcast screen is created in the virtual live broadcast environment based on display attribute information corresponding to the target live broadcast room.
[0099] Specifically, when the value of the preset flag is the first value, it indicates that the valid live data stream corresponding to the target live room has been obtained in advance. In this way, there is no need to obtain the live data stream of the target live room, and a virtual live screen can be directly created in the virtual live environment based on the display attribute information corresponding to the target live room.
[0100] It can be understood that by setting a preset flag to indicate whether a valid live data stream corresponding to the target live room has been pre-acquired, it can be quickly and conveniently determined whether it is necessary to re-acquire the live data stream of the target live room according to the value of the preset flag.
[0101] Optionally, when the live broadcast status of the target live broadcast room is that the anchor has temporarily left, the live broadcast data stream of the target live broadcast room obtained by S510 is invalid, the live broadcast data stream can be discarded, and the operation of "creating a virtual live broadcast screen in a virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room" and subsequent operations will no longer be performed.
[0102] Optionally, the method further includes: when the live broadcast status of the target live broadcast room is that the anchor has temporarily left, setting the value of the preset flag to a second value.
[0103] Specifically, when the value of the preset flag bit is the second value, it indicates that a valid target live data stream has not been pre-acquired.
[0104] In this way, when the live broadcast status is switched from the host temporarily leaving to the host currently broadcasting live, the new live broadcast data stream and new display attribute information of the target live broadcast room can be re-obtained based on the value of the preset flag bit being the second value and based on the stream pulling information corresponding to the target live broadcast room.
[0105] S550: Render a virtual live broadcast screen based on the first frame image in the live broadcast data stream of the target live broadcast room.
[0106] Specifically, S550 is similar to S140 and will not be described in detail here.
[0107] Optionally, the method also includes: when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, setting the audio playback status of the player in the target live broadcast room to a mute state; when rendering the first frame image to the virtual live broadcast screen, switching the audio playback status of the player in the target live broadcast room from a mute state to a play state to play the audio corresponding to the first frame image.
[0108] It is understandable that when the live data stream of the target live room is parsed to obtain the first frame image and the audio corresponding to the first frame image, if the working state of the player is in the play state, the audio corresponding to the first frame image can be played immediately, but it takes time to render the virtual live screen based on the first frame image. Therefore, it may happen that the first frame image has not yet been displayed, but the audio corresponding to the first frame image has begun to play. However, in this application, when rendering the first frame image to the virtual live screen, the working state of the player is switched from the mute state to the play state, and the audio corresponding to the first frame image is played, which can give users a sense of synchronization between sound and picture, thereby improving the user's viewing experience.
[0109] Optionally, after S550, when the live broadcast status is switched from the host being live broadcasting to the host temporarily leaving, the value of the preset flag is set to a second value.
[0110] In this way, when the live broadcast status is switched from the host temporarily leaving to the host currently broadcasting live, the new live broadcast data stream and new display attribute information of the target live broadcast room can be obtained based on the value of the preset flag bit being the second value and the corresponding stream pulling information of the target live broadcast room.
[0111] Optionally, the method also includes: when the live broadcast status of the target live broadcast room is switched from the host temporarily leaving to the host currently broadcasting live, obtaining a preset flag; when the value of the preset flag is a second value, obtaining a new live broadcast data stream of the target live broadcast room and new display attribute information corresponding to the target live broadcast room; creating a new virtual live broadcast screen based on the new display attribute information corresponding to the target live broadcast room; and rendering a new virtual live broadcast screen based on the first frame image in the new live broadcast data stream of the target live broadcast room.
[0112] In this way, when the live broadcast status switches from the host temporarily leaving to the host currently broadcasting live, the new live broadcast data stream and new display attribute information of the target live broadcast room can be obtained as soon as possible according to the stream pulling information corresponding to the target live broadcast room, so as to create a new virtual live broadcast screen corresponding to the target live broadcast room as soon as possible according to the new display attribute information and render the new virtual live broadcast screen based on the image in the new live broadcast data stream, so as to present the live broadcast content to the user as soon as possible when the host returns to the live broadcast.
[0113] The disclosed embodiment can determine whether to create a virtual live screen in a virtual live environment according to the display attribute information according to the live status, so that the virtual live screen can be created in time when the live status is live broadcasting, and the virtual live screen is not created when the live status is the host leaving to avoid wasting resources. In addition, by setting a preset flag, it is possible to quickly and conveniently determine whether a valid live data stream has been obtained, so that the live data stream is no longer pulled when the preset flag is the first data value, and a new live data stream is pulled again when the preset flag is the second data value to present the live content to the user as soon as possible. In addition, by setting the working state of the player to switch from the mute state to the play state to play the audio corresponding to the first frame image in the target live data stream, the sound and picture can be synchronized to improve the user's viewing experience.
[0114] Below, the virtual live broadcast processing method provided by the embodiment of the present disclosure will be described in detail based on a specific example. Figure 6 is a flowchart of another virtual live broadcast processing process provided by an embodiment of the present disclosure, such as Figure 6 As shown, the virtual live broadcast processing process includes the following steps:
[0115] S601. Receive a trigger operation on a tag corresponding to a target page in a tag corresponding to a candidate page displayed in a virtual three-dimensional space, and obtain card information and streaming information corresponding to the candidate live broadcast room in the target page.
[0116] S602. Display a target page in a virtual three-dimensional space according to the card information, wherein the target page includes cards corresponding to the candidate live broadcast rooms.
[0117] S603, receiving a trigger operation of a card corresponding to a target live broadcast room among the cards corresponding to candidate live broadcast rooms displayed in a virtual three-dimensional space, selecting the stream pulling information corresponding to the target live broadcast room from the stream pulling information corresponding to the candidate live broadcast rooms, and obtaining the live broadcast data stream and display attribute information of the target live broadcast room based on the stream pulling information corresponding to the target live broadcast room.
[0118] S604: When the live broadcast status is that the anchor is broadcasting live and the value of the preset flag is the first value, the value of the preset flag is set to the first value.
[0119] S605: Create a virtual live broadcast environment corresponding to the target live broadcast room in the virtual three-dimensional space.
[0120] S606, obtaining the live broadcast status of the target live broadcast room, and obtaining a preset flag.
[0121] S607: When the live broadcast status is that the anchor is broadcasting live and the value of the preset flag is a first value, a virtual live broadcast screen is created in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
[0122] S608: When the live broadcast status indicates that the host has temporarily left, the value of the preset flag is set to a second value.
[0123] S609: When the live broadcast state is that the anchor is broadcasting live and the value of the preset flag is a first value, the working state of the player is set to a mute state.
[0124] S610, rendering a virtual live screen based on the first frame image in the live data stream, and when rendering the first frame image in the live data stream to the virtual live screen, switching the working state of the player from the mute state to the play state to play the audio corresponding to the first frame image in the live data stream.
[0125] S611. When the live broadcast status is switched from the anchor being live broadcasting to the anchor temporarily leaving, the value of the preset flag is set to a second value.
[0126] S612: When the live broadcast status is switched from the anchor temporarily leaving to the anchor currently broadcasting live, obtain the value of the preset flag.
[0127] S613: When the value of the preset flag is the second value, a new live broadcast data stream and new display attribute information are obtained according to the stream pulling information corresponding to the target live broadcast room.
[0128] S614: Create a new virtual live broadcast screen in the virtual live broadcast environment according to the new display attribute information.
[0129] S615: Render a new virtual live screen based on the image in the new live data stream.
[0130] Figure 7 1 is a schematic diagram of the structure of a virtual live broadcast processing device provided by an embodiment of the present disclosure. The virtual live broadcast processing device can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device. Figure 7 As shown, the virtual live broadcast processing device 700 includes:
[0131] The first receiving module 710 is used to receive a display request for a target live broadcast room;
[0132] The first acquisition module 720 is used to acquire the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room;
[0133] A first creation module 730, configured to create a virtual live broadcast screen based on display attribute information corresponding to the target live broadcast room;
[0134] The first rendering module 740 is used to render the virtual live screen based on the first frame image in the live data stream of the target live room.
[0135] In another embodiment of the present disclosure, the device further includes:
[0136] A second receiving module is used to receive a display request for a target page before receiving the display request for the target live room;
[0137] The second acquisition module is used to obtain the streaming information corresponding to the candidate live broadcast room in the target page; the first display module is used to display the target page.
[0138] In another embodiment of the present disclosure, the first acquisition module 720 is specifically used to select the stream pulling information corresponding to the target live broadcast room from the stream pulling information corresponding to the candidate live broadcast room; and obtain the live data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room based on the stream pulling information corresponding to the target live broadcast room.
[0139] In another embodiment of the present disclosure, the device further comprises:
[0140] The refresh module is used to re-acquire the streaming information corresponding to the new candidate live broadcast room in the target page when the target page meets the preset refresh conditions.
[0141] In another embodiment of the present disclosure, the second receiving module is specifically configured to receive a triggering operation for a tag corresponding to the target page;
[0142] The first display module is specifically used to respond to the trigger operation of the tag corresponding to the target page, obtain the card information corresponding to the candidate live room in the target page, and display the target page according to the card information, wherein the card corresponding to the card information is displayed on the target page
[0143] Among them, the first receiving module 710 is specifically used to receive a trigger operation for the card corresponding to the target live broadcast room in the target page.
[0144] In another embodiment of the present disclosure, the first creation module 730 includes:
[0145] A first creation submodule is used to create a virtual live broadcast environment corresponding to the target live broadcast room in a virtual three-dimensional space;
[0146] The second creation submodule is used to create the virtual live broadcast screen in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
[0147] In another embodiment of the present disclosure, the second creation submodule is specifically used to create the virtual live broadcast screen in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live.
[0148] In another embodiment of the present disclosure, the device further comprises:
[0149] The audio playback status setting module is used to set the audio playback status of the player in the target live broadcast room to a mute state when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live; when the first frame image is rendered to the virtual live broadcast screen, the audio playback status of the player in the target live broadcast room is switched from a mute state to a play state to play the audio corresponding to the first frame image.
[0150] In another embodiment of the present disclosure, the device further comprises:
[0151] A preset flag setting module is used to, after acquiring the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room, set the value of the preset flag to a first value when the live broadcast status of the target live broadcast room is that the anchor is broadcasting live; and set the value of the preset flag to a second value when the live broadcast status of the target live broadcast room is that the anchor has temporarily left, or the live broadcast status is switched from the anchor being broadcasting live to the anchor temporarily leaving, wherein the preset flag is used to identify the valid status of the live broadcast data stream of the target live broadcast room.
[0152] In another embodiment of the present disclosure, the device further comprises:
[0153] A fourth acquisition module is used to acquire the preset flag when the live broadcast status of the target live broadcast room is switched from the anchor temporarily leaving to the anchor currently broadcasting live;
[0154] A fifth acquisition module, configured to acquire, when the value of the preset flag is the second value, a new live data stream of the target live broadcast room and new display attribute information corresponding to the target live broadcast room;
[0155] A second creation module is used to create a new virtual live broadcast screen based on the new display attribute information corresponding to the target live broadcast room;
[0156] The second rendering module is used to render the new virtual live screen based on the first frame image in the new live data stream of the target live room.
[0157] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0158] An embodiment of the present disclosure further provides an electronic device, which includes: a memory, in which a computer program is stored; and a processor, for executing the computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.
[0159] For example, Figure 8 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 8 , which shows a structural schematic diagram of an electronic device 800 suitable for implementing the embodiments of the present disclosure. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0160] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0161] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0162] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0163] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0164] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0165] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0166] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0167] Receiving a display request for a target live broadcast room;
[0168] Obtain the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room;
[0169] Create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room;
[0170] Render a virtual live screen based on the first frame image in the live data stream of the target live room.
[0171] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0172] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0173] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0174] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0175] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0176] The embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0177] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0178] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A virtual live broadcast processing method, characterized in that: include: Receive a display request for a target live broadcast room; Acquire the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room; Creating a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room; The virtual live broadcast screen is rendered based on the first frame image in the live broadcast data stream of the target live broadcast room.
2. The method according to claim 1, characterized in that Before receiving the display request for the target live broadcast room, the method further includes: Receiving a display request for a target page; Obtain the streaming information corresponding to the candidate live broadcast room in the target page, and display the target page.
3. The method according to claim 2, characterized in that The acquiring of the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room includes: Select the stream pulling information corresponding to the target live broadcast room from the stream pulling information corresponding to the candidate live broadcast room; Based on the stream pulling information corresponding to the target live broadcast room, the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room are obtained.
4. The method according to claim 2, characterized in that: Also includes: When the target page meets the preset refresh condition, the streaming information corresponding to the new candidate live broadcast room in the target page is re-acquired.
5. The method according to claim 2, characterized in that: The receiving a display request for the target page includes: receiving a trigger operation for a tag corresponding to the target page; The displaying of the target page includes: in response to a triggering operation on a tag corresponding to the target page, acquiring card information corresponding to the candidate live broadcast room in the target page, and displaying the target page according to the card information, wherein a card corresponding to the card information is displayed on the target page; The receiving of a display request for a target live broadcast room includes: Receive a trigger operation for the card corresponding to the target live broadcast room in the target page.
6. The method according to claim 1, characterized in that The creating a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room includes: Creating a virtual live broadcast environment corresponding to the target live broadcast room in a virtual three-dimensional space; The virtual live broadcast screen is created in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
7. The method according to claim 6, characterized in that The creating the virtual live broadcast screen in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room includes: When the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, the virtual live broadcast screen is created in the virtual live broadcast environment based on the display attribute information corresponding to the target live broadcast room.
8. The method according to claim 7, characterized in that Also includes: When the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, setting the audio playback status of the player of the target live broadcast room to a mute state; When the first frame image is rendered to the virtual live broadcast screen, the audio playback state of the player in the target live broadcast room is switched from a mute state to a play state to play the audio corresponding to the first frame image.
9. The method according to claim 7 or 8, characterized in that: After acquiring the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room, the method further includes: When the live broadcast status of the target live broadcast room is that the anchor is broadcasting live, setting the value of the preset flag to a first value; When the live broadcast status of the target live broadcast room is that the anchor has temporarily left, or the live broadcast status is switched from the anchor being live to that the anchor has temporarily left, the value of the preset flag is set to a second value, wherein the preset flag is used to identify the valid status of the live broadcast data stream of the target live broadcast room.
10. The method according to claim 9, characterized in that Also includes: When the live broadcast status of the target live broadcast room is switched from the anchor temporarily leaving to the anchor currently broadcasting live, the preset flag is obtained; When the value of the preset flag is the second value, obtaining a new live data stream of the target live broadcast room and new display attribute information corresponding to the target live broadcast room; Creating a new virtual live broadcast screen in the virtual live broadcast environment based on new display attribute information corresponding to the target live broadcast room; The new virtual live screen is rendered based on the first frame image in the new live data stream of the target live room.
11. A virtual live broadcast processing device, characterized in that: include: A first receiving module, configured to receive a display request for a target live broadcast room; A first acquisition module is used to acquire the live broadcast data stream of the target live broadcast room and the display attribute information corresponding to the target live broadcast room; A creation module, used to create a virtual live broadcast screen based on the display attribute information corresponding to the target live broadcast room; A rendering module is used to render the virtual live screen based on the first frame image in the live data stream of the target live room.
12. An electronic device, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.