Method, device, medium, product, chip and terminal for playing network television program
By mapping the signal transmission network of network TV using a dynamic multi-branch tree linked list and recording historical playback paths, the problem of low playback path selection efficiency when watching or replaying network TV programs is solved, enabling fast path construction and fault switching, and improving playback stability and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AMLOGIC TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, when watching or replaying online TV programs, it is necessary to re-detect the complex signal transmission network, resulting in low efficiency in playback path selection and long program playback waiting time.
The signal transmission network structure of the network television adopts a multi-level redundancy and hierarchical disaster recovery design using a dynamic multi-branch tree linked list. It records the historical playback paths actually requested by the TV program and quickly constructs the current playback path through the dynamic multi-branch tree linked list, avoiding the need to re-probe the complex network.
It improved the efficiency of playback path establishment, shortened the program playback waiting time, and ensured stable playback of TV programs and rapid fault switching.
Smart Images

Figure CN121585851B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart terminal technology, and in particular to a method for playing online television programs, as well as electronic devices, computer-readable storage media, computer program products, chips, and online television terminals. Background Technology
[0002] IPTV (Internet Protocol Television) typically employs a multi-level redundancy and layered disaster recovery design in its signal transmission network. For example, the signal transmission network includes multiple source stations, multiple CDN (Content Delivery Network) nodes, and multiple transmission paths. Therefore, smart terminals of IPTV, such as smart set-top boxes or smart TVs, need to ensure stable program playback in a complex network.
[0003] Currently, when replaying or re-enacting previously broadcast television programs, it is necessary to re-probe the complex network to select a playback path each time. As a result, the process of establishing a playback path is time-consuming, the efficiency of selecting a playback path is low, and the program playback waiting time is long. Summary of the Invention
[0004] This invention aims to at least solve one of the technical problems existing in the prior art. Therefore, one objective of this invention is to provide a method for playing online television programs that can quickly establish the current playback path based on the historical successful playback paths of the target television program, thereby improving the speed of playback path establishment and significantly shortening the program playback waiting time.
[0005] The second objective of this invention is to provide an electronic device.
[0006] A third objective of this invention is to provide a computer-readable storage medium.
[0007] The fourth objective of this invention is to provide a computer program product.
[0008] The fifth objective of this invention is to provide a chip.
[0009] The sixth objective of this invention is to propose a network television terminal.
[0010] To achieve the above objectives, a method for playing network television programs according to a first aspect of the present invention includes: receiving a playback process start instruction for a target television program and obtaining the base address of the target television program; querying a dynamic multi-way tree linked list based on the base address, wherein the dynamic multi-way tree linked list is constructed based on a historical playback path actually requested by at least one television program to map the signal transmission network of the network television program; when a record of a historical playback path corresponding to the base address exists in the dynamic multi-way tree linked list, establishing a current playback path for the target television program based on the historical playback path corresponding to the base address in the dynamic multi-way tree linked list; and playing the target television program according to the current playback path.
[0011] According to the network television program playback method of the present invention, a dynamic multi-branch tree linked list is used to map the signal transmission network structure of the network television with multi-level redundant deployment and hierarchical disaster recovery design. The dynamic multi-branch tree linked list records the historical playback paths actually requested by the television program. When the playback process of the target television program is started, if there is a record of the historical playback path corresponding to the base address of the television program in the dynamic multi-branch tree linked list, it means that the target television program is a historical television program, that is, a television program that has been played. The historical program information corresponding to the target television program can be quickly queried in the dynamic multi-branch tree linked list based on the base address of the target television program, and then the current playback path can be constructed based on the historical program information, without having to start from scratch to explore the complex signal transmission network to determine the playback path. This saves the time of address detection and connection request, improves the efficiency of playback path establishment, and shortens the program playback waiting time.
[0012] In some embodiments, the dynamic multi-branch tree linked list includes multiple playback trees that map multiple TV programs in the program playlist; each playback tree includes multiple branch paths, and each branch path maps to the historical playback path of the corresponding TV program; each branch path represents the hierarchical address relationship from the root address node - content source or service entry address node - server address node - transport stream fragment address node when the TV program is played, wherein the root address node corresponds to the base address of the TV program.
[0013] By using a dynamic multi-branch tree linked list to map the playback paths of each TV program, the address relationships at each level of the network TV and the multi-level disaster recovery design can be vividly reflected, thereby ensuring the stable playback of TV programs.
[0014] In some embodiments, when a record of a historical playback path corresponding to the base address exists in the dynamic multi-way tree linked list, the current playback path of the target TV program is established based on the historical playback path corresponding to the base address in the dynamic multi-way tree linked list. This includes: obtaining the root address node corresponding to the base address in the dynamic multi-way tree linked list; determining the playback tree in which the root address node in the dynamic multi-way tree linked list is located, as the target playback tree; and establishing the current playback path of the target TV program based on the hierarchical address relationship of the target branch path records in the target playback tree. In this way, playback path construction is simpler and more efficient, without the need to probe complex networks.
[0015] In some embodiments, the dynamic multi-branch tree linked list further records the state information of each level of address nodes on each branch path of each playback tree; the method further includes: determining the target branch path based on the state information of each level of address nodes on each branch path in the target playback tree. In this way, a more efficient and higher-quality playback path can be selected.
[0016] In some embodiments, the status information includes the availability of the content source or service entry address, response speed, and the reachability and latency of the server address.
[0017] In some embodiments, the method further includes: when the current playback path of the target television program fails, determining the fault address node corresponding to the fault point on the target branch path; finding a backup address node in the target playback tree to replace the fault address node; and establishing a new playback path for the target television program based on the hierarchical address relationship of the branch path where the backup address node is located. Thus, when a playback failure occurs, fault path switching can be quickly achieved without having to probe a complex network from scratch.
[0018] In some embodiments, finding a backup address node in the target playback tree to replace the faulty address node includes: when the faulty address node is a server node in the target playback tree, finding a server node in the target playback tree that belongs to the same content source or service entry address node as the faulty address node; the backup address node is the highest priority server node in the target playback tree that belongs to the same content source or service entry address node as the faulty address node. This allows for the direct use of an available backup node at the corresponding location, eliminating the need to search from the root address node, thus improving efficiency.
[0019] In some embodiments, finding a backup address node in the target playback tree to replace the faulty address node includes: when the faulty address node is a content source or service entry address node in the target playback tree, finding available content source or service entry address nodes in the target playback tree other than the faulty content source or service entry address node, to serve as the backup address node. This can improve the efficiency of playback path switching.
[0020] In some embodiments, the method further includes updating the dynamic multi-branch tree linked list based on the actual playback status of the target television program. This allows for real-time adaptation to changes in the actual network, maintaining consistency with the actual playback network of the television program and improving playback stability.
[0021] In some embodiments, updating the dynamic multi-way tree linked list based on the actual playback status of the target TV program includes at least one of the following: updating the status information of each level of the address nodes in the playback tree where the target TV program is located; marking the status of the address node as an unavailable node when the number of connection failures of any address node exceeds a threshold; and deleting the corresponding old transport stream fragment address nodes and the transport stream fragment address nodes that have already been played from the dynamic multi-way tree linked list after constructing new transport stream fragment address nodes. This maintains the simplicity and efficiency of the dynamic multi-way tree linked list and allows it to adapt to changes in the actual network status.
[0022] In some embodiments, the method further includes: when there is no record of a historical playback path corresponding to the base address of the target TV program in the dynamic multi-way tree linked list, or when the current playback path of the target TV program fails and there is no backup address node, establishing a root address node corresponding to the target TV program in the dynamic multi-way tree linked list based on the base address of the target TV program; during the playback of the target TV program, recording the address nodes of each level of the target TV program according to the playback flow of the target TV program, and constructing the address nodes of each level of the target TV program into the tree structure of the root address node corresponding to the target TV program, so as to form a playback tree mapping the historical playback path of the target TV program. Therefore, when the TV program is replayed or viewed again, the historical playback path can be directly used, improving the efficiency of playback path construction.
[0023] To achieve the above objectives, a second aspect of the present invention provides an electronic device comprising: a processor; a memory connected to the processor; and a computer program executed by the processor, wherein the computer program, when executed, implements the method for playing online television programs.
[0024] According to the electronic device of the present invention, by executing the playback method of the above embodiment, a dynamic multi-branch tree linked list is used to map the signal transmission network structure of the network television with multi-level redundant deployment and hierarchical disaster recovery design. The dynamic multi-branch tree linked list records the historical playback paths actually requested by the television program. When the playback process of the target television program starts, if there is a record of the historical playback path corresponding to the base address of the television program in the dynamic multi-branch tree linked list, it means that the target television program is a historical television program, that is, a television program that has been played. The corresponding historical program information in the dynamic multi-branch tree linked list can be quickly queried based on the base address of the target television program, and then the current playback path can be constructed based on the historical program information, without having to start from scratch to explore the complex signal transmission network to determine the playback path, thereby saving the time of address detection and connection request, improving the efficiency of playback path establishment, and shortening the program playback waiting time.
[0025] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for playing network television programs.
[0026] To achieve the above objectives, a fourth aspect of the present invention provides a computer program product, the computer program product including a computer program stored on a computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method for playing the network television program.
[0027] To achieve the above objectives, a fifth aspect of the present invention provides a chip for implementing the aforementioned method for playing online television programs.
[0028] To achieve the above objectives, a sixth aspect of the present invention provides a network television terminal, wherein the network television terminal includes the aforementioned electronic device, or the network television terminal includes the aforementioned chip, or the network television terminal is used to implement the aforementioned method for playing network television programs.
[0029] According to an embodiment of the present invention, the network television terminal uses a dynamic multi-branch tree linked list to map the signal transmission network structure of the network television with multi-level redundant deployment and hierarchical disaster recovery design. The dynamic multi-branch tree linked list records the historical playback paths actually requested by the television program. When the target television program starts the playback process, if there is a record of the historical playback path corresponding to the base address of the television program in the dynamic multi-branch tree linked list, it means that the target television program is a historical television program, that is, a television program that has been played. The historical program information corresponding to the target television program can be quickly queried in the dynamic multi-branch tree linked list based on the base address of the target television program, and then the current playback path can be constructed based on the historical program information, without having to start from scratch to explore the complex signal transmission network to determine the playback path. This saves the time of address detection and connection request, improves the efficiency of playback path establishment, and shortens the program playback waiting time.
[0030] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0031] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0032] Figure 1 This is a flowchart of a method for playing online television programs according to an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram illustrating a method for switching paths when a playback failure occurs according to an embodiment of the present invention;
[0034] Figure 3 This is a schematic diagram of the four modules that the IPTV playback stream passes through during an IPTV playback process according to an embodiment of the present invention;
[0035] Figure 4 This is a schematic diagram of the HLS module processing during IPTV playback stream according to an embodiment of the present invention;
[0036] Figure 5 (1) is a schematic diagram of multi-level redirection in the HLS module protocol parsing process;
[0037] Figure 5 (2) is a schematic diagram of the relevant data status generated by the HTTP module in the HLS processing procedure;
[0038] Figure 5 (3) is a schematic diagram of the playback tree constructed by the TCP layer based on the address nodes of each level in HLS processing;
[0039] Figure 6This is a flowchart of the processing procedure for the playback tree of a single program in a network television program playback method according to an embodiment of the present invention;
[0040] Figure 7 This is a block diagram of an electronic device according to an embodiment of the present invention;
[0041] Figure 8 This is a block diagram of a network television terminal according to an embodiment of the present invention. Detailed Implementation
[0042] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention are described in detail below.
[0043] IPTV signal transmission networks often employ multi-level redundancy and layered disaster recovery designs. The physical implementation of its network architecture is primarily reflected in:
[0044] 1. Multi-source deployment. This involves setting up multiple content source servers in different geographical regions or network operator nodes, with each source server storing the same IPTV program content. When the primary source server (such as the content center in a certain region) fails, the system can quickly switch to the backup source server to ensure uninterrupted content supply.
[0045] 2. Multi-CDN (Content Delivery Network) node deployment. A distributed CDN architecture is adopted, deploying edge caching nodes nationwide or globally. When a user requests a program, the nearest CDN node is prioritized for content retrieval; if the current CDN node fails, it automatically switches to an adjacent available node, reducing cross-regional transmission latency.
[0046] 3. Multi-path transmission design. Multiple transmission links are configured for the same program content (e.g., links from different network operators, different routing paths). During playback, the bandwidth, latency, and packet loss rate of each link are monitored in real time. When the quality of the primary link degrades, the system switches to a backup link.
[0047] In short, IPTV employs a complex signal transmission network comprised of multiple source stations, CDN nodes, and paths to achieve disaster recovery and ensure smooth and stable television program playback. During television program playback, reliable transport layer services are requested via HTTP (Hypertext Transfer Protocol), and network address connections are requested via TCP / IP (Transmission Control Protocol / Internet Protocol). IPTV needs to probe and request connections from address nodes at various levels within this complex network to select a playback path. This process is time-consuming and inefficient, especially when rewatching or replaying previously broadcast television programs, increasing playback wait time.
[0048] To address the above problems, this invention proposes a method for playing online television programs. This method can improve the efficiency of playback path selection during program playback and reduce waiting time, especially for scenarios involving watching or replaying programs.
[0049] In this embodiment, the network television program playback method of this invention can be used on the television terminal side of a network television system, such as a smart set-top box or a smart TV.
[0050] The following is for reference. Figures 1-6 A method for playing online television programs according to an embodiment of the present invention is described.
[0051] Figure 1 This is a flowchart of a method for playing online television programs according to an embodiment of the present invention, such as... Figure 1 As shown, the method for playing online television programs according to an embodiment of the present invention includes steps S1-S4.
[0052] S1 receives the playback start command of the target TV program and obtains the base address of the target TV program.
[0053] Specifically, when a user wants to watch a TV program, they can select the desired TV program channel through peripherals such as a remote control or other devices, and send a playback start command for the target TV program to the TV end, such as a set-top box or smart TV. The TV end then obtains the base address of the target TV program.
[0054] The base address is a fixed and unique identification address for the target TV program. This base address can be included in the playback process start command. The TV terminal can determine which TV program the target TV program is based on this base address. In other words, the base address is the identification information configured for the target TV program.
[0055] S2, querying a dynamic multi-branch tree linked list based on its base address.
[0056] Among them, the dynamic multi-way tree linked list is a non-linear data structure where each node can have multiple child nodes, offering higher data storage density and flexibility. Its core feature is its dynamism, supporting real-time addition, deletion, and modification of nodes, adapting to dynamic changes in data volume. Its hierarchical structure has clear hierarchical relationships, facilitating data storage and retrieval. It possesses memory capabilities, can preserve historical information, supports fast replay and intelligent switching of balance, and maintains tree balance through specific algorithms to ensure retrieval efficiency.
[0057] In an embodiment of the present invention, the dynamic multi-branch tree linked list is constructed based on the historical playback path of at least one television program that has actually been requested, in order to map the signal transmission network of the network television.
[0058] In this embodiment of the invention, a dynamic multi-branch tree linked list is used to map the network structure of the network television with multi-level redundant deployment and layered disaster recovery design. The dynamic multi-branch tree linked list records the historical playback paths that the television programs have actually requested.
[0059] S3. When there is a record of the historical playback path corresponding to the base address in the dynamic multi-way tree linked list, establish the current playback path of the target TV program based on the historical playback path corresponding to the base address in the dynamic multi-way tree linked list.
[0060] S4: Play the target TV program according to the current playback path.
[0061] In other words, a dynamic multi-way tree linked list stores the playback tree of historical TV programs, which is why it supports fast replay or playback. When a record of a historical playback path corresponding to a base address exists in the dynamic multi-way tree linked list, it indicates that the target TV program is a historical TV program, meaning it has already been played. Historical program information can be quickly retrieved based on the target TV program's base address, and the corresponding historical program information in the dynamic multi-way tree linked list can then be used to construct the current playback path. This eliminates the need to start from scratch to probe the complex signal transmission network to determine the playback path, thus saving time on address probing and connection requests, improving playback path establishment efficiency, and shortening program playback waiting time.
[0062] In some embodiments of the present invention, the dynamic multi-branch tree linked list includes multiple playback trees that map multiple television programs in the program playlist; each playback tree includes multiple branch paths, each branch path maps to the historical playback path of the corresponding television program; each branch path represents the hierarchical address relationship from the root address node - content source or service entry address node - server address node - transport stream fragment address node when the television program is played, wherein the root address node corresponds to the base address of the television program.
[0063] In other words, in this application, for a single television program, such as the currently playing program, the playback tree corresponding to the television program in the dynamic multi-branch tree linked list is a tree structure that records all playback paths actually requested by the program. The hierarchical relationship in the playback path can be represented as URL (Uniform Resource Locator) node → IP (Internet Protocol) node → TS (Transport Stream) node.
[0064] The URL node can include a root address node and multiple content source or service entry address nodes. The URL node contains URL attributes (address), current status (availability, response speed, etc.), and child nodes pointing to possible IP addresses below it. The IP node contains the status of the specific IP address (reachability, latency, etc.).
[0065] In this structure, a single URL node (representing a content source or service entry point) typically has multiple IP nodes (representing specific, redundant server addresses behind that URL). This precisely maps to the layered redundancy structure of the IPTV network, where a single content URL may correspond to multiple physical server IPs. Furthermore, an IP node may be connected to one or more TS nodes. The TS node is the lowest-level node in the IPTV playback tree data structure, representing the actual transport stream data packets. TS nodes carry the actual audio and video data streams; each TS packet is typically fixed at 188 bytes. TS nodes also record information such as the availability and playback status of TS segments.
[0066] In this embodiment of the invention, the data structure of the above dynamic multi-branch tree linked list can be used to map the network structure of multi-level redundant deployment and hierarchical disaster recovery design of network TV programs. This enables smart TV terminals, such as smart set-top boxes or smart TVs, to be compatible with the network structure of the load and solves the problem of smart TV terminals quickly responding to faults and achieving disaster recovery in complex redundant network environments. Compared with traditional methods, the key advantage of the method in this application lies in the dynamism, historical memory capability and structured processing of its dynamic multi-branch tree linked list, which can ensure the smoothness and stability of TV program playback.
[0067] In this embodiment, when a record of a historical playback path corresponding to a base address exists in the dynamic multi-way tree linked list, meaning the dynamic multi-way tree linked list records the historical information of the target TV program, the root address node corresponding to the base address in the dynamic multi-way tree linked list is obtained. The root address node in the dynamic multi-way tree linked list is the base address of the mapped TV program. Then, the playback tree containing this root address node in the dynamic multi-way tree linked list is determined as the target playback tree, which is a network mapping the historical playback paths of the target TV program. Based on the hierarchical address relationship of the target branch path records in the target playback tree, the current playback path of the target TV program is established. The target playback tree is a tree structure, including multiple branch paths. These multiple branch paths map to multiple historical playback paths of the target TV program. The target branch path can be the branch path with the best playback performance mapped in the target playback tree, and the playback performance can be determined based on the state information of the address nodes at each level on the branch path.
[0068] In some embodiments, the dynamic multi-branch tree linked list also records the status information of each level of address nodes on each branch path of each playback tree. For example, this status information may include the availability and response speed of the content source or service entry address, as well as the reachability and latency of the server address. Based on this status information, the playback performance of the corresponding branch path can be determined, such as whether it is available, its latency, and its response speed.
[0069] In some embodiments, the playback method of this invention further includes: determining a target branch path based on the status information of each level of address nodes in each branch path of the target playback tree. For example, based on the status information of a URL node, such as the availability and response speed of the content source or service entry address, it can be determined whether the URL node is available and its response speed. As another example, based on the reachability of an IP node, it can be determined whether the server address is reachable. Thus, based on the status information of each address node, the optimal performance branch path is determined as the target branch path to ensure a better playback experience.
[0070] The dynamic multi-branch tree linked list in this invention stores the playback tree of historical TV programs. It can record the playback tree for each historical TV program or, based on requirements, the playback trees for certain historical TV programs. When a historical TV program is replayed or rewound, the dynamic multi-branch tree linked list can be directly searched to see if the playback tree for that historical TV program is stored. If it exists, an available branch path, i.e., a playback path, can be quickly located, improving the efficiency of selecting a playback path.
[0071] In some cases, television program playback may encounter problems, such as TCP connection failures or HTTP request timeouts. Current technologies rely on timeout retry mechanisms when the current playback path fails, resulting in a switching time of approximately 3-5 seconds and high fault detection latency.
[0072] However, in some embodiments of the present invention, when the current playback path of the target TV program fails, the fault address node corresponding to the fault point on the target branch path is determined. For example, the fault address node can be determined based on the recorded status information of the address node, and the target playback tree corresponding to the target TV program in the dynamic multi-branch tree linked list is retrieved. A backup address node that can replace the fault address node is found in the target playback tree. Based on the hierarchical address relationship of the branch path where the backup address node is located, a new playback path for the target TV program is established. This enables rapid path switching in the event of a fault, greatly shortens the fault switching time, and reduces the latency of fault switching.
[0073] Furthermore, in some embodiments, when the faulty address node is a server node in the target playback tree, the server node in the target playback tree that belongs to the same content source or service entry address node as the faulty address node is searched. That is, if there is still a backup server node under the URL path, the server node under the same URL path is used as the backup address node and replaces the faulty address node. That is, the current node pointer is updated to the backup server node to complete the fault switch.
[0074] When multiple server nodes exist under the same URL path that can replace the faulty address node, the highest priority server node can be selected as the backup address node. That is, the backup address node can be the highest priority server node in the target playback tree that belongs to the same content source or service entry address node as the faulty address node. The highest priority can be determined based on the status information of the server nodes recorded in the target playback tree, such as the fastest response time or the lowest latency.
[0075] In other embodiments, when the faulty address node is a content source or service entry address node in the target playback tree—that is, when the highest-level address node on the playback path fails—the playback path becomes unusable. An available content source or service entry address node, other than the one handling the faulty content source or service entry address node, is then searched within the target playback tree to serve as a backup address node. In other words, fault switching can also be achieved by using another historically successful playback path in the target playback tree to establish the current playback path.
[0076] As an example, such as Figure 2 As shown, a backup address node that can be used to replace a failed node can include other IP address nodes under the same URL, or other historically successful URL paths.
[0077] Specifically, such as Figure 2As shown, when a node failure is detected, the status of the failed address node is marked, and a replacement address node is found. If other IP address nodes exist under the same URL, the system can switch to the highest priority IP address node under that URL path and update the pointer of the current address node to the new IP address node, thereby completing a fast failure path switch.
[0078] Alternatively, if no other IP address node exists under the same URL, other URL paths can be used, that is, switch to other historically successful URL paths and update the pointer of the current node to the new address node, thereby completing a fast failure path switch.
[0079] After finding alternative nodes, if it is determined that there are no available backup address nodes, it is necessary to rebuild the playback tree corresponding to the target TV program, which also reflects the dynamic nature of the dynamic multi-branch tree linked list.
[0080] Furthermore, existing technologies for transmitting network television programs employ extensive resource management, meaning they can only be statically configured and cannot dynamically adapt to changes in network status. However, in this invention, considering that playback paths and network status change in real time, the dynamic multi-branch tree linked list is automatically updated in real time based on the actual playback status of the target television program. For example, it supports dynamically adding or deleting one or more address nodes in the playback tree corresponding to the television program in the dynamic multi-branch tree linked list. Specifically, for example, if a faulty node is encountered, the address node at the corresponding position in the playback tree is deleted; when a new path is discovered, the address nodes at each level of the corresponding playback path are added to the corresponding position in the playback tree. This allows for dynamic adaptation to the actual playback status of the television program, demonstrating the dynamism of the dynamic multi-branch tree linked list.
[0081] Furthermore, updating the dynamic multi-way tree linked list can include, but is not limited to: updating the status information of each level of the address nodes in the playback tree where the target TV program is located, i.e., updating the address node status in real time, such as the TCP / HTTP module feeding back the reachability and latency of the address nodes; and / or, when the number of connection failures of any address node exceeds a threshold, the status of that address node is marked as an unavailable node, for example, an IP node with 3 consecutive connection failures is marked as unavailable, which can automatically isolate faulty nodes; and / or, after constructing a new transport stream fragment address node, deleting the corresponding old transport stream fragment address node and the transport stream fragment address node that has already been played from the dynamic multi-way tree linked list, i.e., realizing the dynamic cleanup of TS nodes, for example, TS nodes that have finished playing are deleted as expired TS nodes. By dynamically updating the dynamic multi-way tree linked list, the timeliness and simplicity of the playback tree can be maintained.
[0082] In simple terms, the method of this invention is like equipping a smart TV terminal, such as a set-top box, with a smart navigation map and a historical traffic recorder. It can not only remember all the roads traveled, i.e., the historical playback paths, but also update the traffic conditions, i.e., the status information of each address node, in real time. When the current road is congested, i.e., the path or node fails, it can instantly find and switch to a known, unobstructed alternative route, i.e., a backup URL / IP node, from the map. This ensures the smoothness and high availability of IPTV playback, which is much faster and more reliable than the prior art of temporarily finding other paths when encountering playback failures.
[0083] In an embodiment, when there is no record of the historical playback path corresponding to the base address of the target TV program in the dynamic multi-way tree linked list, or when the current playback path of the target TV program fails and there is no backup address node, the method of this embodiment can establish a root address node corresponding to the target TV program in the dynamic multi-way tree linked list based on the base address of the target TV program; when the target TV program is played, the address nodes of each level of the target TV program are recorded according to the playback process of the target TV program, and the address nodes of each level of the target TV program are constructed into the tree structure of the root address node corresponding to the target TV program to form a playback tree that maps the historical playback path of the target TV program. The playback tree maps the historical playback path of the target TV program, that is, the playback tree is a tree linked list corresponding to a single TV program.
[0084] Specifically, in this embodiment, the IPTV playback stream can be processed through four main modules, such as... Figure 3 As shown, it includes the HLS (HTTP Live Streaming) module, the HTTP module, the TCP module, and the PNODE (Program Tree) module.
[0085] The HLS, HTTP, and TCP modules can perform protocol parsing, connection requests, and transmission processes during regular TV program playback to enable TV program playback. In this embodiment of the invention, the PNODE module can construct a playback tree for the corresponding TV program based on the addresses of each level of the TV program obtained from the processing of the above three modules. The playback trees of multiple TV programs form a dynamic multi-branch tree linked list. The PNODE module is configured with a dynamic multi-branch tree linked list processing module, which can play TV programs and perform fault switching based on the historical playback path of the TV program.
[0086] Specifically, the HLS module is used to parse the HLS protocol and initiate streaming requests. Normally, after requesting a program address using the HLS protocol, multiple 302 redirects occur, eventually leading to the M3U8 list of the TV program. After obtaining one stage of the m3u8 list, sometimes it may redirect to another m3u8 address, with the final m3u8 becoming the actual playlist. After parsing the playlist, the HLS module obtains the address of the TS slice, i.e., the transport stream fragment address. The transport stream fragment address may also undergo multiple redirects before obtaining the final TS data. In the playback method of this embodiment, a transport stream fragment address node is created for each requested TS slice address. This node carries attributes such as redirection and m3u8, and is added to the playback tree mapping the TV program playback path according to the order of the program list adjustments.
[0087] As an example, such as Figure 4 As shown, when a user opens a TV program, the set-top box APK sends an initial URL request (such as URL_1) to the origin server. The HLS module performs protocol parsing. Specifically, it receives 302 redirects, for example, from LTC (Live Traffic Controller) to RRS (Request Routing Server) and then to HMS (Headend Media Server), gradually obtaining the final m3u8 playlist, parsing the m3u8 list, and extracting the TS slice address (which may also involve another redirect). Note that 302 redirects and 200 responses are two completely different status codes in the HTTP protocol, representing different processing results of the request. Figure 5 The diagram in (1) shows the multi-level redirection process in the HLS protocol parsing process. From the initial m3u8 to the final m3u8, multiple levels of redirection are performed to finally obtain the TS slice address. Then, the URL node (including the redirection attribute) of each step is recorded in the dynamic multi-branch tree linked list to the playback tree of the corresponding TV program.
[0088] The HTTP module is used to parse the HTTP protocol, handle redirects, and generate status information for each level of the address in the HLS processing. Some addresses are followed by an RRS IP address for disaster recovery. Therefore, in this embodiment of the invention, after determining that an RRS IP address exists, a node is created for each RRS IP in the dynamic multi-branch tree linked list and recorded in the corresponding position of the playback tree, so that the node can be quickly retrieved and processed when using the playback tree of the TV program. Figure 5Figure (2) shows a schematic diagram of the relevant data states generated by the HTTP module corresponding to the HLS processing according to an embodiment of the present invention. These include the initial URL address state (STATE_base_URL), the first-level m3u8 list state (STATE_1m3u8), the second-level m3u8 list state (STATE_2m3u8), the HTML tag state (STATE_IFRAME), the TS slice state, and the audio / video state in the V5 version, etc. Here, STATE represents the corresponding... Figure 5 (1) The status of each level of data generated during the HLS protocol parsing process.
[0089] The TCP module is used to execute URL requests, establish connections, read data, handle protocol stack switching, and select IP addresses. This module ultimately obtains the IP addresses of each URL, and a URL may ultimately point to multiple IP addresses (either V4 or V6). Since the actual number of usable IP addresses on the network is unknown before an IP becomes unreachable, in this embodiment of the invention, all currently connectable IPs are created with corresponding IP address nodes in a dynamic multi-way tree linked list, their attributes are configured, and they are recorded as sub-nodes of the URL. For example... Figure 5 Figure (3) is a schematic diagram of a playback tree constructed by the TCP layer based on the address nodes of each level in HLS processing according to an embodiment of the present invention. It includes address nodes of each level from the root address node to each branch path. Each address node records its corresponding status information and is constructed to each transport stream fragment address according to the rules of HLS V5 (HTTP Live Streaming Protocol Version 5). The dashed lines in the figure can represent addition operations.
[0090] The PNODE module can dynamically build and maintain a playback tree representing the current program playback path based on the URL's function (i.e., the level or service it represents) and available IP nodes. That is, after a TV program has already played, the PNODE module can build a corresponding playback tree based on its historical playback paths. When the TV program is played again, such as during replay or rebroadcast, the current playback path can be quickly established using the historical playback paths in its playback tree. This avoids the need to probe complex signal transmission networks as during initial playback, greatly improving the efficiency of establishing TV program playback paths and reducing playback waiting time.
[0091] Furthermore, when playback encounters problems such as TCP connection failures or HTTP timeouts, the PNODE module can immediately perform rapid redirection and switching based on alternative paths recorded in the playback tree corresponding to the TV program, such as other IP nodes under the same URL, or other available URL paths in the history, without needing to re-probe the entire network, greatly reducing the latency of failover. Additionally, for replayed TV programs (i.e., those with historical records in the dynamic multi-way tree linked list), previously successful historical playback paths in the playback tree can be directly used or prioritized, significantly accelerating the connection process. Moreover, the address nodes at each level of the dynamic multi-way tree linked list record URL and IP status information such as availability and quality, providing a basis for intelligent playback path switching.
[0092] For example, when a user opens a new TV program, the smart set-top box first checks if the URL of that TV program already exists in the history of the dynamic multi-way tree linked list. If it does, it directly retrieves the root address node from its saved playback tree and quickly establishes the playback path using the historical information. If the dynamic multi-way tree linked list does not contain the historical record of that TV program, it creates a new root address node corresponding to that TV program in the dynamic multi-way tree linked list and begins to build its playback tree based on the actual playback process of that TV program.
[0093] When constructing the playback tree for a TV program, the parsed URL nodes and the IP nodes that are attempted to connect are dynamically added to the root address node of the TV program as address nodes at each level, according to the playback flow of the TV program, namely the processing of the HLS module -> HTTP module -> TCP module, in order to construct the playback tree.
[0094] In this dynamic multi-way tree linked list, each address node can be dynamically updated. Taking TS processing as an example, for common TS segments in streaming media, such as... Figure 5 In the STATE_TS node, the system will automatically delete the old, already played TS nodes when constructing new transport stream fragment address nodes, i.e., TS address nodes, to maintain the timeliness and simplicity of the playback tree.
[0095] Based on the description of the above embodiments, as Figure 6 As shown, the process of processing the playback tree of a single program in the online television program playback method of this embodiment may include:
[0096] S11. Determine whether there is a historical record of the target TV program in the dynamic multi-branch tree linked list, such as a record of the URL corresponding to the target TV program, such as the root address node. If so, proceed to step S12; otherwise, proceed to step S13.
[0097] S12, reuse the playback tree corresponding to the target TV program recorded in the dynamic multi-branch tree linked list and update the node status, then proceed to step S18.
[0098] S13, create a new playback tree corresponding to the target TV program.
[0099] S14, parse HLS to obtain the initial URL.
[0100] HLS (HTTP Live Streaming) is an HTTP-based streaming media transmission protocol widely used in live video streaming and video-on-demand services. Its core principles include: 1. Slicing mechanism: Dividing the video stream into multiple small segments (typically 2-10 seconds), generating TS files and M3U8 index files; 2. HTTP transmission: Distributing via the standard HTTP protocol, eliminating the need for a dedicated streaming media server; 3. Adaptive bitrate: Supporting multiple bitrate switching, the client dynamically selects the optimal quality based on network conditions. Its main components include: 1. M3U8 file: A playlist containing TS segment URLs and metadata; 2. TS file: The actual audio and video data segments; 3. Main playlist: Defining sub-playlists with different bitrates; 4. Media playlist: Containing the specific segment sequence.
[0101] S15, create the root address node based on the initial URL.
[0102] S16, resolve redirection / RRSIP to construct address nodes at each level.
[0103] S17, construct the branch paths of the root address node for each level of address node.
[0104] S18, Update the TV program playback tree.
[0105] In other words, if there is no historical playback path for the currently playing program in the dynamic multi-branch tree linked list, the successful playback path can be recorded after the target TV program is played, and the playback tree of the TV program can be constructed based on the successful playback path. When replaying or rewinding, the playback path can be constructed based on the historical playback path in the playback tree, thereby reducing the program playback waiting time.
[0106] In summary, the network television program playback method of this invention has several advantages: 1. It adopts a dynamic multi-branch tree network structure: mapping the multi-level redundant network of IPTV into a dynamic multi-branch tree linked list, i.e., a tree data structure, and supports dynamic addition and deletion of address nodes. 2. Fault switching is faster. The dynamic multi-branch tree linked list pre-records multiple alternative paths, including URL nodes and IP nodes. When a fault occurs, it can instantly switch to a known available address node, avoiding the time-consuming re-probing and connection establishment process. 3. It can realize intelligent path selection. The tree structure naturally reflects the network hierarchy and redundancy relationship. Combined with node status information, it can make better switching decisions (such as prioritizing low-latency IPs). 4. The use of historical records can accelerate the construction of replay paths. Saving the historical playback tree allows for the direct reuse of previously successful playback paths when watching or replaying the same program, significantly improving connection speed. 5. It features efficient resource management, dynamically adding and deleting nodes (such as removing faulty IP nodes, adding newly discovered IP nodes, and cleaning up outdated TS nodes), ensuring the data structure remains streamlined and effective. 6. It is compatible with complex networks; the tree structure design of this dynamic multi-branch tree linked list can well map and adapt to the complex network architecture of IPTV's multi-level redundancy and layered disaster recovery. 7. It allows for structured processing, mapping complex network connections and disaster recovery logic to operations on the tree data structure, making the code clearer and the logic easier to maintain.
[0107] Based on the above methods, the second aspect of this application proposes an electronic device. As some examples, the electronic device may include a system-on-a-chip, a control unit, or a chip module, etc., and no specific limitations are made here.
[0108] like Figure 7 As shown, the electronic device 10 includes a processor 101 and a memory 12.
[0109] The memory 12 is connected to the processor 101. The memory 12 stores a computer program that can be executed by the processor 101. When the computer program is executed, it implements the online television program playback method of the above embodiment.
[0110] According to the electronic device 10 of the present invention, by executing the above method, a dynamic multi-branch tree linked list is used to map the signal transmission network structure of the multi-level redundant deployment and hierarchical disaster recovery design of the network television. The dynamic multi-branch tree linked list records the historical playback paths actually requested by the television program. When the target television program starts the playback process, if there is a record of the historical playback path corresponding to the base address of the television program in the dynamic multi-branch tree linked list, it means that the target television program is a historical television program, that is, a television program that has been played. The historical program information corresponding to the target television program can be quickly queried in the dynamic multi-branch tree linked list based on the base address of the target television program, and then the current playback path can be constructed based on the historical program information, without having to start from scratch to explore the complex signal transmission network to determine the playback path. This saves the time of address detection and connection request, improves the efficiency of playback path establishment, and shortens the program playback waiting time.
[0111] A third aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the online television program playback method of the above embodiment.
[0112] A fourth aspect of the present invention also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the online television program playback method described in the above embodiment.
[0113] Furthermore, the logical instructions in the aforementioned memory 12 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0114] The memory 12, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 101 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 12, thereby implementing the online television program playback method in the above method embodiments.
[0115] The memory 12 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 12 may include high-speed random access memory and may also include non-volatile memory.
[0116] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned computer-readable storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.
[0117] A fifth aspect of the present invention also provides a chip that can be used to implement the network television program playback method of the above embodiments. The chip can be integrated.
[0118] In this embodiment, the chip may be, but is not limited to, a system-on-a-chip, such as a smart set-top box chip or a smart TV chip, etc., and no specific limitation is made here.
[0119] A sixth aspect of the present invention also proposes a network television terminal. In this embodiment, the network television terminal may include, but is not limited to, a smart set-top box, a smart television, etc.
[0120] like Figure 8 As shown, the network television terminal 100 includes the electronic device 10 of the above embodiment. Alternatively, the network television terminal 100 includes the chip of the above embodiment. Alternatively, the network television terminal 100 is used to implement the network television program playback method of the above embodiment.
[0121] According to the embodiment of the present invention, the network television terminal 100, by executing the above method, uses a dynamic multi-branch tree linked list to map the signal transmission network structure of the network television's multi-level redundant deployment and hierarchical disaster recovery design. The dynamic multi-branch tree linked list records the historical playback paths actually requested by the television program. When the target television program starts the playback process, if there is a record of the historical playback path corresponding to the base address of the television program in the dynamic multi-branch tree linked list, it means that the target television program is a historical television program, that is, a television program that has already been played. The corresponding historical program information in the dynamic multi-branch tree linked list can be quickly queried based on the base address of the target television program, and then the current playback path can be constructed based on the historical program information, without having to start from scratch to explore the complex signal transmission network to determine the playback path. This saves the time of address detection and connection request, improves the efficiency of playback path establishment, and shortens the program playback waiting time.
[0122] In addition, it can quickly switch faulty nodes and dynamically update the playback tree corresponding to TV programs to adapt to constantly changing network conditions.
[0123] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.
[0124] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for playing online television programs, characterized in that, include: Upon receiving the playback start command for the target TV program, the base address of the target TV program is obtained; The dynamic multi-way tree linked list is queried based on the base address, wherein the dynamic multi-way tree linked list is constructed based on the historical playback path actually requested by at least one TV program, so as to map the signal transmission network of the network TV. When a record of the historical playback path corresponding to the base address exists in the dynamic multi-way tree linked list, the current playback path of the target TV program is established based on the historical playback path corresponding to the base address in the dynamic multi-way tree linked list. Play the target TV program according to the current playback path.
2. The method according to claim 1, characterized in that, The dynamic multi-branch tree linked list includes multiple playback trees that map multiple TV programs in the program playlist; Each of the playback trees includes multiple branch paths, and each branch path maps to the historical playback path of a corresponding TV program; Each of the forked paths represents the hierarchical address relationship from the root address node to the content source or service entry address node, the server address node, and the transport stream fragment address node when the TV program is played, wherein the root address node corresponds to the base address of the TV program.
3. The method according to claim 2, characterized in that, When a record of a historical playback path corresponding to the base address exists in the dynamic multi-way tree linked list, the current playback path of the target TV program is established based on the historical playback path corresponding to the base address in the dynamic multi-way tree linked list, including: Obtain the root address node corresponding to the base address in the dynamic multi-way tree linked list; Determine the playback tree containing the root address node in the dynamic multi-way tree linked list, and use it as the target playback tree; Based on the hierarchical address relationship of the target branch path record in the target playback tree, the current playback path of the target TV program is established.
4. The method according to claim 3, characterized in that, The dynamic multi-branch tree linked list also records the status information of each level of address node on each branch path of each playback tree; The method further includes: determining the target branch path based on the status information of each level address node of each branch path in the target playback tree.
5. The method according to claim 4, characterized in that, The status information includes the availability and response speed of the content source or service entry address, as well as the reachability and latency of the server address.
6. The method according to claim 3, characterized in that, The method further includes: When the current playback path of the target TV program fails, determine the fault address node of the corresponding fault point on the target branch path; Locate the alternative address node in the target playback tree to replace the faulty address node; Based on the hierarchical address relationship of the fork path where the backup address node is located, a new playback path for the target TV program is established.
7. The method according to claim 6, characterized in that, Locate the backup address node in the target playback tree to replace the faulty address node, including: When the fault address node is a server node in the target playback tree, search for server nodes in the target playback tree that belong to the same content source or service entry address node as the fault address node. The backup address node is the highest priority server node in the target playback tree that belongs to the same content source or service entry address node as the faulty address node.
8. The method according to claim 6, characterized in that, Locate the backup address node in the target playback tree to replace the faulty address node, including: When the faulty address node is a content source or service entry address node in the target playback tree, find an available content source or service entry address node in the target playback tree other than the faulty content source or service entry address node, and use it as the backup address node.
9. The method according to claim 4, characterized in that, The method further includes: The dynamic multi-branch tree linked list is updated based on the actual playback status of the target TV program.
10. The method according to claim 9, characterized in that, Updating the dynamic multi-way tree linked list based on the actual playback status of the target TV program includes at least one of the following: Update the status information of each level of the address node in the playback tree where the target TV program is located; When the number of connection failures at any address node exceeds a threshold, the address node is marked as an unavailable node. After constructing a new transport stream fragment address node, delete the corresponding old transport stream fragment address node and the transport stream fragment address node that has already been played from the dynamic multi-branch tree linked list.
11. The method according to claim 1, characterized in that, The method further includes: When there is no record of the historical playback path corresponding to the base address of the target TV program in the dynamic multi-way tree linked list, or when the current playback path of the target TV program fails and there is no backup address node, a root address node corresponding to the target TV program is established in the dynamic multi-way tree linked list based on the base address of the target TV program. When the target TV program is played, the address nodes of each level of the target TV program are recorded according to the playback flow of the target TV program, and the address nodes of each level of the target TV program are constructed into a tree structure of the root address node corresponding to the target TV program to form a playback tree that maps the historical playback path of the target TV program.
12. An electronic device, characterized in that, include: processor; Memory connected to the processor; The memory stores a computer program that can be executed by the processor, and when the computer program is executed, it implements the method for playing network television programs as described in any one of claims 1-11.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for playing online television programs as described in any one of claims 1-11.
14. A computer program product, characterized in that, The computer program product includes a computer program stored on a computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method for playing a network television program as described in any one of claims 1-11.
15. A chip, characterized in that, The chip includes a program tree module, which is a processing module configured with a dynamic multi-branch tree linked list. The processing module is used to implement the online television program playback method according to any one of claims 1-11.
16. A network television terminal, characterized in that, The network television terminal includes the electronic device of claim 12, or the network television terminal includes the chip of claim 15.
Citation Information
Patent Citations
Method and device used for playing network TV program
CN105357551A
System testing method and device, equipment and storage medium
CN113886263A