Television communication method based on Internet of Things, terminal equipment and storage medium
By identifying video frames and slicing them into framed segments, encapsulating pixel parameters and numbering sets into data packets, and the TV confirms that the equivalent pixels are equal, the problem of lag caused by packet loss in video transmission is solved, and efficient video transmission and display is achieved.
Patent Information
- Application Number
- CN202510806384.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-17
AI Technical Summary
In the prior art, due to full data transmission when video is transmitted to a television, the probability of packet loss during network fluctuations is high, resulting in frequent frame drops and stuttering of video, affecting user experience.
By identifying the number of video frames and numbering, identifying equivalent pixels, slice the video frame into frame segments, encapsulate pixel parameters and numbering into data packets, the TV displays video frames based on the data packet, and confirms the equivalent pixels through the back pass mark to reduce the transmission of pixel parameters of subsequent video frames.
Significantly reduce the amount of data transmission, reduce the amount of loss, ensure the video display effect, and maintain smooth playback especially when the packet loss rate is high.
Smart Images

Figure CN120602693A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method, terminal device, and storage medium for television communication based on the Internet of Things. Background Art
[0002] Currently, most smart TVs support Wi-Fi screen casting, which allows video content on tablets and other terminal devices to be wirelessly transmitted to the TV for playback, thus achieving better video playback effects. The current method for terminals to transmit videos to TVs is to slice each video frame, encapsulate the information parameters of each frame fragment into a data packet, and then send the data packet to the TV, so that the TV displays the video according to the content of the data packet. This method uses full data transmission throughout the entire video transmission process (that is, all pixel data of each video frame is transmitted). The amount of data transmitted is large. In the case of network fluctuations, the probability of data packet loss will also increase, which will cause frequent frame drops and freezes in the video, affecting the user's viewing experience. Summary of the Invention
[0003] In view of this, the embodiments of the present application provide a method, terminal device and storage medium for communicating with a television based on the Internet of Things, which can solve the above technical problems.
[0004] A first aspect of an embodiment of the present application provides a method for communicating with a television based on the Internet of Things, the method comprising: S1: Identify the number of frames in the video and number each frame of the video; S2: For the first video frame, identify the pixel parameters of each pixel in the video frame, identify the equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames where the equivalent pixels are located into the same number set; S3: Slice the video frame into frame segments; S4: Encapsulate the pixel parameters and corresponding number sets of all pixels in each frame into a data packet, and assign a unique identifier to the data packet; S5: Send each data packet to the television, so that the television displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the television returns the identifier of the data packet after receiving the data packet; S6: For the next video frame, determine the area consisting of pixels recognized by the TV in the video frame based on the returned identifier, identify pixel parameters of each pixel in the remaining area, identify equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames containing the equivalent pixels into the same number set; S7: Slice the remaining area into frame segments, execute S4, and send each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and executes S6 to S7 until the TV finishes playing the video.
[0005] A second aspect of an embodiment of the present application provides a terminal device for sending a video to a television, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method for communicating with a television based on the Internet of Things; A third aspect of the embodiments of the present application provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor executes the steps of the method for communicating with a television based on the Internet of Things; Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: the method provided by the present invention includes identifying the number of frames of a video and numbering each frame of the video; for the first video frame, identifying the pixel parameters of each pixel in the video frame, identifying the equivalent pixel of the pixel in subsequent video frames, and summarizing the numbers of the video frames where the equivalent pixels are located into the same number set; slicing the video frame into frame segments; encapsulating the pixel parameters of all pixels in each frame segment and the corresponding number set into a data packet, and assigning a unique identifier to the data packet; sending each data packet to a TV set, so that the TV set displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the TV set returns the identifier of the data packet after receiving the data packet; for the next video frame, determining the area composed of pixels confirmed by the TV set in the video frame according to the returned identifier, identifying the pixel parameters of each pixel in the remaining area, and identifying the equivalent pixel of the pixel in subsequent video frames. , summarizing the numbers of the video frames where the equivalent pixels are located into the same number set; slicing the remaining area into frame segments, encapsulating the pixel parameters and corresponding number sets of all pixels in each frame segment into a data packet, and assigning a unique identifier to the data packet, sending each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and repeating the above steps until the TV finishes playing the video; in the present application, by identifying equivalent pixels, when the TV receives the data packet, it can not only obtain the display parameters of each pixel of the currently transmitted video frame, but also confirm the display parameters of the equivalent pixels of the subsequent video frames, so that the terminal device does not need to transmit the full pixel parameters when transmitting the subsequent video frames, which can significantly reduce the amount of data transmission, and can reduce the amount of data loss when the packet loss rate is the same, thereby ensuring the video display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0007] Figure 1 This is a schematic diagram of the implementation process of the method for communicating with a television based on the Internet of Things provided in an embodiment of the present application; Figure 2 This is a schematic diagram of an implementation environment of a method for communicating with a television based on the Internet of Things provided in an embodiment of the present application; Figure 3 This is a virtual frame diagram of a method for communicating with a television based on the Internet of Things provided in an embodiment of the present application; Figure 4 This is a schematic diagram of pixel parameters of the method for communicating with a television based on the Internet of Things provided in an embodiment of the present application; Figure 5 It is a schematic diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0008] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0009] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0010] Figure 1 The method for communicating with a television based on the Internet of Things provided in the first embodiment of the present application is shown. The method for communicating with a television based on the Internet of Things includes: S1: Identify the number of frames in the video and number each frame of the video; S2: For the first video frame, identify the pixel parameters of each pixel in the video frame, identify the equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames where the equivalent pixels are located into the same number set; S3: Slice the video frame into frame segments; S4: Encapsulate the pixel parameters and corresponding number sets of all pixels in each frame into a data packet, and assign a unique identifier to the data packet; S5: Send each data packet to the television, so that the television displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the television returns the identifier of the data packet after receiving the data packet; S6: For the next video frame, determine the area consisting of pixels recognized by the TV in the video frame based on the returned identifier, identify pixel parameters of each pixel in the remaining area, identify equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames containing the equivalent pixels into the same number set; S7: Slice the remaining area into frame segments, execute S4, and send each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and executes S6 to S7 until the TV finishes playing the video.
[0011] In this embodiment, the method is executed in a terminal device, which may be a mobile phone, a computer, a tablet computer, etc. The terminal device can wirelessly communicate with a TV via WiFi, thereby being able to transmit video to the TV. In this embodiment, after the user selects the video to be sent on the terminal device, the terminal device can identify the total number of frames in the video and number each video frame in order of their sequence, for example, the first video frame is numbered 1, the second video frame is numbered 2, and so on; each pixel in the video frame corresponds to a number set (which can be an empty set), which includes the number of the video frame where the pixel is equivalent to the pixel; In this embodiment, each video frame has a frame coordinate system (the origin is at a corner point of the video frame, and the two coordinate axes are along two adjacent sides of the video frame that intersect at the corner point). The frame coordinate system of each video frame is consistent with the relative position of the corresponding video frame, thereby making the frame coordinates of corresponding pixels in different video frames consistent; In this embodiment, the subsequent video frame is the video frame after the current video frame to be transmitted; for the first video frame, the video frame can be sliced into 16*9 frame segments according to the shape of the video frame, and each frame segment includes a number of pixels; for the second and subsequent video frames, the video frame is first sliced into 16*9 frame segments, and then the area composed of pixels confirmed by the TV in each frame segment is removed, so as to obtain frame segments of the remaining area.
[0012] In this embodiment, the unique identifier can be a unique string of characters, such as '%768#', which is used to represent the identity of the data packet. If the terminal device receives any identifier, it indicates that the data packet corresponding to the identifier has been received by the TV and has not been lost; if the data packet is lost, the TV cannot receive and return the unique identifier, which also indicates that it has been lost.
[0013] In this embodiment, the TV displays a portion of the video frame based on the received pixel parameters, that is, the portion of the video frame composed of all pixels in all received data packets; the pixel parameters include the frame coordinates of the pixel, and the RGB color value. Two pixels are considered to be equivalent pixels only when the frame coordinates and the RGB color values are the same; in this application, by identifying equivalent pixels, when the TV receives a data packet, it can not only obtain the display parameters of each pixel of the currently transmitted video frame, but also confirm the display parameters of the equivalent pixels of the subsequent video frames, so that the terminal device does not need to transmit the full pixel parameters when transmitting the subsequent video frames, which can significantly reduce the data transmission volume and reduce the amount of data loss when the packet loss rate is the same, thereby ensuring the video display effect.
[0014] As a preferred embodiment, between S1 and S2, the following is also included: All frame numbers are sent to the TV, so that the TV generates a virtual frame for each video frame corresponding to the frame number, wherein each virtual frame includes a first parameter space consistent with the number of pixels in the video frame, and each first parameter space corresponds to a pixel in the video frame.
[0015] Determining the frame number of the video frame in which each frame segment is located as the target number of the data packet corresponding to the frame segment; and sending each data packet to a television set so that the television set displays the video frame according to the pixel parameters in the received data packet includes: Add padding instructions to each data packet; Each data packet is sent to the TV at the same time, so that when the TV receives any data packet, it receives the corresponding filling instruction, so that the TV finds the virtual frame corresponding to the video frame with the target number of the data packet, and fills the pixel parameters of each pixel in the data packet into the corresponding first parameter space in the virtual frame, so that the TV displays the picture corresponding to the video frame with the target number according to the filling status of the first parameter space in the virtual frame.
[0016] Identifying equivalent pixels to this pixel in subsequent video frames involves: Determine a pixel parameter of the pixel as a first parameter, and identify a frame coordinate of the pixel in the video frame to which it belongs; Identifying candidate pixels corresponding to the frame coordinates in each subsequent frame of video; For each candidate pixel, it is determined whether the pixel parameter of the candidate pixel is consistent with the first parameter. If so, the candidate pixel is an equivalent pixel of the pixel; otherwise, the candidate pixel is not an equivalent pixel of the pixel.
[0017] The TV is enabled to confirm equivalent pixels based on the received number set, that is, the filling instruction enables the TV to determine the subsequent video frame corresponding to each number in the number set, and determine the virtual frame corresponding to the subsequent video frame as the target virtual frame, and then determine the first parameter space corresponding to the frame coordinates of the pixel corresponding to the number set in the target virtual frame, and fill the pixel parameters of the pixel corresponding to the number set into the first parameter space.
[0018] In this embodiment, the television displays the picture corresponding to the video frame of the target number according to the filling status of the first parameter space in the virtual frame. That is, when the television displays each pixel of the video frame, it queries the pixel parameters in the first parameter space corresponding to the pixel on the corresponding virtual frame and displays the RGB color value in the pixel parameters.
[0019] In this embodiment, the TV confirms equivalent pixels, that is, fills in pixel parameters on the virtual frame corresponding to the subsequent video frame, so that the terminal device does not need to transmit these filled pixel parameters during the subsequent transmission of the video frame, thereby reducing the amount of data during the video frame transmission to reduce the loss of pixel parameters due to packet loss.
[0020] As a preferred embodiment, the following steps are further included between S5 and S6: A pixel parameter bar is generated for each pixel corresponding to a frame coordinate in the video frame, wherein the pixel parameter bar is provided with second parameter spaces whose number is consistent with the number of video frames, and each second parameter space corresponds to the number of a video frame.
[0021] Before each data packet is sent, the data of the data packet is backed up to obtain the backup data of the data packet; based on the returned identifier, the area consisting of pixels recognized by the TV in the video frame is determined to include: For any returned identifier, retrieve the backup data of the data packet corresponding to the identifier; For each pixel in the backup data, the pixel is used as a target pixel, and all numbers in the number set corresponding to the target pixel are identified as first numbers; Retrieving a pixel parameter bar corresponding to a target pixel, identifying a second parameter space corresponding to each first number in the pixel parameter bar, and filling each second parameter space with a pixel parameter corresponding to the target pixel; Identify the number of the video frame as the target number; For each pixel in the video frame, the frame coordinates of the pixel are identified to retrieve the corresponding pixel parameter bar, and whether the second parameter space corresponding to the target number is filled in the pixel parameter bar is determined. If so, the pixel is confirmed by the TV set; otherwise, the pixel is not confirmed by the TV set; Identify the region in the video frame consisting of all pixels recognized by the TV set.
[0022] In this embodiment, if the terminal device receives the returned identifier, it indicates that the data packet corresponding to the identifier has been received by the TV set. Then, under the action of the fill instruction, the equivalent pixel corresponding to the data packet can be confirmed by the TV set. Therefore, when the terminal device receives any identifier, it can directly determine the equivalent pixel confirmed by the TV set. In this embodiment, the filling status of the second parameter space in the generated pixel parameter bar corresponding to a frame coordinate can directly represent the status of the equivalent pixel of the pixel corresponding to the frame coordinate being confirmed by the TV (if the second parameter space is filled, the corresponding equivalent pixel is confirmed); the pixel parameter bar only needs to be generated once (generated when the data packet corresponding to the first video frame is sent), and when the pixel parameter bar needs to be called subsequently, the previously generated pixel parameter bar can be directly called, and each time after the filling is completed on the pixel parameter bar, the filling trace is retained so that it can always show the confirmation status of the equivalent pixel of the corresponding pixel.
[0023] In this embodiment, for the video frames after the first video frame, a portion of the first parameter spaces in the corresponding virtual frame have been filled when the equivalent pixels were previously confirmed, and another portion of the first parameter spaces are filled according to the pixel parameters in the newly received data packet, thereby completing the overall filling of the virtual frame, so that the TV displays the picture corresponding to the video frame with the target number according to the filling status of the first parameter spaces in the virtual frame.
[0024] A terminal device provided in a second embodiment of the present application is configured to transmit a video to a television, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the processor executes the steps of the method for communicating with a television based on the Internet of Things, specifically including: S1: Identify the number of frames in the video and number each frame of the video; S2: For the first video frame, identify the pixel parameters of each pixel in the video frame, identify the equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames where the equivalent pixels are located into the same number set; S3: Slice the video frame into frame segments; S4: Encapsulate the pixel parameters and corresponding number sets of all pixels in each frame into a data packet, and assign a unique identifier to the data packet; S5: Send each data packet to the television, so that the television displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the television returns the identifier of the data packet after receiving the data packet; S6: For the next video frame, determine the area consisting of pixels recognized by the TV in the video frame based on the returned identifier, identify pixel parameters of each pixel in the remaining area, identify equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames containing the equivalent pixels into the same number set; S7: Slice the remaining area into frame segments, execute S4, and send each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and executes S6 to S7 until the TV finishes playing the video.
[0025] A storage medium provided in a third embodiment of the present application stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the method for communicating with a television based on the Internet of Things, specifically including: S1: Identify the number of frames in the video and number each frame of the video; S2: For the first video frame, identify the pixel parameters of each pixel in the video frame, identify the equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames where the equivalent pixels are located into the same number set; S3: Slice the video frame into frame segments; S4: Encapsulate the pixel parameters and corresponding number sets of all pixels in each frame into a data packet, and assign a unique identifier to the data packet; S5: Send each data packet to the television, so that the television displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the television returns the identifier of the data packet after receiving the data packet; S6: For the next video frame, determine the area consisting of pixels recognized by the TV in the video frame based on the returned identifier, identify pixel parameters of each pixel in the remaining area, identify equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames containing the equivalent pixels into the same number set; S7: Slice the remaining area into frame segments, execute S4, and send each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and executes S6 to S7 until the TV finishes playing the video.
[0026] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0027] It should be understood that when used in the present application specification, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0028] It should also be understood that the term “and / or” used in the present specification refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0029] As used in this specification, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]" depending on the context.
[0030] In addition, in the description of the present specification, the terms "first", "second", "third", etc. are only used to distinguish descriptions and should not be understood as indicating or implying relative importance. It should also be understood that although the terms "first", "second", etc. are used to describe various elements in some embodiments of the present application in the text, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first table can be named the second table, and similarly, the second table can be named the first table without departing from the scope of the various described embodiments. The first table and the second table are both tables, but they are not the same table.
[0031] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0032] The method for communicating with a television based on the Internet of Things provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
[0033] For example, the terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set-top box (STB), customer premise equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network.
[0034] As an example and not a limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are full-featured, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0035] Figure 5This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Figure 5 As shown, the terminal device of this embodiment includes: at least one processor ( Figure 5 Only one is shown), a memory, wherein the memory stores a computer program that can be run on the processor. When the processor executes the computer program, the steps in the above-mentioned embodiments of the method for communicating with a television based on the Internet of Things are implemented, such as Figure 1 Steps S1 to S7 are shown.
[0036] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 5 It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input and sending device, a network access device, a bus, etc.
[0037] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0038] In some embodiments, the memory may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk equipped on the terminal device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the memory may include both an internal storage unit of the terminal device and an external storage device. The memory is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory may also be used to temporarily store data that has been sent or is about to be sent.
[0039] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0040] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal device, the mobile terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0041] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0042] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0043] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0044] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0045] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for communicating with a television based on the Internet of Things, characterized in that: The method for communicating with a television based on the Internet of Things includes: S1: Identify the number of frames in the video and number each frame of the video; S2: For the first video frame, identify the pixel parameters of each pixel in the video frame, identify the equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames where the equivalent pixels are located into the same number set; S3: Slice the video frame into frame segments; S4: Encapsulate the pixel parameters and corresponding number sets of all pixels in each frame into a data packet, and assign a unique identifier to the data packet; S5: Send each data packet to the television, so that the television displays the video frame according to the pixel parameters in the received data packet, and confirms the equivalent pixels according to the received number set, wherein the television returns the identifier of the data packet after receiving the data packet; S6: For the next video frame, determine the area consisting of pixels recognized by the TV in the video frame based on the returned identifier, identify pixel parameters of each pixel in the remaining area, identify equivalent pixels of the pixel in subsequent video frames, and group the numbers of the video frames containing the equivalent pixels into the same number set; S7: Slice the remaining area into frame segments, execute S4, and send each data packet to the TV, so that the TV displays part of the picture of the video frame according to the received pixel parameters, and displays the remaining part of the picture of the video frame according to the pixel parameters corresponding to the previously confirmed equivalent pixels, and executes S6 to S7 until the TV finishes playing the video.
2. The method according to claim 1, characterized in that Between S1 and S2 also include: All frame numbers are sent to the TV, so that the TV generates a virtual frame for each video frame corresponding to the frame number, wherein each virtual frame includes a first parameter space consistent with the number of pixels in the video frame, and each first parameter space corresponds to a pixel in the video frame.
3. The method according to claim 2, characterized in that Determining the frame number of the video frame in which each frame segment is located as the target number of the data packet corresponding to the frame segment; and sending each data packet to a television set so that the television set displays the video frame according to the pixel parameters in the received data packet includes: Add padding instructions to each data packet; Each data packet is sent to the TV at the same time, so that when the TV receives any data packet, it receives the corresponding filling instruction, so that the TV finds the virtual frame corresponding to the video frame with the target number of the data packet, and fills the pixel parameters of each pixel in the data packet into the corresponding first parameter space in the virtual frame, so that the TV displays the picture corresponding to the video frame with the target number according to the filling status of the first parameter space in the virtual frame.
4. The method according to claim 3, characterized in that Identifying equivalent pixels to this pixel in subsequent video frames involves: Determine a pixel parameter of the pixel as a first parameter, and identify a frame coordinate of the pixel in the video frame to which it belongs; Identifying candidate pixels corresponding to the frame coordinates in each subsequent frame of video; For each candidate pixel, it is determined whether the pixel parameter of the candidate pixel is consistent with the first parameter. If so, the candidate pixel is an equivalent pixel of the pixel; otherwise, the candidate pixel is not an equivalent pixel of the pixel.
5. The method according to claim 4, characterized in that The TV is enabled to confirm equivalent pixels based on the received number set, that is, the filling instruction enables the TV to determine the subsequent video frame corresponding to each number in the number set, and determine the virtual frame corresponding to the subsequent video frame as the target virtual frame, and then determine the first parameter space corresponding to the frame coordinates of the pixel corresponding to the number set in the target virtual frame, and fill the pixel parameters of the pixel corresponding to the number set into the first parameter space.
6. The method according to claim 5, characterized in that Between S5 and S6 also include: A pixel parameter bar is generated for each pixel corresponding to a frame coordinate in the video frame, wherein the pixel parameter bar is provided with second parameter spaces whose number is consistent with the number of video frames, and each second parameter space corresponds to the number of a video frame.
7. The method according to claim 6, characterized in that Before each data packet is sent, the data of the data packet is backed up to obtain the backup data of the data packet; based on the returned identifier, the area consisting of pixels recognized by the TV in the video frame is determined to include: For any returned identifier, retrieve the backup data of the data packet corresponding to the identifier; For each pixel in the backup data, the pixel is used as a target pixel, and all numbers in the number set corresponding to the target pixel are identified as first numbers; Retrieving a pixel parameter bar corresponding to a target pixel, identifying a second parameter space corresponding to each first number in the pixel parameter bar, and filling each second parameter space with a pixel parameter corresponding to the target pixel; Identify the number of the video frame as the target number; For each pixel in the video frame, the frame coordinates of the pixel are identified to retrieve the corresponding pixel parameter bar, and whether the second parameter space corresponding to the target number is filled in the pixel parameter bar is determined. If so, the pixel is confirmed by the TV set; otherwise, the pixel is not confirmed by the TV set; Identify the region in the video frame consisting of all pixels recognized by the TV set.
8. A terminal device, characterized in that: Used to send video to a television, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method for communicating with a television based on the Internet of Things according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for communicating with a television based on the Internet of Things according to any one of claims 1 to 7.
Citation Information
Patent Citations
Video decoding and encoding method and device, medium and electronic equipment
CN111901598A
Video transmission method and device, video playing method and device, computer equipment and storage medium
CN112714338A
Screen projection method, projector and terminal device
CN113992951A
Video transmission method and device, terminal and storage medium
CN115942002A
Image transmission method, device and equipment, computer storage medium and program product
CN119383345A