Media channel switching method, device and electronic equipment

By decoding the TS slice file and first frame picture of the target channel on the server side, fast media channel switching is achieved, solving the problem of low channel switching efficiency in the prior art and improving the user experience.

CN115883916BActive Publication Date: 2025-03-07北京数码视讯软件技术发展有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211586007.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2025-03-07
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

The existing media channel switching methods are inefficient, resulting in poor user experience.

Method used

By receiving the channel switching information sent by the terminal on the server side, the TS slice file and the first frame picture of the target channel are determined, and the first frame picture is decoded to achieve fast channel switching.

Benefits of technology

Improve the speed of channel switching and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883916B_ABST
    Figure CN115883916B_ABST
Patent Text Reader

Abstract

The present invention provides a media channel switching method, device and electronic device, which are applied to a server, and the method includes: if channel switching information sent by a terminal is received, the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file are determined according to the channel switching information; the first frame image is obtained by decoding the key frame in the target channel, and the resolution of the first frame image is the same as the resolution of the TS slice file; according to the TS slice file and the first frame image, switch to the target channel corresponding to the channel switching information. The method obtains the TS slice file of the target channel and the first frame image corresponding to the TS slice file by decoding, thereby presenting the first frame image, completing channel switching, and improving the rate of channel switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet multimedia technology, and in particular to a media channel switching method, device and electronic equipment. Background Art

[0002] HLS (Http Live Streaming) is a dynamic bitrate adaptive streaming technology proposed by Apple Inc., mainly used for streaming audio and video services. The adaptive streaming technology includes an m3u8 type index file, TS media segment files, and key encryption string files. HLS streaming technology has the advantages of low requirements for streaming servers and terminals, and can ensure smooth playback under different networks through multiple bitrates. It has been widely used in OTT video services.

[0003] The existing channel switching method includes multiple client-server interactions from the triggering of the channel switching action to the completion of the channel switching function. Each interaction process is completed sequentially, resulting in the channel switching taking too long and a poor channel switching experience.

[0004] In general, the existing media channel switching methods still have the problem of low switching efficiency, resulting in poor user experience. Summary of the invention

[0005] The object of the present invention is to provide a media program switching method, device and electronic device to improve the efficiency of program switching, thereby improving user experience.

[0006] In a first aspect, an embodiment of the present invention provides a media channel switching method, which is applied to a server and includes: if channel switching information sent by a terminal is received, determining, based on the channel switching information, a TS slice file of a target channel corresponding to the channel switching information and a first frame image corresponding to the TS slice file; the first frame image is obtained by decoding a key frame in the target channel, and a resolution of the first frame image is the same as a resolution of the TS slice file; and switching to the target channel corresponding to the channel switching information based on the TS slice file and the first frame image.

[0007] In combination with the first aspect, an embodiment of the present invention provides a first possible implementation scheme of the first aspect, wherein the above-mentioned channel switching information includes: a channel switching request based on the HLS protocol and the above-mentioned first frame image request based on the HTTP protocol; according to the above-mentioned channel switching information, the step of determining the TS slice file of the target channel corresponding to the above-mentioned channel switching information and the first frame image corresponding to the above-mentioned TS slice file includes: according to the above-mentioned channel switching request and the above-mentioned first frame image request, determining the TS slice file of the target channel corresponding to the above-mentioned channel switching information and the first frame image corresponding to the above-mentioned TS slice file.

[0008] In combination with the first aspect, an embodiment of the present invention provides a second possible implementation method of the first aspect, wherein, before the step of receiving the channel switching information sent by the terminal, the method includes: obtaining a video stream from a channel source station; the video stream includes the target channel; slicing the video stream based on a preset slicing duration to obtain a TS slicing file; and generating a first frame image corresponding to the TS slicing file.

[0009] In combination with the first aspect, an embodiment of the present invention provides a third possible implementation method of the first aspect, wherein, based on the above-mentioned channel switching information, the step of determining the TS slice file of the target channel corresponding to the above-mentioned channel switching information and the first frame picture corresponding to the above-mentioned TS slice file includes: based on the above-mentioned channel switching information, searching from the memory for the target first frame picture corresponding to the TS slice file corresponding to the above-mentioned channel switching information; if the above-mentioned target first frame picture is not found, searching from the memory for the target TS slice file corresponding to the above-mentioned channel switching information; if the above-mentioned target TS slice file is found, generating the target first frame picture corresponding to the above-mentioned target TS slice file based on the above-mentioned target TS slice file.

[0010] In combination with the third possible implementation of the first aspect, an embodiment of the present invention provides a fourth possible implementation of the first aspect, wherein, after the step of switching to the target channel corresponding to the above-mentioned channel switching information, the above-mentioned method also includes: if a sub-m3u8 request for the above-mentioned target channel sent by the above-mentioned terminal is received, a sub-m3u8 file is sent to the above-mentioned terminal according to the above-mentioned sub-m3u8 request; wherein, when the above-mentioned terminal receives the main m3u8 of the above-mentioned target channel, the above-mentioned terminal sends the above-mentioned sub-m3u8 request to the above-mentioned server; if a request for obtaining the first TS slice file in the above-mentioned TS slice file is received from the above-mentioned terminal, the above-mentioned first TS slice file is sent to the above-mentioned terminal according to the above-mentioned acquisition request, so that the above-mentioned terminal decodes the above-mentioned first TS slice file and presents the decoded content; wherein, when the above-mentioned terminal receives the above-mentioned sub-m3u8 file, it parses the above-mentioned sub-m3u8 file and sends the above-mentioned acquisition request to the above-mentioned server.

[0011] In combination with the fourth possible implementation of the first aspect, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the step of the terminal sending the sub-m3u8 request to the server when receiving the main m3u8 of the target channel includes: when the terminal receives the main m3u8 of the target channel, the terminal sends the sub-m3u8 request of the target channel to the server through the content distribution network of the peripheral device.

[0012] In combination with the fifth possible implementation of the first aspect, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the step of sending the sub-m3u8 file to the above-mentioned terminal according to the above-mentioned sub-m3u8 request includes: sending the sub-m3u8 file to the above-mentioned terminal through the above-mentioned content distribution network according to the above-mentioned sub-m3u8 request.

[0013] In the second aspect, an embodiment of the present invention provides a media channel switching device, which is applied to a server and includes: a first frame picture confirmation module, which is used to determine the TS slice file of the target channel corresponding to the channel switching information and the first frame picture corresponding to the TS slice file according to the channel switching information if the channel switching information sent by the terminal is received; the first frame picture is obtained by decoding the key frame in the target channel, and the resolution of the first frame picture is the same as the resolution of the TS slice file; a channel switching module, which is used to switch to the target channel corresponding to the channel switching information according to the TS slice file and the first frame picture.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, wherein the electronic device includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the media channel switching method of any one of the first aspect to the sixth possible implementation manner of the first aspect.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes a media channel switching method as described in any one of the first aspect to the sixth possible implementation of the first aspect.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] The embodiment of the present invention provides a media channel switching method, device and electronic device, which are applied to a server, and the method includes: if channel switching information sent by a terminal is received, the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file are determined according to the channel switching information; the first frame image is obtained by decoding the key frame in the target channel, and the resolution of the first frame image is the same as the resolution of the TS slice file; according to the TS slice file and the first frame image, switch to the target channel corresponding to the channel switching information. The method obtains the TS slice file of the target channel and the first frame image corresponding to the TS slice file by decoding, thereby presenting the first frame image, completing the channel switching, and improving the channel switching rate.

[0018] Other features and advantages disclosed in this embodiment will be described in the subsequent description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology of the present disclosure.

[0019] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram of a flow chart of a media channel switching method provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a flow chart of another media channel switching method provided by an embodiment of the present invention;

[0023] Figure 3 A structural schematic diagram of a media channel switching device is provided for an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0025] Icons: 31 - first frame picture confirmation module; 32 - channel switching module; 41 - memory; 42 - processor; 43 - bus; 44 - communication interface. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] At present, the existing channel switching method includes multiple client and server interactions from the triggering of the channel switching action to the completion of the channel switching function. Each interaction process is completed sequentially, resulting in the channel switching taking too long and a poor channel switching experience.

[0028] Based on this, an embodiment of the present invention provides a media channel switching method, device and electronic device, which can alleviate the above technical problems and improve the channel switching rate. To facilitate understanding of the embodiment of the present invention, a media channel switching method disclosed in the embodiment of the present invention is first introduced in detail.

[0029] Example 1

[0030] Figure 1 A flow chart of a media channel switching method provided by an embodiment of the present invention is shown. The method is applied to a server. Figure 1 As can be seen, the method comprises the following steps:

[0031] Step S101: If channel switching information sent by the terminal is received, determine the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file according to the channel switching information; the first frame image is obtained by decoding the key frame in the target channel, and the resolution of the first frame image is the same as the resolution of the TS slice file.

[0032] In this embodiment, the channel switching information includes a channel switching request and a first frame image acquisition request. Further, the format of the first frame image may be a JPG format.

[0033] Step S102: according to the TS slice file and the first frame image, switch to the target channel corresponding to the channel switching information.

[0034] In actual operation, when switching to the target channel corresponding to the channel switching information, the terminal obtains the TS slice file and the first frame image, and presents the first frame image, thereby realizing fast channel switching.

[0035] An embodiment of the present invention provides a media channel switching method, which is applied to a server. The method includes: if channel switching information sent by a terminal is received, the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file are determined according to the channel switching information; the first frame image is obtained by decoding the key frame in the target channel, and the resolution of the first frame image is the same as the resolution of the TS slice file; according to the TS slice file and the first frame image, switch to the target channel corresponding to the channel switching information. The method obtains the TS slice file of the target channel and the first frame image corresponding to the TS slice file by decoding, thereby presenting the first frame image, completing channel switching, and improving the rate of channel switching.

[0036] Example 2

[0037] exist Figure 1 Based on this, this embodiment also provides another media channel switching method. Figure 2 A flowchart of another media channel switching method provided by an embodiment of the present invention. The channel switching information includes: a channel switching request based on the HLS protocol and the first frame image request based on the HTTP protocol.

[0038] Depend on Figure 2 As can be seen, the method comprises the following steps:

[0039] Step S201: If a channel switching request based on the HLS protocol and the first frame image request based on the HTTP protocol are received from the terminal, the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file are determined according to the channel switching request and the first frame image request; the first frame image is obtained by decoding the key frame in the target channel, and the resolution of the first frame image is the same as the resolution of the TS slice file.

[0040] In one embodiment, before step S201, the method includes the following steps A1 to A3:

[0041] Step A1: Obtain a video stream from a channel source station; the video stream includes the target channel.

[0042] Step A2: Slice the video stream based on a preset slice duration to obtain a TS slice file.

[0043] Step A3: Generate the first frame image corresponding to the above TS slice file.

[0044] Here, the above steps A1 to A3 are generated at the central layer of the content distribution network, occupying more storage resources.

[0045] In another embodiment, according to the channel switching information, determining the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file includes the following steps B1 to B3:

[0046] Step B1: According to the channel switching information, the target first frame image corresponding to the TS slice file corresponding to the channel switching information is searched from the memory.

[0047] Step B2: If the target first frame image is not found, search the memory for the target TS slice file corresponding to the channel switching information.

[0048] Here, if the above-mentioned target first frame image is found, the following step S202 is directly executed.

[0049] Step B3: If the target TS slice file is found, generate the target first frame image corresponding to the target TS slice file according to the target TS slice file.

[0050] Here, the above steps B1 to B3 are generated at the edge layer of the content distribution network, occupying fewer storage resources, and are mainly aimed at application scenarios such as live broadcast and on-demand broadcast.

[0051] Step S202: according to the TS slice file and the first frame image, switch to the target channel corresponding to the channel switching information.

[0052] After step S202, the method further includes the following steps C1-C2:

[0053] Step C1: if a sub-m3u8 request of the target channel sent by the terminal is received, a sub-m3u8 file is sent to the terminal according to the sub-m3u8 request; wherein the terminal sends the sub-m3u8 request to the server when receiving the main m3u8 of the target channel.

[0054] Here, the step of the terminal sending the sub-m3u8 request to the server when receiving the main m3u8 of the target channel includes: when the terminal receives the main m3u8 of the target channel, the terminal sends the sub-m3u8 request of the target channel to the server through the content distribution network of the peripheral device.

[0055] Furthermore, the step of sending the sub-m3u8 file to the terminal according to the sub-m3u8 request includes: sending the sub-M3U8 file to the terminal through the content distribution network according to the sub-m3u8 request.

[0056] Step C2: If a request for obtaining the first TS slice file in the TS slice file sent by the terminal is received, the first TS slice file is sent to the terminal according to the request for obtaining, so that the terminal decodes the first TS slice file and presents the decoded content; wherein, when the terminal receives the sub-m3u8 file, it parses the sub-m3u8 file and sends the acquisition request to the server.

[0057] In this embodiment, the channel switching duration using this method is the time taken by the terminal from the time the channel switching information is initiated to the time the first frame of the image is presented. The terminal video decoding process only affects the picture smoothing time after the channel switching. Therefore, the channel switching rate is faster and the channel switching effect is better.

[0058] An embodiment of the present invention provides a media channel switching method, which is applied to a server, and the method includes: if a channel switching request based on the HLS protocol and the first frame picture request based on the HTTP protocol are received from a terminal, the TS slice file of the target channel corresponding to the channel switching information and the first frame picture corresponding to the TS slice file are determined according to the channel switching request and the first frame picture request; the first frame picture is obtained by decoding the key frame in the target channel, and the resolution of the first frame picture is the same as the resolution of the TS slice file; according to the TS slice file and the first frame picture, switch to the target channel corresponding to the channel switching information. The method quickly finds the TS slice file of the target channel and the first frame picture corresponding to the TS slice file through the channel switching request based on the HLS protocol and the first frame picture request based on the HTTP protocol, thereby further improving the rate of channel switching.

[0059] Example 3

[0060] The embodiment of the present invention further provides a media channel switching device. The media channel switching device is applied to a server. Figure 3 The present invention provides a schematic structural diagram of a media channel switching device according to an embodiment of the present invention, including:

[0061] The first frame picture confirmation module 31 is used to determine the TS slice file of the target channel corresponding to the channel switching information and the first frame picture corresponding to the TS slice file according to the channel switching information if the channel switching information sent by the terminal is received; the first frame picture is obtained by decoding the key frame in the target channel, and the resolution of the first frame picture is the same as the resolution of the TS slice file.

[0062] The channel switching module 32 is used to switch to a target channel corresponding to the channel switching information according to the TS slice file and the first frame image.

[0063] The first frame picture confirmation module 31 and the channel switching module 32 are sequentially connected.

[0064] In one embodiment, the channel switching information includes: a channel switching request based on the HLS protocol and the first frame image request based on the HTTP protocol; the first frame image confirmation module 31 is also used to determine the TS slice file of the target channel corresponding to the channel switching information and the first frame image corresponding to the TS slice file according to the channel switching request and the first frame image request.

[0065] In one embodiment, the device further includes: a recording module connected to the first frame image confirmation module 31; the recording module is used to obtain a video stream from a channel source station; the video stream includes the target channel; the video stream is sliced ​​based on a preset slice duration to obtain a TS slice file; and a first frame image corresponding to the TS slice file is generated.

[0066] In one embodiment, the first frame picture confirmation module 31 is also used to search for a target first frame picture corresponding to the TS slice file corresponding to the channel switching information from the memory according to the channel switching information; if the target first frame picture is not found, search for a target TS slice file corresponding to the channel switching information from the memory; if the target TS slice file is found, generate a target first frame picture corresponding to the target TS slice file according to the target TS slice file.

[0067] In one embodiment, the device further includes: a video decoding module connected to the channel switching module 32; the video decoding module is used to send a sub-m3u8 file to the terminal according to the sub-m3u8 request if a sub-m3u8 request of the target channel sent by the terminal is received; wherein, when the terminal receives the main m3u8 of the target channel, the terminal sends the sub-m3u8 request to the server; if a request for obtaining the first TS slice file in the TS slice file sent by the terminal is received, the first TS slice file is sent to the terminal according to the acquisition request, so that the terminal decodes the first TS slice file and presents the decoded content; wherein, when the terminal receives the sub-m3u8 file, it parses the sub-m3u8 file and sends the acquisition request to the server.

[0068] In one embodiment, the video decoding module is also used for the terminal to send a sub-m3u8 request of the target channel to the server through a content distribution network of an external device when the terminal receives the main m3u8 of the target channel.

[0069] In one implementation manner, the video decoding module is further configured to send the sub-m3u8 file to the terminal via the content distribution network according to the sub-m3u8 request.

[0070] The media channel switching device provided in the embodiment of the present invention has the same technical features as the media channel switching method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the above method embodiment, and will not be repeated here.

[0071] Example 4

[0072] This embodiment provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the media channel switching method.

[0073] This embodiment provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the media channel switching method are implemented.

[0074] See also Figure 4 A structural schematic diagram of an electronic device is shown, which includes: a memory 41 and a processor 42. The memory 41 stores a computer program that can be run on the processor 42. When the processor executes the computer program, the steps provided by the above-mentioned data media channel switching method are implemented.

[0075] like Figure 4 As shown, the device further includes: a bus 43 and a communication interface 44, a processor 42, a communication interface 44 and a memory 41 are connected via the bus 43; the processor 42 is used to execute executable modules stored in the memory 41, such as computer programs.

[0076] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0077] The bus 43 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0078] Among them, the memory 41 is used to store the program, and the processor 42 executes the program after receiving the execution instruction. The method performed by the media channel switching device disclosed in any embodiment of the present invention can be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 42. The above processor 42 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 42 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.

[0079] Furthermore, an embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 42, the machine-executable instructions prompt the processor 42 to implement the above-mentioned media channel switching method.

[0080] The electronic device and computer-readable storage medium provided by the embodiments of the present invention have the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0081] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0082] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

Claims

1. A media channel switching method, characterized in that: Applied to a server, the method comprises: If channel switching information sent by the terminal is received; the channel switching information includes: a channel switching request based on the HLS protocol and a first frame image request based on the HTTP protocol; According to the channel switching request and the first frame picture request, determine the TS slice file of the target channel corresponding to the channel switching information and the first frame picture corresponding to the TS slice file; the first frame picture is obtained by decoding the key frame in the target channel, and the resolution of the first frame picture is the same as the resolution of the TS slice file; According to the TS slice file and the first frame picture, switch to the target channel corresponding to the channel switching information.

2. The media channel switching method according to claim 1, characterized in that: Before the step of receiving the channel switching information sent by the terminal, the method includes: Acquire a video stream from a channel source station; the video stream includes the target channel; Slicing the video stream based on a preset slice duration to obtain a TS slice file; Generate the first frame image corresponding to the TS slice file.

3. The media channel switching method according to claim 1, characterized in that: The step of determining, according to the channel switching information, a TS slice file of a target channel corresponding to the channel switching information and a first frame picture corresponding to the TS slice file comprises: According to the channel switching information, searching the memory for a target first frame image corresponding to the TS slice file corresponding to the channel switching information; If the target first frame image is not found, searching the memory for the target TS slice file corresponding to the channel switching information; If the target TS slice file is found, the target first frame image corresponding to the target TS slice file is generated according to the target TS slice file.

4. The media channel switching method according to claim 3, characterized in that: After the step of switching to the target channel corresponding to the channel switching information, the method further includes: If a sub-m3u8 request of the target channel sent by the terminal is received, a sub-m3u8 file is sent to the terminal according to the sub-m3u8 request; wherein the terminal sends the sub-m3u8 request to the server when receiving the main m3u8 of the target channel; If a request for obtaining the first TS slice file in the TS slice file sent by the terminal is received, the first TS slice file is sent to the terminal according to the acquisition request, so that the terminal decodes the first TS slice file and presents the decoded content; wherein, when the terminal receives the sub-m3u8 file, it parses the sub-m3u8 file and sends the acquisition request to the server.

5. The media channel switching method according to claim 4, characterized in that: The step of sending the sub-m3u8 request to the server when the terminal receives the main m3u8 of the target channel includes: When receiving the main m3u8 of the target channel, the terminal sends a sub-m3u8 request of the target channel to the server through the content distribution network of the external device.

6. The media channel switching method according to claim 5, characterized in that: The step of sending the sub-m3u8 file to the terminal according to the sub-m3u8 request comprises: According to the sub-m3u8 request, the sub-m3u8 file is sent to the terminal through the content distribution network.

7. A media channel switching device, characterized in that: include: The first frame picture confirmation module is used to receive the channel switching information sent by the terminal; The channel switching information includes: a channel switching request based on the HLS protocol and a first frame image request based on the HTTP protocol; according to the channel switching request and the first frame image request, a TS slice file of a target channel corresponding to the channel switching information and a first frame image corresponding to the TS slice file are determined; the first frame image is obtained by decoding a key frame in the target channel, and a resolution of the first frame image is the same as a resolution of the TS slice file; A channel switching module is used to switch to a target channel corresponding to the channel switching information according to the TS slice file and the first frame image.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the media channel switching method described in any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the media channel switching method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Channel rapid switching method and system, terminal and server

    CN104284204A

  • Radio and television channel switching method and television broadcasting equipment

    CN107172469A