Playing method, device, storage medium and electronic device of multiple live streams
By managing multiple live streams in the linked list data structure, the problem of low playback efficiency of multiple live streams is solved, orderly playback and resource optimization of live streams are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411712086.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-08
AI Technical Summary
In the playback scenario of multi-live streams, the lack of ordered data structure support leads to low playback efficiency of live streams, and the prior art has failed to effectively solve this problem.
By managing the live stream in the linked list data structure, each live stream is specifically assigned to a play unit in the linked list, and the live stream is managed in an orderly manner according to the orderliness of the linked list, ensuring that the live stream is played in a predetermined order.
The orderly management of live streams is realized, the playback efficiency of multiple live streams is improved, management chaos is reduced, resource allocation is optimized, and user experience is improved.
Smart Images

Figure CN119788923A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more specifically, to a method, device, storage medium, and electronic device for playing multiple live streams. Background Art
[0002] In the playback scenario of multiple live streams, without the support of an ordered data structure, the playback of multiple live streams may become chaotic, and the live streams may appear in any order, which is difficult to manage, leading to the problem of low playback efficiency of multiple live streams. Therefore, there is a problem of low playback efficiency of multiple live streams.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for playing multiple live streams, so as to at least solve the technical problem of low playback efficiency of multiple live streams.
[0005] According to one aspect of an embodiment of the present application, a method for playing multiple live streams is provided, including: playing a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit is connected to the second playback unit in the linked list data structure; when the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live interface, and the second live stream is played on the sub-interface of the live interface; when the second playback unit is located at the first position, the second live stream is played on the main interface, and the first live stream is played on the sub-interface.
[0006] According to another aspect of an embodiment of the present application, a playback device for multiple live streams is also provided, including: a first playback unit, used to play a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to the first playback unit in a linked list data structure, the second live stream corresponds to the second playback unit in the linked list data structure, and the first playback unit is connected to the second playback unit in the linked list data structure; a second playback unit, used to play the first live stream on the main interface of the live interface and play the second live stream on the sub-interface of the live interface when the first playback unit is located at the first position of the linked list data structure; a third playback unit, used to play the second live stream on the main interface and play the first live stream on the sub-interface when the second playback unit is located at the first position.
[0007] As an optional solution, the above-mentioned device also includes at least one of the following: a first adding unit, which is used to add the above-mentioned third live stream to the above-mentioned linked list data structure in response to a new addition request of the third live stream after playing the first live stream and the second live stream on the live broadcast interface; a deleting unit, which is used to delete the above-mentioned second live stream from the above-mentioned linked list data structure in response to a deletion request of the above-mentioned second live stream after playing the first live stream and the second live stream on the live broadcast interface.
[0008] As an optional solution, the above-mentioned device also includes: a second adding unit, which is used to add the live broadcast information of the above-mentioned second live stream to the cache list in the process of deleting the above-mentioned second live stream from the above-mentioned linked list data structure in response to the above-mentioned deletion request of the above-mentioned second live stream; a third adding unit, which is used to obtain the live broadcast information of the above-mentioned second live stream from the above-mentioned cache list in response to the above-mentioned new addition request of the above-mentioned second live stream in the process of deleting the above-mentioned second live stream from the above-mentioned linked list data structure in response to the above-mentioned deletion request of the above-mentioned second live stream, and use the live broadcast information of the above-mentioned second live stream to add the above-mentioned second live stream to the above-mentioned linked list data structure.
[0009] As an optional solution, the above-mentioned device also includes: a management unit, which is used to reduce the picture quality or stop pushing the live stream corresponding to the playback unit in the above-mentioned linked list data structure according to the position in the above-mentioned linked list data structure after playing the first live stream and the second live stream on the live broadcast interface, when the amount of live broadcast resources associated with the above-mentioned live broadcast interface is less than or equal to a preset threshold.
[0010] As an optional solution, the above-mentioned management unit includes at least one of the following: a reducing module, used to preferentially reduce the live stream quality corresponding to the playback unit at a later position in the above-mentioned linked list data structure; a stopping module, used to preferentially stop the live stream push corresponding to the playback unit at a later position in the above-mentioned linked list data structure.
[0011] As an optional scheme, when the above-mentioned first playback unit is located at the head position of the above-mentioned linked list data structure, the above-mentioned first playback unit and the above-mentioned second playback unit are connected in the above-mentioned linked list data structure, including: the tail of the above-mentioned first playback unit and the head of the above-mentioned second playback unit are connected in the above-mentioned linked list data structure.
[0012] As an optional scheme, the above-mentioned second playback unit includes: a playback module, used to play the above-mentioned first live stream on the main camera interface of the above-mentioned live broadcast interface, and play the above-mentioned second live stream on the sub-camera interface of the above-mentioned live broadcast interface, wherein the display area of the above-mentioned main camera interface is larger than the display area of the above-mentioned sub-camera interface, the above-mentioned first live stream is the live picture collected by the first camera associated with the above-mentioned main camera interface, and the above-mentioned second live stream is the live picture collected by the second camera associated with the above-mentioned sub-camera interface.
[0013] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the above-mentioned method for playing multiple live streams.
[0014] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for playing multiple live streams through the computer program.
[0015] In an embodiment of the present application, a first live stream and a second live stream are played on a live broadcast interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit is connected to the second playback unit in the linked list data structure; when the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live broadcast interface, and the second live stream is played on the sub-interface of the live broadcast interface; when the second playback unit is located at the first position, the second live stream is played on the main interface, and the first live stream is played on the sub-interface.
[0016] Each live stream is assigned to a playback unit in the linked list data structure, and the live stream is managed in an orderly manner using the orderliness of the linked list. This ensures that the live stream is played in a predetermined order to avoid management confusion. According to the position in the linked list, the live stream at the first position (i.e., the live stream on the main interface) is played first to ensure that the live stream on the main interface has the best playback effect.
[0017] For the live stream on the secondary interface, less resources can be allocated to balance the use of system resources. The orderliness of the linked list makes it easier for users to predict and find the live streams they are interested in.
[0018] When switching live streams, the orderliness of the linked list can reduce freezes and delays, improve playback fluency, and thus enhance user experience. Orderly management and optimized resource allocation can reduce system resource waste and conflicts, and improve the loading and playback speed of live streams.
[0019] The efficiency of the linked list data structure also meets the live broadcast scenarios with high real-time requirements, further improving the playback efficiency, and thus achieving the purpose of introducing a linked list data structure, corresponding the live stream to the playback unit in the linked list, and ensuring the efficient playback of the live stream through the orderliness of the linked list, thereby achieving the technical effect of improving the playback efficiency of multiple live streams, and thus solving the technical problem of low playback efficiency of multiple live streams. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a schematic diagram of an application environment of an optional method for playing multiple live streams according to an embodiment of the present application;
[0022] Figure 2 It is a flowchart of an optional method for playing multiple live streams according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an optional method for playing multiple live streams according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of another optional method for playing multiple live streams according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of another optional method for playing multiple live streams according to an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of another optional method for playing multiple live streams according to an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of an optional playback device for multiple live streams according to an embodiment of the present application;
[0028] Figure 8 It is a schematic diagram of an optional electronic device structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] According to one aspect of the embodiment of the present application, a method for playing multiple live streams is provided. Optionally, as an optional implementation, the method for playing multiple live streams can be applied to, but is not limited to, Figure 1 In the environment shown, the environment may include, but is not limited to, a user device 102 and a server 112 . The user device 102 may include, but is not limited to, a display 104 , a processor 106 , and a memory 108 . The server 112 includes a database 114 and a processing engine 116 .
[0032] The specific process can be as follows:
[0033] Step S102, the user equipment 102 obtains a first live stream and a second live stream;
[0034] Step S104, sending the first live stream and the second live stream to the server 112 via the network 110;
[0035] Steps S106-S108, the server 112 determines through the processing engine 116 that the first live stream corresponds to the first playback unit in the linked list data structure, and the second live stream corresponds to the second playback unit in the linked list data structure, and further obtains the position of the first playback unit in the linked list data structure and the position of the second playback unit in the linked list data structure;
[0036] Step S110, sending the location information (location information of the rope point used for path finding) to the user device 102 via the network 110, and the user device 102 uses the location information through the processor 106 to display the first live stream and the second live stream on the display 104, and stores the above location information in the memory 108.
[0037] remove Figure 1 In addition to the examples shown, the terminal device can be a terminal device configured with a target client, which can include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client can be a video client, an instant messaging client, a browser client, an education client, etc. The network can include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The server can be a single server, or a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made to this in this embodiment.
[0038] Optionally, as an optional implementation, as Figure 2 As shown, the method for playing multiple live streams can be executed by an electronic device, which can be, for example, Figure 1 The user device or server shown in the figure comprises:
[0039] S202, playing a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure;
[0040] S204, when the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live interface, and the second live stream is played on the sub-interface of the live interface;
[0041] S206, when the second playback unit is in the first position, the second live stream is played on the main interface, and the first live stream is played on the sub-interface.
[0042] In an optional embodiment, live broadcast interface: a visual interface for users to watch live broadcast content, usually including one or more display areas. For example, a live broadcast page on a webpage or mobile application may include a main interface and a secondary interface.
[0043] In an optional embodiment, the first live stream / the second live stream: different live video sources, which may come from different anchors, different content or different time periods. For example, anchor A's live broadcast is the first live stream, and anchor B's live broadcast is the second live stream.
[0044] In an optional embodiment, a linked list data structure: a data structure in which each element (here a playback unit) contains data and a pointer to the next element. For example, a linked list may contain multiple playback units, each of which points to the next unit.
[0045] In an optional embodiment, the first playback unit / the second playback unit: in a linked list data structure, the elements corresponding to the first live stream and the second live stream, respectively. For example, the first node in the linked list may be the first playback unit, storing information about the first live stream; the second node may be the second playback unit, storing information about the second live stream.
[0046] In an optional embodiment, first position: in a linked list data structure, the starting position of the linked list or the position of the first element. For example, in a linked list, the first position is usually the first node of the linked list.
[0047] In an optional embodiment, the main interface / sub-interface: different display areas in the live interface are used to display different live streams at the same time. For example, in a live application, the main interface may occupy most of the screen space and be used to play the main live stream; the sub-interface may be a smaller window or area for playing a secondary live stream.
[0048] It should be noted that this embodiment describes a method for playing multiple live streams on a live interface, in which the application of a linked list data structure in live stream management is particularly mentioned. A linked list is a common data structure consisting of a series of nodes, each of which contains data and a pointer to the next node. In this scenario, each live stream is mapped to a playback unit (i.e., a node) in a linked list, and the connection between the playback units is realized through the pointer of the linked list.
[0049] To further illustrate, it is optional to assume that there are two live streams: live stream A and live stream B. Specifically, live stream A corresponds to the first playback unit in the linked list, and live stream B corresponds to the second playback unit. The two playback units are connected in the linked list, forming an ordered structure.
[0050] Next, determine how the playback units are displayed on the live broadcast interface based on their positions in the linked list:
[0051] If the first playback unit (A live stream) is located at the first position of the linked list, then the A live stream will be played on the main interface of the live interface, and the B live stream will be played on the secondary interface.
[0052] On the contrary, if the second playback unit (B live stream) is located at the first position of the linked list, then the B live stream will be played on the main interface and the A live stream will be played on the secondary interface.
[0053] Through the embodiments provided by the present application, each live stream is assigned to a playback unit in a linked list data structure, and the live stream is managed in an orderly manner using the orderliness of the linked list. This ensures that the live stream is played in a predetermined order to avoid management confusion. According to the position in the linked list, the live stream at the first position (i.e., the live stream on the main interface) is played first to ensure that the live stream on the main interface obtains the best playback effect.
[0054] For the live stream on the secondary interface, less resources can be allocated to balance the use of system resources. The orderliness of the linked list makes it easier for users to predict and find the live streams they are interested in.
[0055] When switching live streams, the orderliness of the linked list can reduce freezes and delays, improve playback fluency, and thus enhance user experience. Orderly management and optimized resource allocation can reduce system resource waste and conflicts, and improve the loading and playback speed of live streams.
[0056] The efficiency of the linked list data structure also meets the live broadcast scenarios with high real-time requirements, further improving the playback efficiency, and thus achieving the purpose of introducing a linked list data structure, corresponding the live stream to the playback unit in the linked list, and ensuring the efficient playback of the live stream through the orderliness of the linked list, thereby achieving the technical effect of improving the playback efficiency of multiple live streams.
[0057] As an optional solution, after playing the first live stream and the second live stream on the live interface, the method further includes at least one of the following:
[0058] S1-1, in response to a request for adding a third live stream, adding the third live stream to a linked list data structure;
[0059] S1-2, in response to a deletion request of the second live stream, deleting the second live stream from the linked list data structure.
[0060] In an optional embodiment, a new add request: a request issued by a user or a system to add a new live stream to a linked list.
[0061] In an optional embodiment, a deletion request is a request sent by a user or a system to remove a live stream from a linked list.
[0062] It should be noted that the description of this embodiment involves a live broadcast system, in which live streams (such as the first live stream and the second live stream) correspond to playback units (such as the first playback unit and the second playback unit) in a linked list data structure. The live streams are played in the order on the live broadcast interface (including the main interface and the secondary interface) according to their positions in the linked list. In addition, the system also supports adding and deleting live streams, which will update the linked list data structure accordingly.
[0063] To further illustrate, it is optional to assume that the current linked list data structure contains the first live stream (corresponding to the first playback unit) and the second live stream (corresponding to the second playback unit) in order. According to the rule, if the first playback unit is at the head of the linked list, the first live stream will be played on the main interface and the second live stream will be played on the secondary interface. Now, the system receives a request to add a third live stream and adds it to the end of the linked list data structure. Subsequently, if the user requests to delete the second live stream, the system will remove the second playback unit from the linked list.
[0064] By responding to addition and deletion requests and updating the linked list data structure accordingly, the system can flexibly manage the playback order and display interface of the live stream. This dynamic adjustment capability makes the live service more flexible and can better meet the different viewing needs of users. At the same time, the efficiency of the linked list data structure also ensures the fast response and real-time performance of the live stream management operation.
[0065] As an optional solution, in the process of deleting the second live stream from the linked list data structure in response to the deletion request of the second live stream, the method further includes:
[0066] Add the live broadcast information of the second live broadcast stream to the cache list;
[0067] In response to the new addition request of the second live broadcast stream, the live broadcast information of the second live broadcast stream is obtained from the cache list, and the live broadcast information of the second live broadcast stream is used to add the second live broadcast stream to the linked list data structure.
[0068] In an optional embodiment, a cache list: a temporary storage space for storing live broadcast information of deleted live broadcast streams so as to quickly restore these live broadcast streams when needed.
[0069] In an optional embodiment, live broadcast information: specific data about the live broadcast stream, which may include the live broadcast stream's identifier, source address, configuration parameters, etc., and is used to restore and replay the live broadcast stream.
[0070] It should be noted that this embodiment describes the operation details when the second live stream is deleted, and how to quickly restore the live stream to the linked list data structure afterwards. Specifically, when the system responds to the deletion request of the second live stream and deletes it from the linked list data structure, it does not directly and completely remove all relevant information, but saves its live information to the cache list. In this way, if a new request for the second live stream is received again later, the system can directly obtain this information from the cache list and quickly re-add the second live stream to the linked list data structure.
[0071] To further illustrate, assuming that the user requests to delete the second live stream being played, the system will not only remove the corresponding second playback unit from the linked list data structure, but also save the live information of the second live stream (such as stream ID, server address, etc.) to the cache list. Later, if the user or other operations request to add the second live stream again, the system does not have to configure it from scratch, but directly reads this information from the cache list and quickly restores the position of the second live stream in the linked list data structure.
[0072] By introducing a cache list to save the live information of deleted live streams and quickly restore from the cache when needed, the system achieves efficient management and fast response of live streams. This mechanism not only reduces the time and resources required for repeated configuration and initialization of live streams, but also improves the flexibility and reliability of the system, allowing users to watch and manage live content more smoothly.
[0073] As an optional solution, after playing the first live stream and the second live stream on the live interface, the method further includes:
[0074] When the amount of live broadcast resources associated with the live broadcast interface is less than or equal to a preset threshold, the live broadcast stream corresponding to the playback unit in the linked list data structure is reduced in quality or the streaming is stopped according to the position in the linked list data structure.
[0075] In an optional embodiment, the amount of live broadcast resources refers to the total amount of resources that the current live broadcast interface can use to play the live broadcast stream, such as bandwidth, CPU usage, memory usage, etc.
[0076] In an optional embodiment, a preset threshold is a pre-set limit value. When the amount of live broadcast resources is lower than this value, the system will trigger resource saving measures.
[0077] In an optional embodiment, the image quality is reduced: the resource usage of the live stream is reduced by reducing the resolution, frame rate or compression ratio of the video stream.
[0078] In an optional embodiment, stop streaming: completely interrupt the transmission of a live stream, thereby saving a large amount of live resources.
[0079] It should be noted that the description of this embodiment mentions a live stream management strategy, that is, when the amount of live resources associated with the live interface is insufficient (i.e., less than or equal to a preset threshold), the system will take corresponding measures to save resources. These measures may include reducing the quality of the live stream being played, or directly stopping the push of a live stream to release resources. The order and objects of these operations are determined according to the position of the live stream in the linked list data structure.
[0080] To further illustrate, it is optional to assume that a live broadcast system is playing the first live broadcast stream and the second live broadcast stream at the same time, and these two live broadcast streams correspond to the first playback unit and the second playback unit in the linked list data structure respectively. If the live broadcast resource usage of the system is close to or reaches the preset threshold at this time, the system may first try to reduce the image quality of the first live broadcast stream (the live broadcast stream at the first position in the linked list) to reduce resource consumption. If resources are still tight after reducing the image quality, the system may further stop pushing the second live broadcast stream (the live broadcast stream at the end of the linked list) to ensure that the live broadcast stream at the first position can continue to play.
[0081] By implementing this live streaming management strategy based on linked list data structure and resource usage, the system can prioritize the playback quality of important live streaming or live streaming that users are more interested in when resources are limited. At the same time, by dynamically adjusting resource allocation, the system can better adapt to various complex and changing network environments and user needs, and provide a smoother and more stable live streaming viewing experience.
[0082] As an optional solution, according to the position in the linked list data structure, the live stream corresponding to the playback unit in the linked list data structure is reduced in quality or the streaming is stopped, including at least one of the following:
[0083] S2-1, preferentially reducing the live stream quality corresponding to the playback units at the later positions in the linked list data structure;
[0084] S2-2, preferentially stop the live streaming corresponding to the playback units at the later positions in the linked list data structure.
[0085] In an optional embodiment, the later playback unit refers to a playback unit that is at a later position (such as the end of the linked list) relative to other playback units in the linked list data structure.
[0086] In an optional embodiment, the image quality is reduced first: in the case of insufficient resources, the system first chooses to reduce the image quality of the live stream corresponding to the playback unit at a later position to reduce resource usage.
[0087] In an optional embodiment, the push streaming is stopped first: if reducing the image quality still cannot meet the resource demand, the system will choose to stop the push streaming of the live stream corresponding to the playback unit at the later position to release more resources.
[0088] It should be noted that this embodiment describes how the system can reduce the quality or stop streaming according to the position of the playback unit in the linked list data structure when the live broadcast resource is insufficient. Specifically, the system will give priority to reducing the quality or stopping the streaming of the live broadcast corresponding to the playback unit at the back of the linked list to ensure the playback quality and stability of the live broadcast at the front.
[0089] To further illustrate, an optional hypothetical linked list data structure has three playback units A, B, and C arranged in sequence, corresponding to three live streams. When the live resource amount is lower than the preset threshold, the system will first try to reduce the image quality of the live stream corresponding to playback unit C (the last position). If the resources are still tight, the system will further consider stopping the push of the live stream corresponding to playback unit C to ensure the normal playback of the live streams corresponding to playback units A and B.
[0090] By preferentially reducing or stopping the image quality or streaming of the live streams corresponding to the playback units at the back of the linked list data structure, the system can ensure the stable playback of important or higher priority live streams under resource constraints. This strategy not only improves resource utilization efficiency, but also improves user experience, especially in scenarios with network congestion or limited device performance.
[0091] As an optional solution, when the first playback unit is located at the first position of the linked list data structure, the first playback unit and the second playback unit are connected in the linked list data structure including:
[0092] The tail of the first playback unit and the head of the second playback unit are connected in a linked list data structure.
[0093] In an optional embodiment, the first position: in a linked list data structure, refers to the starting position of the linked list, that is, the position of the first node.
[0094] In an optional embodiment, tail: In a linked list data structure, the tail of a node generally refers to the pointer portion of the node pointing to the next node.
[0095] In an optional embodiment, head: In a linked list data structure, the head of a node generally refers to the front end of the portion of the node storing data, or the location where the node is pointed to by the previous node.
[0096] In an optional embodiment, connected: In a linked list data structure, two nodes being connected means that the tail pointer of one node points to the head of the other node.
[0097] It should be noted that this embodiment describes the connection mode between the first playback unit and the second playback unit when the first playback unit is at the head position in the linked list data structure. Specifically, the tail of the first playback unit is connected to the head of the second playback unit, which means that in the linked list, the second playback unit follows the first playback unit.
[0098] To further illustrate, it is optional to assume that there is a simple linked list data structure, which contains two playback units: the first playback unit and the second playback unit. If the first playback unit is at the head of the linked list, then there will be a pointer at its tail pointing to the head of the second playback unit, so that when traversing or operating the linked list, the system can know that the second playback unit is immediately after the first playback unit.
[0099] By clarifying the connection between the first playback unit and the second playback unit in the linked list data structure (i.e., the tail of the first playback unit is connected to the head of the second playback unit), the system can accurately manage and play the live stream according to the preset order and logic. This structure ensures that the order relationship between the live streams is maintained, thus providing users with a continuous and orderly viewing experience.
[0100] As an optional solution, playing the first live stream on the main interface of the live interface and playing the second live stream on the sub-interface of the live interface include:
[0101] The first live stream is played on the host camera interface of the live broadcast interface, and the second live stream is played on the secondary camera interface of the live broadcast interface, wherein the display area of the host camera interface is larger than the display area of the secondary camera interface, the first live stream is the live picture collected by the first camera associated with the host camera interface, and the second live stream is the live picture collected by the second camera associated with the secondary camera interface.
[0102] In an optional embodiment, the host position interface: the area in the live broadcast interface used to mainly display the live broadcast content, which has a larger display area and is usually used to play the live broadcast images captured by the host position (first camera position).
[0103] In an optional embodiment, the secondary camera interface is an area in the live broadcast interface used to assist in displaying the live broadcast content. It has a smaller display area and is usually used to play the live broadcast images captured by the secondary camera (second camera).
[0104] In an optional embodiment, the first camera position: is associated with the main camera position interface, and is responsible for capturing and transmitting the first live stream through a camera or other video capture device.
[0105] In an optional embodiment, the second camera: is associated with the secondary camera interface, and is a camera or other video capture device responsible for capturing and transmitting the second live stream.
[0106] It should be noted that this embodiment describes how to play the first live stream and the second live stream on the main interface (i.e., the main camera interface) and the secondary interface (i.e., the secondary camera interface) in the live broadcast interface. It is particularly pointed out that the display area of the main camera interface is larger than that of the secondary camera interface, and it is clarified that the first live stream and the second live stream are live images collected by the first camera and the second camera associated with the main camera interface and the secondary camera interface, respectively.
[0107] To further illustrate, let's assume that in a live broadcast of a sports event, the main camera (first camera) is set in the center of the court to capture the main scene of the game, while the secondary camera (second camera) is set in the audience seats to capture the audience's reaction. In the design of the live broadcast interface, the main camera interface occupies most of the screen area, playing the intense game scene (first live stream), while the secondary camera interface exists in a corner of the screen in the form of a smaller window, showing the enthusiastic cheers of the audience (second live stream).
[0108] By playing the first live stream on the main camera interface of the live broadcast interface and the second live stream on the auxiliary camera interface, the system realizes the simultaneous display of multi-angle live images. This design not only enriches the live broadcast content, but also improves the audience's viewing experience. The larger display area of the main camera interface ensures the clarity and visibility of the main live broadcast picture, while the auxiliary camera interface provides additional display space for auxiliary content, allowing the audience to have a more comprehensive understanding of the live broadcast scene.
[0109] As an optional solution, for ease of understanding, the above-mentioned multi-live stream playback method is applied to a live broadcast scenario with multiple cameras. For example, in the technical implementation of large-scale live events, there is often a contradiction between multi-camera shooting and a single output display screen.
[0110] Specifically, although many cameras may be deployed on site to capture the dynamics of the performers in all directions, the audience often only watches through one display screen, which limits their ability to select different camera angles in real time. Traditional solutions mainly include two modes, but both have obvious technical limitations and user experience issues.
[0111] First, although the output stream method of mixing multiple camera angles can present diversified content to a certain extent, it can only focus on a few popular artists and cannot accurately meet the personalized viewing needs of each user. Secondly, the practice of providing multiple single camera angles for users to choose to watch, although it gives users a certain degree of choice, users cannot watch content from multiple camera angles at the same time without additional equipment support, which undoubtedly reduces the richness and flexibility of the viewing experience.
[0112] In view of the above problems, this embodiment proposes an innovative technical solution, which aims to realize a multi-camera viewing experience customized for C-end users through the following functions:
[0113] Compatible with traditional host viewing mode: The system of this embodiment can seamlessly connect to and optimize the traditional single-camera viewing mode, ensuring that users can smoothly switch to a familiar and stable viewing environment when needed.
[0114] Compatible with user selection of single-camera viewing mode: While retaining the user's freedom to choose a single camera to watch, the technology of this embodiment also provides a more flexible and efficient camera switching mechanism.
[0115] Support users to define any camera as the main viewing angle at will: This function gives users greater autonomy, allowing them to set any camera as the main viewing angle according to their personal preferences, thereby greatly improving the customization and personalization of viewing.
[0116] In addition, the innovation of this embodiment is also reflected in the following two key points:
[0117] Users can customize the viewing of multiple camera contents according to their personal preferences: Through advanced video stream processing technology and user interface design, this embodiment realizes the function of simultaneously displaying multiple camera contents on the same display screen, and users can freely adjust the display area and priority of each camera according to their own needs.
[0118] Watch multiple camera contents in real time on one device: The solution of this embodiment not only improves the viewing diversity, but also ensures that users can enjoy a smooth and delay-free multi-camera viewing experience even on a single device by optimizing data transmission and synchronization mechanisms.
[0119] It should be noted that in traditional single-camera live broadcasts, the page is usually divided into a playback area in the upper half of the screen and a content display area in the lower half of the screen. However, this layout is not flexible enough in multi-camera live broadcast scenarios. To this end, this embodiment introduces the concept of a playback unit, which is a minimum functional display control that integrates an independent player and a control logic module. Figure 3 As shown below:
[0120] Playback unit: As the core component of the system, each playback unit integrates an independent player and control logic module, including live broadcast related functions such as pause, play, stream pulling, member authentication, advertising display, barrage processing and error prompts, ensuring the independence and integrity of each playback unit.
[0121] Linked list data structure: The system uses a linked list to manage multiple playback units. The position of each unit in the linked list directly corresponds to its display position in the playback area. This design allows the display position of multiple cameras to be flexibly adjusted, solving the limitations of traditional single-camera layout in multi-camera scenarios.
[0122] Playback unit factory: This factory class dynamically generates playback units that meet specific business needs based on the configuration information sent by the backend. Whether it is no bullet screen, no ads or vertical screen live broadcast, it can respond flexibly, improving the adaptability and configurability of the system.
[0123] Dynamic camera management: Users can add or delete camera positions through the system interface. When adding, the system requests a new unit from the playback unit factory and adds it to the linked list to achieve dynamic addition of camera positions; when deleting, the linked list feature is used to seamlessly connect the previous and next units to avoid blank areas, and automatically adjust the display positions of other playback units to ensure the consistency of the user interface and the smoothness of the user experience.
[0124] The control logic covers live broadcast-related business logic such as pausing playback, pulling streams, member authentication, advertising, barrage and error prompts, thereby ensuring the independence and integrity of each playback unit.
[0125] In order to further adapt to the needs of multi-camera display, this embodiment reconstructs the original single-camera upper half-screen display area into a linked list data structure. The position of each element in the linked list determines its display position in the playback area, effectively solving the problem of multi-camera display position positioning. At the same time, this embodiment defines a playback unit factory class, which can dynamically generate playback units that meet the needs of specific business scenarios based on different configurations issued by the backend. For example, for scenarios such as no barrage, no advertising, or vertical screen live broadcast, the playback unit factory can flexibly produce corresponding playback units.
[0126] In terms of user interaction, Figure 4The UML class diagram shown shows the mechanism of dynamically managing playback units, including BusinessData: business data class, ConfigData configuration data, mType type, getConfigDataForServer obtains server configuration data, LivePlayFactory: live playback factory class, factoryCreater factory creator, parseConfig parses configuration, parseAuth parses authentication, createLivePlayView creates live playback view, LivePlayView: live playback view class, LivePlayLayer live playback layer, LiveBarrageLayer live barrage layer, LiveControlLayer live control layer, LiveRemindLayer live reminder layer, LiveAdLayer live advertising layer, create creates an instance, startPlay starts playback, pausePlay pauses playback, LivePlayViewLinkValue: live playback view link value class, head head (or start), end end, LivePlayViewLinkMap: live playback view link mapping.
[0127] Specifically, when a camera position needs to be added, the system will request the generation of a new LivePlayView instance, i.e., a playback unit, from the LivePlayFactory class. These newly generated playback units are then added to a linked list connected by the LivePlayViewLinkValue class, enabling the dynamic addition of camera positions. The linked list structure ensures the orderly management of playback units, facilitating subsequent operations.
[0128] When deleting camera positions, the system cleverly uses the order of the linked list to ensure that after removing a specific playback unit, the units before and after it can be seamlessly connected, avoiding the appearance of blank playback areas in the user interface. At the same time, the system automatically adjusts the display position of the affected playback unit to maintain the consistency and aesthetics of the user interface, thereby improving the user experience.
[0129] Furthermore, in multi-camera live broadcast scenarios, the performance overhead issue is particularly prominent, mainly reflected in two aspects: memory overhead and network congestion.
[0130] In response to the memory overhead issue, this embodiment has taken a number of optimization measures. First, this embodiment limits the number of camera screens displayed at the same time, allowing a maximum of 4 camera screens (1 main camera + 3 auxiliary cameras) to accommodate the limitations of the mobile device screen size. Secondly, this embodiment has conducted extensive memory usage tests, and has determined the availability of function switches based on the comprehensive device performance rating and available memory, ensuring that the multi-camera function will not be enabled when the device performance is insufficient, thereby avoiding functional abnormalities caused by device performance issues. In addition, this embodiment also introduces the concept of primary and auxiliary cameras, which separates the traditional camera from the lower half of the screen. Figure 1 The one-to-one binding relationship is optimized to one host position corresponding to one lower half screen view, which significantly reduces memory overhead.
[0131] In terms of network congestion, this embodiment adopts an intelligent network buffering processing strategy. When network buffering occurs during the main camera playback, the system will first remind the user to improve the network conditions. At the same time, it will try to reduce the clarity of the secondary camera at the back or reduce the playback of the secondary camera to give priority to the smooth playback of the main camera. This strategy can maximize the user's viewing experience when the network condition is poor. Figure 5 As shown below:
[0132] Limit the number of camera screens: The system limits the number of camera screens displayed at the same time to a maximum of 4 (1 main + 3 secondary) to adapt to the mobile device screen and reduce memory usage.
[0133] Memory usage testing and rating: Through extensive memory testing, combined with device performance rating and available memory, intelligent judgment of the availability of function switches is made to avoid enabling the multi-camera function when performance is insufficient.
[0134] Optimization of primary and secondary camera positions: Introducing the concept of primary and secondary camera positions, optimizing the traditional one-to-one binding relationship, reducing memory overhead, and ensuring smooth playback.
[0135] Memory information collection and verification: After startup, the device memory information is collected and verified to ensure data accuracy.
[0136] Cloud rating and cache strategy: Pull cloud rating configuration based on memory information, decide whether to enable cache, and optimize resource utilization.
[0137] Intelligent buffering strategy: When network congestion is detected, the system first reminds the user to improve the network environment.
[0138] Priority playback adjustment: When the network is buffering, give priority to the playback of the main camera, try to reduce the clarity of the secondary camera or pause the playback to release network resources.
[0139] Cache and authentication processing: When the network connection is normal, the system ensures the continuity and security of playback through cache and authentication processing.
[0140] Counter mechanism: The network status is monitored through a counter. If it is still unstable after multiple attempts, further measures are taken, such as pausing the playback of the secondary camera, to improve the user experience.
[0141] In addition, in order to improve the user's operating experience in multi-camera live broadcast, this embodiment focuses on the waiting time and interface transition effect during the process of adding, deleting and switching cameras.
[0142] When adding a new camera, this embodiment introduces a waiting animation and a play cache list mechanism. The waiting animation can reduce the black screen waiting time of the user during the start-up process and improve the user experience. The play cache list can realize fast start-up when the user adds a camera that was previously deleted again, reducing the user's waiting time. At the same time, this embodiment will also request the server to update the live stream address and authentication information in the cache list to ensure the real-time and accuracy of the live stream.
[0143] In the process of switching and increasing or decreasing the camera positions, this embodiment adopts a strategy of dynamically adjusting the size and position of the playback unit. By comparing the old and new configurations and calculating the position change value of the playback unit in the coordinate axis, this embodiment can achieve a smooth transition effect. This design not only improves the aesthetics of the user interface, but also enhances the fluency of user operations. At the same time, the time difference of the animation display is used to reduce the performance resource preemption problem when multiple playback units are started at the same time, further ensuring the stability and fluency of the entire function. Figure 6 As shown below:
[0144] Optimization of adding new camera positions: When adding a new camera position, the system immediately starts the waiting animation, effectively shortening the waiting time for users to face a black screen and significantly improving the start-up experience. At the same time, using the playback cache list mechanism, when users re-add a camera position that was previously deleted, the live content can be quickly loaded, further reducing the waiting time. In addition, the system will automatically request the server to update the live stream address and authentication information to ensure the real-time and security of the live content.
[0145] Dynamic adjustment of camera switching and increase and decrease: When the camera position changes, the system accurately calculates the position change of the playback unit on the interface through intelligent comparison of the new and old configurations, and dynamically adjusts its size and position. This process not only achieves a smooth transition of interface elements, but also significantly improves the aesthetics of the user interface and the fluency of operation. At the same time, the time difference strategy of animation display effectively alleviates the performance pressure when multiple playback units start playing at the same time, ensuring the stability and fluency of the overall function.
[0146] In an optional embodiment, the operation background can perform refined live broadcast configuration according to the business needs of live broadcast in different scenarios. This covers the flexible switching between horizontal and vertical screen live broadcast modes, as well as the personalized setting of different numbers of camera positions. The establishment of this configuration mechanism not only lays a solid foundation for subsequent live broadcast maintenance and development work, but also facilitates the rapid access of live broadcast in new scenarios. Specifically, when it is necessary to introduce a new live broadcast scene, it is only necessary to add the corresponding business configuration and parsing logic to achieve rapid expansion of functions, thereby significantly reducing the cost of function maintenance and business expansion.
[0147] In addition, with the support of multi-camera live broadcast configuration, users can use a single device to watch real-time live content from multiple cameras at the same time, and users can watch on multiple screens simultaneously through one device.
[0148] In an optional embodiment, when a user adds a camera position that has been deleted before, the live stream address and authentication information will be obtained from the cache list first, and the broadcast will start directly, reducing the user's waiting time. At the same time, the server will be requested to update the live stream address and authentication information in the list. If there is a change, the camera position will be notified to initiate the broadcast process again. If there is no change, the broadcast effect will be achieved in seconds.
[0149] In an optional embodiment, when the camera position switching and adding or deleting camera positions require adjustment of the size and position of the affected playback units in the display, first find the current position of each affected playback unit in the linked list, as well as the target position to be changed, read the display area and display area positioning configuration of the two positions, compare the new and old configurations, and obtain the display position and display area size difference of the corresponding playback unit before and after. Finally, a simple change animation is used to dynamically modify the position of the playback unit in the coordinate axis, so as to achieve a smooth transition effect when the network status cannot achieve instant playback or the device performance is average. At the same time, since the values of movement and size change of each playback unit are different, the time difference of animation display can be used to reduce the situation where multiple playback units start playing at the same time and occupy the device performance resources, so as to ensure the smoothness of the entire function as much as possible.
[0150] Through the embodiments provided in this application, the user's viewing experience is enriched and the user's pursuit of diversified and personalized viewing needs is met. At the same time, through the simple and intuitive operation of adding and reducing camera positions, users can easily customize their preferred viewing positions, which not only improves the user's willingness to interact during the live broadcast, but also further enhances the user stickiness and activity of the live broadcast platform. From a technical perspective, the configuration and implementation of this multi-camera live broadcast not only reflects the efficiency and flexibility of the background system, but also the careful consideration and optimization of the front-end user experience.
[0151] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0152] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0153] According to another aspect of the embodiment of the present application, a multi-live stream playback device for implementing the multi-live stream playback method is also provided. Figure 7 As shown, the device comprises:
[0154] A first playback unit 702 is used to play a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, and the second live stream corresponds to a second playback unit in a linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure;
[0155] The second playback unit 704 is used to play the first live stream on the main interface of the live interface and play the second live stream on the sub-interface of the live interface when the first playback unit is located at the first position of the linked list data structure;
[0156] The third playback unit 706 is used to play the second live stream on the main interface and the first live stream on the sub-interface when the second playback unit is in the first position.
[0157] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0158] As an optional solution, the device further includes at least one of the following:
[0159] A first adding unit is used for adding the third live stream to the linked list data structure in response to a request for adding the third live stream after playing the first live stream and the second live stream on the live interface;
[0160] The deleting unit is used to delete the second live stream from the linked list data structure in response to a deletion request of the second live stream after playing the first live stream and the second live stream on the live interface.
[0161] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0162] As an optional solution, the device also includes:
[0163] A second adding unit is used to add the live broadcast information of the second live broadcast stream to the cache list in a process of deleting the second live broadcast stream from the linked list data structure in response to a deletion request of the second live broadcast stream;
[0164] The third adding unit is used to respond to a request for adding the second live stream, while deleting the second live stream from the linked list data structure in response to a request for deleting the second live stream, obtain the live broadcast information of the second live stream from the cache list, and add the second live stream to the linked list data structure using the live broadcast information of the second live stream.
[0165] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0166] As an optional solution, the device also includes:
[0167] The management unit is used to reduce the image quality or stop streaming the live stream corresponding to the playback unit in the linked list data structure according to the position in the linked list data structure after playing the first live stream and the second live stream on the live interface, when the amount of live resources associated with the live interface is less than or equal to a preset threshold.
[0168] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0169] As an optional solution, the management unit includes at least one of the following:
[0170] A reduction module, used to preferentially reduce the live stream image quality corresponding to the playback units at the rear position in the linked list data structure;
[0171] The stop module is used to preferentially stop the live streaming corresponding to the playback unit at the later position in the linked list data structure.
[0172] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0173] As an optional solution, when the first playback unit is located at the first position of the linked list data structure, the first playback unit and the second playback unit are connected in the linked list data structure including:
[0174] The tail of the first playback unit and the head of the second playback unit are connected in a linked list data structure.
[0175] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0176] As an optional solution, the second playing unit 704 includes:
[0177] The playback module is used to play the first live stream on the main camera interface of the live broadcast interface, and to play the second live stream on the sub-camera interface of the live broadcast interface, wherein the display area of the main camera interface is larger than the display area of the sub-camera interface, the first live stream is the live picture collected by the first camera associated with the main camera interface, and the second live stream is the live picture collected by the second camera associated with the sub-camera interface.
[0178] For a specific implementation example, reference may be made to the example shown in the above-mentioned method for playing multiple live streams, which will not be described in detail in this example.
[0179] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned multi-live stream playback method is also provided. The electronic device can be but is not limited to Figure 1 The user device 102 or the server 112 shown in FIG. 1 is used as an example to illustrate the electronic device as the user device 102. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0180] In an optional embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0181] In an optional embodiment, the processor may be configured to perform the following steps through a computer program:
[0182] S1, playing a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure;
[0183] S2, when the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live interface, and the second live stream is played on the sub-interface of the live interface;
[0184] S3, when the second playback unit is in the first position, the second live stream is played on the main interface, and the first live stream is played on the sub-interface.
[0185] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations shown.
[0186] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for playing multiple live streams in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, to implement the above-mentioned method for playing multiple live streams. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 may be specifically, but not limited to, used to store information such as the first live stream and the second live stream. As an example, such as Figure 8 As shown, the memory 802 may include, but is not limited to, the first playback unit 702, the second playback unit 704, and the third playback unit 706 in the playback device for multiple live streams. In addition, other module units in the playback device for multiple live streams may also be included but are not limited to, which will not be repeated in this example.
[0187] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0188] In addition, the electronic device further includes: a display 808 for displaying information such as the first live stream and the second live stream; and a connection bus 810 for connecting various module components in the electronic device.
[0189] In other embodiments, the user device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, a peer-to-peer network may be formed between the nodes, and any form of computing device, such as a server, user device, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0190] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0191] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0192] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0193] The computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. The input / output interface (I / O interface) is also connected to the bus.
[0194] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a local area network card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0195] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0196] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0197] In an optional embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0198] S1, playing a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure;
[0199] S2, when the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live interface, and the second live stream is played on the sub-interface of the live interface;
[0200] S3, when the second playback unit is in the first position, the second live stream is played on the main interface, and the first live stream is played on the sub-interface.
[0201] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0202] In an optional embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0203] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0204] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0205] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0206] In the several embodiments provided in the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0207] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0209] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for playing multiple live streams, characterized in that: include: Playing a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to a first playback unit in a linked list data structure, the second live stream corresponds to a second playback unit in the linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure; When the first playback unit is located at the first position of the linked list data structure, the first live stream is played on the main interface of the live interface, and the second live stream is played on the sub-interface of the live interface; When the second playback unit is located at the first position, the second live stream is played on the main interface, and the first live stream is played on the secondary interface.
2. The method according to claim 1, characterized in that After playing the first live stream and the second live stream on the live interface, the method further includes at least one of the following: In response to a request for adding a third live stream, adding the third live stream to the linked list data structure; In response to the deletion request of the second live stream, the second live stream is deleted from the linked list data structure.
3. The method according to claim 2, characterized in that In the process of deleting the second live stream from the linked list data structure in response to the deletion request of the second live stream, the method further includes: Adding the live broadcast information of the second live broadcast stream to the cache list; In response to the request for adding the second live broadcast stream, the live broadcast information of the second live broadcast stream is obtained from the cache list, and the live broadcast information of the second live broadcast stream is used to add the second live broadcast stream to the linked list data structure.
4. The method according to claim 1, characterized in that: After playing the first live stream and the second live stream on the live interface, the method further includes: When the amount of live broadcast resources associated with the live broadcast interface is less than or equal to a preset threshold, the live broadcast stream corresponding to the playback unit in the linked list data structure is reduced in quality or the streaming is stopped according to the position in the linked list data structure.
5. The method according to claim 4, characterized in that The step of reducing the image quality or stopping the streaming of the live stream corresponding to the playback unit in the linked list data structure according to the position in the linked list data structure includes at least one of the following: Prioritize reducing the live stream image quality corresponding to the playback units at the later positions in the linked list data structure; The live streaming corresponding to the playback unit at a later position in the linked list data structure is stopped first.
6. The method according to any one of claims 1 to 5, characterized in that In the case where the first playback unit is located at the first position of the linked list data structure, the first playback unit and the second playback unit are connected in the linked list data structure including: The tail of the first playback unit and the head of the second playback unit are connected in the linked list data structure.
7. The method according to any one of claims 1 to 5, characterized in that The method of playing the first live stream on the main interface of the live interface and playing the second live stream on the sub-interface of the live interface includes: The first live stream is played on the main camera interface of the live broadcast interface, and the second live stream is played on the sub-camera interface of the live broadcast interface, wherein the display area of the main camera interface is larger than the display area of the sub-camera interface, the first live stream is the live picture collected by the first camera associated with the main camera interface, and the second live stream is the live picture collected by the second camera associated with the sub-camera interface.
8. A device for playing multiple live streams, characterized in that: include: A first playback unit, configured to play a first live stream and a second live stream on a live interface, wherein the first live stream corresponds to the first playback unit in a linked list data structure, the second live stream corresponds to the second playback unit in the linked list data structure, and the first playback unit and the second playback unit are connected in the linked list data structure; A second playback unit is configured to play the first live stream on the main interface of the live interface and play the second live stream on the sub-interface of the live interface when the first playback unit is located at the first position of the linked list data structure; The third playback unit is used to play the second live stream on the main interface and play the first live stream on the sub-interface when the second playback unit is located at the first position.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed by an electronic device.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.