Television starting method and device

文档序号:73236 发布日期:2021-10-01 浏览:16次 中文

阅读说明:本技术 电视开机方法及装置 (Television starting method and device ) 是由 初德进 鞠伟明 吴汉勇 于 2020-03-31 设计创作,主要内容包括:本申请提供一种电视开机方法及装置,应用于电视机,该方法包括:电视机待机时,接收服务器发送的第一数据包,第一数据包包括包标识,包标识指示数据包为心跳包、或唤醒包;若根据包标识确定第一数据包为唤醒包,则控制电视机开机。用于实现在广域网中唤醒电视机,提高用户体验。(The application provides a television starting method and a device, which are applied to a television, and the method comprises the following steps: when the television is in standby, receiving a first data packet sent by a server, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or a wake-up packet; and if the first data packet is determined to be the awakening packet according to the packet identifier, controlling the television to start. The method and the device are used for waking up the television in the wide area network and improving user experience.)

1. A television starting method is applied to a television and comprises the following steps:

when the television is in standby, receiving a first data packet sent by the server, wherein the first data packet comprises a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or a wakeup packet;

and if the first data packet is determined to be the awakening packet according to the packet identifier, controlling the television to start.

2. The method according to claim 1, wherein the television comprises a WiFi module, the firmware program of the WiFi module comprises a preset lightweight protocol stack program, and the WiFi module has a general purpose input output GPIO port; if the first data packet is determined to be the wake-up packet according to the packet identifier, controlling the television to start, including:

analyzing the first data packet according to the lightweight protocol stack program to obtain the packet identifier;

if the first data packet is determined to be a wake-up packet according to the packet identifier, determining a position value of a GPIO port according to the packet identifier;

and controlling the television to be started according to the position value.

3. The method according to claim 1 or 2, wherein before receiving the first data packet sent by the server, the method further comprises:

sending a second data packet to the server, wherein the second data packet indicates that the television is connected with the server when in standby;

receiving a third data packet sent by the server, wherein the third data packet indicates that the server is connected with the television in a standby state;

and sending a fourth data packet to the server, wherein the fourth data packet indicates that the television is connected with the server when in standby.

4. The method of claim 3, wherein the third data packet has a predetermined format, and the third data packet comprises at least one of a packet length and a packet identifier; after receiving the third data packet sent by the server, the method further includes:

if the preset format is the first format, determining that the third data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

if the packet length in the third data packet is the first length, determining that the third data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

and if the packet identifier in the third data packet is the first identifier, determining that the third data packet is a heartbeat packet.

5. The method of claim 4, wherein before sending the second packet to the server, further comprising:

and sending registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

6. The method according to any one of claims 1 to 5, wherein after controlling the television to be turned on, the method further comprises:

and sending a fifth data packet to the server, wherein the fifth data packet comprises a status code, and the status code indicates that the television is started.

7. A television starting method is applied to a server and comprises the following steps:

receiving a sixth data packet sent by a terminal, wherein the sixth data packet comprises awakening information and an MAC address of the television;

determining a first data packet according to the awakening information and the MAC address, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet;

and sending the first data packet to the television.

8. The method of claim 7, wherein determining the first packet according to the wake-up information and the MAC address comprises:

determining the packet identifier according to the awakening information;

determining address information of the television according to the MAC address;

and determining the first data packet according to the packet identifier and the address information.

9. The method according to claim 7 or 8, wherein before receiving the sixth data packet sent by the terminal, the method further comprises:

receiving a second data packet sent by the television, wherein the second data packet indicates that the television is connected with the server when in standby;

sending a third data packet to the television, wherein the third data packet indicates that the server is connected with the television in a standby state;

and receiving a fourth data packet sent by the television, wherein the fourth data packet indicates that the television is connected with the server when in standby.

10. The method of claim 9, wherein the second data packet has a predetermined format, and wherein the second data packet comprises at least one of a packet length and a packet identifier; after receiving the second data packet sent by the television, the method further comprises:

if the preset format is the first format, determining that the second data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

if the packet length in the second data packet is the first length, determining that the second data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

and if the packet identifier in the second data packet is the first identifier, determining that the second data packet is a heartbeat packet.

11. The method of claim 10, wherein before receiving the second data packet transmitted by the tv, further comprising:

and receiving registration information sent by the television, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

12. The method according to any one of claims 7-11, further comprising, after transmitting the first data packet to the television set:

and receiving a fifth data packet sent by the television, wherein the fifth data packet comprises a status code, and the status code indicates the television to be started.

13. A TV turn-on device is applied to a TV and comprises: a receiving module and a control module, wherein,

the receiving module is used for receiving a first data packet sent by the server when the television is in a standby state, wherein the first data packet comprises a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or a wakeup packet;

and the control module is used for controlling the television to be started if the first data packet is determined to be the awakening packet according to the packet identifier.

14. A TV turn-on device is applied to a server and comprises: a receiving module, a determining module and a sending module, wherein,

the receiving module is used for receiving a sixth data packet sent by the terminal, wherein the sixth data packet comprises awakening information and an MAC address of the television;

the determining module is used for determining a first data packet according to the awakening information and the television identifier, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet;

the sending module is used for sending the first data packet to the television.

Technical Field

The embodiment of the invention relates to the technical field of televisions, in particular to a television starting method and device.

Background

At present, when a television is in a standby state, a smart phone can wake up the television through a router, so that movies, music, pictures and the like in the smart phone are pushed to the television.

In the related art, a method for a smart phone to wake up a television through a router includes: the smart phone, the router and the television are in the same local area network, and the smart phone sends a data packet to the router; the router forwards the data packet to the television; after receiving the data packet, the television analyzes the data packet to obtain a set value of a General-purpose input/output (GPIO) port, and when it is determined that the set value is "1", the television wakes up.

In the method, when the smart phone wakes up the television through the router, the smart phone and the television are required to be in the same local area network, and if the smart phone and the television are not in the same local area network, the smart phone cannot wake up the television through the router.

Disclosure of Invention

The application provides a television starting method and device, which are used for waking up a television in a wide area network and improving user experience.

In a first aspect, the present application provides a television booting method, applied to a television, including: when the television is in standby, receiving a first data packet sent by a server, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or a wake-up packet; and if the first data packet is determined to be the awakening packet according to the packet identifier, controlling the television to start.

In one possible implementation mode, the television comprises a WiFi module, a preset lightweight protocol stack program is included in a firmware program of the WiFi module, and the WiFi module is provided with a general purpose input/output GPIO port; if the first data packet is determined to be the wake-up packet according to the packet identifier, controlling the television to start, including: analyzing the first data packet according to a lightweight protocol stack program to obtain a packet identifier; if the first data packet is determined to be the awakening packet according to the packet identifier, determining a position value of the GPIO port according to the packet identifier; and controlling the television to be started according to the position value.

In another possible implementation manner, before receiving the first data packet sent by the server, the method further includes: sending a second data packet to the server, wherein the second data packet indicates that the television is connected with the server when in standby; receiving a third data packet sent by the server, wherein the third data packet indicates that the server is connected with the television in standby; and sending a fourth data packet to the server, wherein the fourth data packet indicates that the television is connected with the server when in standby.

In another possible embodiment, the third data packet has a preset format, and the third data packet includes at least one of a packet length and a packet identifier; after receiving the third data packet sent by the server, the method further includes: if the preset format is the first format, determining that the third data packet is a heartbeat packet; or if the packet length in the third data packet is the first length, determining that the third data packet is a heartbeat packet; and if the packet identifier in the third data packet is the first identifier, determining that the third data packet is a heartbeat packet.

In another possible implementation, before sending the second data packet to the server, the method further includes: and sending registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

In another possible embodiment, after controlling the television to be turned on, the method further includes: and sending a fifth data packet to the server, wherein the fifth data packet comprises a status code which indicates that the television is started.

In a second aspect, the present application provides a television booting method, applied to a server, including:

receiving a sixth data packet sent by the terminal, wherein the sixth data packet comprises awakening information and an MAC address of the television; determining a first data packet according to the awakening information and the MAC address, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet; and sending the first data packet to the television.

In one possible implementation, determining the first data packet according to the wake-up information and the tv identifier includes: determining the packet identifier according to the awakening information; determining address information of the television according to the MAC address; and determining the first data packet according to the packet identifier and the address information.

In another possible implementation manner, before receiving the sixth data packet sent by the terminal, the method further includes:

receiving a second data packet sent by the television, wherein the second data packet indicates that the television is connected with the server when in standby; sending a third data packet to the television, wherein the third data packet indicates that the server is connected with the television in standby; and receiving a fourth data packet sent by the television, wherein the fourth data packet indicates that the television is connected with the server when in standby.

In another possible embodiment, the second data packet has a preset format, and the second data packet includes at least one of a packet length and a packet identifier; after receiving the second data packet sent by the television, the method further comprises the following steps: if the preset format is the first format, determining that the second data packet is a heartbeat packet; or if the packet length in the second data packet is the first length, determining that the second data packet is a heartbeat packet; and if the packet identifier in the second data packet is the first identifier, determining that the second data packet is a heartbeat packet.

In another possible implementation, before receiving the second data packet sent by the television, the method further includes: and receiving registration information sent by the television, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

In another possible implementation, after the transmitting the first data packet to the television, the method further includes: and receiving a fifth data packet sent by the television, wherein the fifth data packet comprises a status code which indicates that the television is started.

In a third aspect, the present application provides a television starting device, which is applied to a television, and includes: the television comprises a receiving module and a control module, wherein the receiving module is used for receiving a first data packet sent by a server when the television is in a standby state, the first data packet comprises a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or a wakeup packet; and the control module is used for controlling the television to start if the first data packet is determined to be the awakening packet according to the packet identifier.

In one possible implementation mode, the television comprises a WiFi module, a preset lightweight protocol stack program is included in a firmware program of the WiFi module, and the WiFi module is provided with a general purpose input/output GPIO port; the control module is specifically configured to: analyzing the first data packet according to a lightweight protocol stack program to obtain a packet identifier; if the first data packet is determined to be the awakening packet according to the packet identifier, determining a position value of the GPIO port according to the packet identifier; and controlling the television to be started according to the position value.

In another possible embodiment, the apparatus further comprises: the sending module is used for sending a second data packet to the server, and the second data packet indicates that the television is connected with the server when in standby; the receiving module is also used for receiving a third data packet sent by the server, and the third data packet indicates that the server is connected with the television in standby; the sending module is further configured to send a fourth data packet to the server, where the fourth data packet indicates that the television is connected to the server when in standby.

In another possible embodiment, the third data packet has a preset format, and the third data packet includes at least one of a packet length and a packet identifier; the device also includes: the determining module is used for determining that the third data packet is a heartbeat packet if the preset format is the first format after receiving the third data packet sent by the server; or if the packet length in the third data packet is the first length, determining that the third data packet is a heartbeat packet; and if the packet identifier in the third data packet is the first identifier, determining that the third data packet is a heartbeat packet.

In another possible implementation, the sending module is further configured to: and before sending the second data packet to the server, sending registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

In another possible implementation, the sending module is further configured to: and after controlling the television to be started, sending a fifth data packet to the server, wherein the fifth data packet comprises a status code which indicates that the television is started.

In a fourth aspect, the present application provides a television boot apparatus, applied to a server, including: the television comprises a receiving module, a determining module and a sending module, wherein the receiving module is used for receiving a sixth data packet sent by a terminal, and the sixth data packet comprises awakening information and an MAC address of the television; the determining module is used for determining a first data packet according to the awakening information and the television identifier, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet; the sending module is used for sending the first data packet to the television.

In a possible implementation, the determining module is specifically configured to: determining a packet identifier according to the awakening information; according to the MAC address, determining address information of the television; and determining the first data packet according to the packet identifier and the address information.

In another possible implementation, the receiving module is specifically configured to receive a second data packet sent by the television before receiving the sixth data packet sent by the terminal, where the second data packet indicates that the television is connected to the server when in standby; the sending module is specifically used for sending a third data packet to the television, and the third data packet indicates that the server is connected with the television in standby; the receiving module is specifically configured to receive a fourth data packet sent by the television, where the fourth data packet indicates that the television is connected to the server when the television is in a standby state.

In another possible embodiment, the second data packet has a preset format, and the second data packet includes at least one of a packet length and a packet identifier; the determining module is further configured to, after receiving the second data packet sent by the television, further include: if the preset format is the first format, determining that the second data packet is a heartbeat packet; or if the packet length in the second data packet is the first length, determining that the second data packet is a heartbeat packet; and if the packet identifier in the second data packet is the first identifier, determining that the second data packet is a heartbeat packet.

In another possible embodiment, the receiving module is further configured to receive registration information sent by the television before receiving the second data packet sent by the television, where the registration information includes at least one of a name, a set number, and a MAC address of the television.

In another possible implementation manner, the receiving module is further configured to receive a fifth data packet sent by the television after sending the first data packet to the television, where the fifth data packet includes a status code, and the status code indicates that the television is turned on.

In a fifth aspect, the present application provides a television turn-on device, including: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the television turn-on method of any of the first aspects.

In a sixth aspect, the present application provides a television turn-on device, including: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the television turn-on method of any of the second aspects.

In a seventh aspect, the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the television booting method according to any one of the first aspect is implemented.

In an eighth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the television booting method according to any one of the second aspects is implemented.

The application provides a television starting method and a device, and the method comprises the following steps: the server receives a sixth data packet sent by the terminal, wherein the sixth data packet comprises awakening information and an MAC address of the television; the server determines a first data packet according to the awakening information and the MAC address, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet; the server sends a first data packet to the television; and when the television is in a standby state, if the television determines that the first data packet is the awakening packet according to the packet identifier, the television is started. In the process, after receiving the sixth data packet sent by the terminal, the server sends the first data packet to the television, so that the television is started according to the first data packet, the terminal wakes up the television in the wide area network, and user experience is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a schematic structural diagram of a conventional television booting system provided in the present application;

fig. 2 is a schematic structural diagram of a television booting system provided in the present application;

fig. 3 is a first schematic flow chart of a television booting method provided in the present application;

fig. 4 is a schematic flowchart of a method for maintaining connection between a server and a television set provided in the present application;

fig. 5 is a second flowchart illustrating a television booting method provided in the present application;

fig. 6 is a first schematic structural diagram of a motor starting device provided in the present application;

fig. 7 is a schematic structural diagram of a motor starting device according to the present application;

fig. 8 is a first schematic structural diagram of another motor starting device provided in the present application;

fig. 9 is a schematic diagram of a hardware structure of a motor starting device provided in the present application;

fig. 10 is a schematic diagram of a hardware structure of another motor starting device provided in the present application.

Detailed Description

To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Fig. 1 is a schematic structural diagram of a conventional television booting system provided in the present application. As shown in fig. 1, a conventional television turn-on system 10 includes: the system comprises a television 101, a router 102 and a terminal 103, wherein the television 101 is provided with a WIFI module, and the television 101, the router 102 and the terminal 103 are in a local area network. Alternatively, the terminal 103 may be any one of a smart phone, a tablet computer, a desktop computer with a wireless transceiver module, and the like.

Specifically, the WIFI module is a wireless transceiver module that defines a physical layer and a Media Access Control (MAC) layer according to a WIFI protocol (802.11 n/g/ac).

In practical applications, the conventional television booting system has the following booting method: in a local area network, when the television 101 is in a dc standby state, the terminal 103 sends a magic data packet to the router 102, the router 102 forwards the magic data packet (a data packet corresponding to a physical layer and a MAC layer) to the WIFI module, the WIFI module includes a WIFI firmware program (which defines the physical layer and the MAC layer), and the WIFI firmware program performs data analysis on the magic data packet to obtain an analysis result. Furthermore, the GPIO port of the WIFI module is set to be 0 or 1 according to the analysis result, and when the GPIO port is set to be 1, the television can be started. In the above process, since the TCP/IP protocol layer is not defined in the WIFI firmware program, the television 101 and the terminal 103 which are not in the same lan cannot communicate with each other, that is, the magic data packet sent by the terminal to the television 101 cannot wake up the television 101 (that is, control the television to be turned on) through the WIFI module.

In order to solve the problem, the application provides a television starting system, so that a data packet sent by a terminal can wake up a television through a WIFI module.

Fig. 2 is a schematic structural diagram of a television booting system provided in the present application. As shown in fig. 2, the television turn-on system 20 includes: a television set 201, a router 202, a server 203, a router 204 and a terminal 205. The television 201, the router 202, the server 203, the router 204, and the terminal 205 are in a wide area network, the television 201 includes a WIFI module, and a TCP/IP protocol layer is defined in a firmware program of the WIFI module (that is, the firmware program includes a preset TCP/IP lightweight protocol stack program).

In practical applications, when the television 201 is in a dc standby state, the TCP/IP lightweight protocol stack program in the WIFI module keeps the television 201 connected to the server 203, and after the server 203 receives the data packet from the terminal 205, the guarantee server 203 may send the data packet for turning on the television 201 to the television 201. In this application, a TCP/IP lightweight protocol stack program in the WIFI module keeps the television 201 connected to the server 203, so that after the terminal 205 sends a data packet for waking up the television 201 to the server 203, the server 203 can wake up the television 201 through the WIFI module according to the data packet.

On the basis of fig. 2, the following describes, with reference to fig. 3, a television power-on method provided by the present application. Specifically, please refer to the embodiment in fig. 3.

Fig. 3 is a first flowchart of a television booting method provided in the present application. As shown in fig. 3, the television booting method in this embodiment includes:

s301: and the server receives a sixth data packet sent by the terminal, wherein the sixth data packet comprises the awakening information and the MAC address of the television.

Specifically, the server receives the sixth data packet sent by the terminal through a router (e.g., the router 202 in fig. 2). The server is a specific server which is set up in a wide area network to wake up a television for a terminal, and may be used to manage device information of the television, distribute received data packets, and the like.

Alternatively, the sixth data packet may have a format as shown in table 1 below.

TABLE 1

IP header UDP header Packet length MAC address Wake-up information Check value

Wherein, the source address of the IP header is the IP address of the terminal, and the destination address of the IP header is the IP address of the server. The UDP header indicates that the packet is a packet encapsulated according to a User Datagram Protocol (UDP). Alternatively, the UDP header may be replaced with a TCP header indicating that the packet is a packet encapsulated according to a Transmission Control Protocol (TCP). The packet length is equal to the sum of the length of the MAC address, the length of the wake-up message, and the length of the check value, which can be used to verify whether the data packet is correct. The wake-up information includes a wake-up value, a name of the television, a unique identification code (e.g., a set number, etc.), and the like. The check value is used to check the integrity of the data packet.

It should be noted that the wakeup information and the MAC address of the television in the sixth data packet are obtained by the terminal from the server through the wide area network or obtained by the terminal from the television through the local area network.

S302: and the server determines a first data packet according to the awakening information and the MAC address, wherein the first data packet comprises a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or an awakening packet.

Specifically, a packet identifier is determined according to the wake-up information, address information of the television is determined according to the MAC address, and a first data packet is determined according to the packet identifier and the address information. See fig. 4, embodiment 5 for a detailed description of determining the first data packet.

The packet identifier may be a first identifier or a second identifier, where the first identifier indicates that the data packet is a heartbeat packet, and the second identifier indicates that the data packet is a wake-up packet. Alternatively, the first flag may be 0 and the second flag may be 1. The address information may be an IP address or a port number of the television.

For example, the first packet may have a format as shown in table 2 below.

TABLE 2

IP header UDP header Packet length Bag identification Check value

Wherein, the source address of the IP header is the IP address of the server, and the destination address of the IP header is the IP address of the television. The packet length is used to check the integrity of the data packet, where the packet length is equal to the sum of the lengths of the information following it, e.g., the packet length in table 2 is equal to the sum of the length of the packet identification and the length of the check value. The UDP header has the same meaning as the UDP header shown in table 1, and the check value has the same meaning as the check value header shown in table 1, which will not be described herein again.

Optionally, the first data packet may further include a packet identification value for identifying a specific packet for maintaining a connection between the server and the tv set or between the server and the terminal, the packet identification value being typically a predefined one of the specific values. Optionally, if the packet identifier value is located after the packet length, the packet length is equal to the sum of the length of the packet identifier value, the length of the packet identifier, and the length of the check value.

S303: the server sends a first data packet to the television.

S304: and when the television is in standby, if the television determines that the first data packet is the awakening packet according to the packet identifier, the television is started.

When the television is in standby, the television receives a first data packet sent by the server through a router (such as the router 204 shown in fig. 2). Specifically, when the packet identifier is determined to be the second identifier, the first data packet is determined to be a wake-up packet.

Optionally, whether to start up may also be determined according to the packet length of the first data packet or the preset format of the first data packet.

For example, when the packet length of the first data packet is a second length, it is determined that the first data packet is a wake-up packet, and the second length is a length of a preset wake-up packet sent by the server to the smart television.

For example, when the first data packet has the predetermined format as shown in table 2, it is determined that the first data packet is a wake-up packet.

The television starting method provided by the embodiment comprises the following steps: the server receives a sixth data packet sent by the terminal, wherein the sixth data packet comprises awakening information and an MAC address of the television; the server determines a first data packet according to the awakening information, the MAC address and the IP address, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or an awakening packet; the server sends a first data packet to the television; and when the television is in a standby state, if the television determines that the first data packet is the awakening packet according to the packet identifier, the television is started. In the process, after receiving the sixth data packet sent by the terminal, the server sends the first data packet to the television, so that the television is started according to the first data packet, the terminal wakes up the television in the wide area network, and user experience is improved.

Before the television receives the first data packet sent by the server, the server and the television maintain connection by sending heartbeat packets. A method for maintaining connection between the server and the television will be described with reference to fig. 4. Specifically, please refer to fig. 4.

Fig. 4 is a flowchart illustrating a method for maintaining connection between a server and a television according to the present application. As shown in fig. 4, the television booting method provided in this embodiment includes:

s401: the television sends registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

The name is a default name or a custom name, and the number can be the number of the television.

In one possible embodiment, the server receives the registration information and stores the registration information to a preset location in a memory provided in the server.

S402: and the television sends a second data packet to the server, the second data packet indicates that the television is connected with the server when in standby, the second data packet has a preset format, and the second data packet comprises at least one of a packet length and a packet identifier.

Specifically, the IP address of the server is stored in the television, and the television may send the second data packet to the server according to the IP address of the server.

For example, the second packet may have a format as shown in table 3 below.

TABLE 3

IP header UDP header Packet length Bag identification Index value Status code Check value

The source address of the IP header is the IP address of the television and the destination address of the IP header is the IP address of the server.

The packet length is equal to the sum of the length of the packet identifier, the length of the index value, the length of the status code, and the length of the check value.

The index value is used to identify the number of heartbeat packets.

The status code indicates whether the server can wake up the television. For example, the status code is OK, indicating that the server can wake up the tv, and the status code is FAIL, indicating that the server cannot wake up the tv.

The UDP header has the same meaning as the UDP header shown in table 1, the packet identifier has the same meaning as the packet identifier in table 2, and the check value has the same meaning as the check value shown in table 1, which is not described herein again.

The second data packet may also have a format as shown in table 4 below, for example.

TABLE 4

IP header Port number Packet length Bag identification Index value Status code Check value

The IP header, packet length, packet identifier, index value, status code, and check value are the same as those shown in table 3, and are not described herein again. Specifically, the port numbers include a source port number and a destination port number, where the source port number is a port number of the server and the destination port number is a port number of the television.

In practice, if the packet identifier in the second data packet is the first identifier, the index value is 1, and the status code is OK, the television is identified to send a heartbeat packet to the server, and the server is notified, so that the television can be woken up.

S403: and the server determines that the second data packet is the heartbeat packet according to at least one of the preset format, the packet length and the packet identifier of the second data packet.

In a possible implementation method, after receiving the second data packet, the server determines that the second data packet is a heartbeat packet according to at least one of a preset format, a packet length, and a packet identifier of the second data packet, including:

if the preset format is the first format, determining that the second data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

if the packet length in the second data packet is the first length, determining that the second data packet is a heartbeat packet;

and if the packet identifier in the second data packet is the first identifier, determining that the second data packet is a heartbeat packet.

The first length is the preset length of the heartbeat packet sent to the server by the smart television.

Before receiving the second packet, the method further includes: the server judges whether a second data packet is received within a first preset time, if so, the method shown in the step S403 is executed, and if not, exception handling is performed, where the exception handling includes: and sending abnormal information to the terminal, wherein the abnormal information prompts that the connection between the server and the television is interrupted, and the terminal cannot wake up the television through the server.

Optionally, the first preset time period may be 1 second, 2 seconds, and the like, which is not limited in this application.

S404: and the server sends a third data packet to the television, the third data packet indicates that the server is connected with the television in a standby state, the third data packet has a preset format, and the third data packet comprises at least one of a packet length and a packet identifier.

If the format of the second packet is shown in table 3, the format of the third packet is shown in table 5.

TABLE 5

IP header UDP header Packet length Bag identification Index value Check value

The source address of the IP header is the IP address of the server and the destination address of the IP header is the IP address of the television. The UDP header, packet length, packet identifier, index value, and check value are the same as those in table 3, and are not described here again.

If the format of the second packet is as in table 4, then the format of the third packet is as in table 6.

TABLE 6

IP header Port number Packet length Bag identification Index value Check value

The IP header, packet length, packet identifier, index value, and check value are the same as those shown in table 5, and are not described here again. Specifically, the port number includes a source port number and a destination port number, where the source port number is a port number of the television, and the destination port number is a port number of the server.

It should be noted that the third data packet is the same as the second data packet, and is used to ensure that the data packets received and transmitted by the television and the server are consistent in the process of maintaining the connection between the television and the server.

S405: and the television determines the third data packet as a heartbeat packet according to at least one of a preset format, a packet length and a packet identifier in the third data packet.

In a possible implementation manner, after receiving the third data packet, determining that the third data packet is a heartbeat packet according to at least one of a preset format, a packet length, and a packet identifier in the third data packet includes:

if the preset format is the first format, determining that the third data packet is a heartbeat packet; alternatively, the first and second electrodes may be,

if the packet length in the third data packet is the first length, determining that the third data packet is a heartbeat packet; and if the packet identifier in the third data packet is the first identifier, determining that the third data packet is a heartbeat packet.

S406: and the television sends a fourth data packet to the server, and the fourth data packet indicates that the television is connected with the server when in standby.

Wherein the fourth data packet may be identical to the second data packet.

Specifically, when the fourth data packet is the same as the second data packet, the television sends the second data packet to the service at a fixed first time interval. In practice, if the smart television does not receive the corresponding third data packet after sending the second data packet, the smart television continues to send the second data packet at the first time interval, and simultaneously records the number of times of sending the second data packet after not receiving the corresponding third data packet, and when the determined number of times is greater than or equal to a preset number threshold, the connection terminal between the television and the server is determined.

Alternatively, the first time interval may be 1 millisecond, 2 milliseconds, etc., and the preset number threshold may be 3 times, 4 times, 5 times, etc. The first time interval and the preset time threshold are not limited in the application.

In practice, the television sends a second data packet to the server, the index value in the second data packet is added with 1, after the television receives a third data packet replied by the server, the index value is subtracted by 1, a next second data packet is sent to the server, if the television does not receive the third data packet replied by the server after sending the second data packet to the server, the index value is updated (the index value is added with 1), the next second data packet sent to the server includes an updated index value (which is 2), and if the index value is greater than or equal to a preset time threshold value after updating for multiple times, a connection terminal between the television and the server is determined.

The method for maintaining the connection between the server and the television set provided by the embodiment comprises the following steps: the television sends registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television; the television sends a second data packet to the server, the second data packet indicates that the television is connected with the server when in standby, the second data packet has a preset format, and the second data packet comprises at least one of a packet length and a packet identifier; the server determines the second data packet as a heartbeat packet according to at least one of the preset format, the packet length and the packet identification of the second data packet; the server sends a third data packet to the television, the third data packet indicates that the server is connected with the television in a standby state, the third data packet has a preset format, and the third data packet comprises at least one of a packet length and a packet identifier; the television determines the third data packet as a heartbeat packet according to at least one of a preset format, a packet length and a packet identifier in the third data packet; and the television sends a fourth data packet to the server, and the fourth data packet indicates that the television is connected with the server when in standby. In the method, when the television is in a standby state, the server and the television can be connected through the heartbeat packet, so that the router between the server and the television can maintain the mapping between the wide area network and the intranet, and the terminal in the wide area network can wake up the television.

In the process of maintaining connection between the server and the television, the following describes in detail the television booting method provided by the present application with reference to fig. 5.

Fig. 5 is a second flowchart of the television booting method provided in the present application. As shown in fig. 5, the television booting method in this embodiment includes:

s501: and the terminal sends a sixth data packet to the server, wherein the sixth data packet comprises the awakening information and the MAC address of the television.

Optionally, the terminal may send the sixth data packet to the server N times at regular time, so as to improve stability of data packet transmission and a success rate of waking up the television. Wherein N is greater than or equal to 2.

S502: the server determines a packet identifier according to the awakening information; according to the MAC address, determining address information of the television; and determining a first data packet according to the packet identifier and the address information, wherein the first data packet comprises the packet identifier which indicates that the data packet is a heartbeat packet or a wakeup packet.

Specifically, after receiving the sixth data packet, the server analyzes the wake-up information in the sixth data packet to obtain a wake-up value, and determines the wake-up value as the packet identifier.

Specifically, the server searches an IP address or a port number of the television matched with the MAC address in a database maintained by the server according to the MAC address, and determines the IP address and/or the port number of the matched television as address information of the television.

Optionally, the service may also search, in a database maintained by the server, an IP address or a port number of the television that matches the MAC address according to the unique identifier, such as the television number and the name, included in the wake-up information, and determine the IP address and/or the port number of the television that matches as the address information of the television.

Specifically, the packet identifier, the address information, and the like are encapsulated to obtain a first data packet.

S503: the server sends a first data packet to the television.

Optionally, the server sends the first data packet to the television according to the MAC address and the IP address of the television. Alternatively, the server may transmit the first packet to the television set M times, where M is greater than or equal to 1.

In practice, if the server does not receive the fifth data packet sent by the television according to the first data packet, the server may send the first data packet to the television next time. Therefore, the television can correctly and completely receive the first data packet.

S504: and the smart television analyzes the first data packet according to the lightweight protocol stack program to obtain a packet identifier.

Specifically, the television comprises a WiFi module, a firmware program of the WiFi module comprises a preset lightweight protocol stack program, and the WiFi module is provided with a general purpose input/output GPIO port.

S505: and if the smart television determines that the first data packet is a wake-up packet according to the packet identifier, determining a position value of the GPIO port according to the packet identifier.

Specifically, the packet identification may be determined as a location value. For example, the packet identifier is a first identifier 0, the setting value is determined to be 0, the packet identifier is a second identifier 1, and the setting value of the GPIO port is determined to be 1.

S506: and the intelligent television is started according to the set value.

Specifically, when the setting value is 1, the smart television is turned on.

S507: and the intelligent television sends a fifth data packet to the server, wherein the fifth data packet comprises a status code, and the status code indicates that the television is started.

Wherein the fifth data packet has a format as shown in table 3 above or a format as shown in table 4 above.

It should be noted that the status code in the fifth data packet is FAIL, that is, the server may not wake up the television (i.e., the television is turned on).

S508: and the server determines that the television is started according to the state code.

Further, after receiving the fifth data packet sent by the television, the server determines that the television is turned on according to the status code and the status code FAIL.

The television starting method provided by the embodiment comprises the following steps: the terminal sends a sixth data packet to the server, wherein the sixth data packet comprises the awakening information and the MAC address of the television; the server determines a packet identifier according to the awakening information; according to the MAC address, determining address information of the television; determining a first data packet according to the packet identifier and the address information, wherein the first data packet comprises a packet identifier which indicates that the data packet is a heartbeat packet or a wakeup packet; the server sends a first data packet to the television; the smart television analyzes the first data packet according to a lightweight protocol stack program to obtain a packet identifier; if the smart television determines that the first data packet is a wake-up packet according to the packet identifier, determining a position value of the GPIO port according to the packet identifier; the intelligent television controls the television to be started according to the position value; the intelligent television sends a fifth data packet to the server, the fifth data packet comprises a status code, and the status code indicates that the television is started; and the server determines that the television is started according to the state code. In the method, after the server receives the sixth data packet sent by the terminal, the server sends the first data packet to the television, so that the television is started according to the first data packet, the terminal in the wide area network can wake up the television, and user experience is improved.

Fig. 6 is a first schematic structural diagram of a motor starting device provided in the present application. The motor start-up device 10 is arranged in a television. As shown in fig. 6, the motor starting device 10 includes: the system comprises a receiving module 11 and a control module 12, wherein the receiving module 11 is used for receiving a first data packet sent by a server when the television is in a standby state, the first data packet comprises a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or a wakeup packet; the control module 12 is configured to control the television to start up if the first data packet is determined to be the wake-up packet according to the packet identifier.

In one possible implementation mode, the television comprises a WiFi module, a preset lightweight protocol stack program is included in a firmware program of the WiFi module, and the WiFi module is provided with a general purpose input/output GPIO port; the control module is specifically configured to: analyzing the first data packet according to a lightweight protocol stack program to obtain a packet identifier; if the first data packet is determined to be the awakening packet according to the packet identifier, determining a position value of the GPIO port according to the packet identifier; and controlling the television to be started according to the position value.

The television starting device 10 provided by the present application can execute the technical solution that can be executed by the television in the foregoing method embodiment, and the implementation principle and the beneficial effect thereof are similar, and are not described herein again.

Fig. 7 is a second schematic structural diagram of a motor starting device provided in the present application. As shown in fig. 7, the motor starting device 10 further includes: the sending module 13, the sending module 13 is configured to send a second data packet to the server, where the second data packet indicates that the television is connected to the server when in standby; the receiving module 11 is further configured to receive a third data packet sent by the server, where the third data packet indicates that the server is connected to the television set in the standby state; the sending module 13 is further configured to send a fourth data packet to the server, where the fourth data packet indicates that the television is connected to the server when in standby.

In another possible embodiment, the third data packet has a preset format, and the third data packet includes at least one of a packet length and a packet identifier; the device also includes: a determining module 14, wherein the determining module 14 is configured to, after receiving a third data packet sent by the server, determine that the third data packet is a heartbeat packet if the preset format is the first format; or if the packet length in the third data packet is the first length, determining that the third data packet is a heartbeat packet; and if the packet identifier in the third data packet is the first identifier, determining that the third data packet is a heartbeat packet.

In another possible implementation, the sending module 13 is further configured to: and before sending the second data packet to the server, sending registration information to the server, wherein the registration information comprises at least one of the name, the number and the MAC address of the television.

In another possible implementation, the sending module 13 is further configured to: and after controlling the television to be started, sending a fifth data packet to the server, wherein the fifth data packet comprises a status code which indicates that the television is started.

The television starting device 10 provided by the present application can execute the technical solution that can be executed by the television in the foregoing method embodiment, and the implementation principle and the beneficial effect thereof are similar, and are not described herein again.

Fig. 8 is a first schematic structural diagram of another motor starting device provided in the present application. As shown in fig. 8, the motor start-up device 20 is disposed in the server, and the motor start-up device 20 includes: the system comprises a receiving module 21, a determining module 22 and a sending module 23, wherein the receiving module 21 is configured to receive a sixth data packet sent by a terminal, and the sixth data packet includes wake-up information and an MAC address of the television; the determining module 22 is configured to determine a first data packet according to the wake-up information and the MAC address, where the first data packet includes a packet identifier, and the packet identifier indicates that the data packet is a heartbeat packet or a wake-up packet; the sending module 23 is configured to send the first data packet to the television.

In a possible implementation, the determining module 22 is specifically configured to: determining a packet identifier according to the awakening information; according to the MAC address, determining address information of the television; and determining the first data packet according to the packet identifier and the address information.

In another possible implementation, the receiving module 21 is specifically configured to receive a second data packet sent by the television before receiving the sixth data packet sent by the terminal, where the second data packet indicates that the television is connected to the server when in standby; the sending module 23 is specifically configured to send a third data packet to the television, where the third data packet indicates that the server is connected to the television in the standby state; the receiving module 21 is specifically configured to receive a fourth data packet sent by the television, where the fourth data packet indicates that the television is connected to the server when the television is in a standby state.

In another possible embodiment, the second data packet has a preset format, and the second data packet includes at least one of a packet length and a packet identifier; the determining module 22 is further configured to, after receiving the second data packet sent by the television, further include: if the preset format is the first format, determining that the second data packet is a heartbeat packet; or if the packet length in the second data packet is the first length, determining that the second data packet is a heartbeat packet; and if the packet identifier in the second data packet is the first identifier, determining that the second data packet is a heartbeat packet.

In another possible embodiment, the receiving module 21 is further configured to receive registration information sent by the television before receiving the second data packet sent by the television, where the registration information includes at least one of a name, a set number, and a MAC address of the television.

In another possible implementation manner, the receiving module 21 is further configured to receive a fifth data packet sent by the television after sending the first data packet to the television, where the fifth data packet includes a status code, and the status code indicates that the television is turned on.

The television boot apparatus 20 provided in the present application can execute the technical solution that can be executed by the server in the foregoing method embodiments, and the implementation principle and the beneficial effects thereof are similar, and are not described herein again.

Fig. 9 is a schematic diagram of a hardware structure of a motor starting device provided in the present application. The television turn-on device 30 is disposed in the television. As shown in fig. 9, the television turn-on device 30 includes: at least one processor 31 and a memory 32. The processor 31 and the memory 32 are connected by a bus 33.

In a specific implementation, the at least one processor 31 executes computer-executable instructions stored in the memory 32, so that the at least one processor 31 performs the television turn-on method as described above.

For a specific implementation process of the processor 31, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.

Fig. 10 is a schematic diagram of a hardware structure of another motor starting device provided in the present application. The television turn-on device 40 is disposed in the server. As shown in fig. 10, the television turn-on device 40 includes: at least one processor 41 and a memory 42. The processor 41 and the memory 42 are connected by a bus 43.

In particular implementations, the at least one processor 41 executes computer-executable instructions stored by the memory 42 to cause the at least one processor 41 to perform the television turn-on method as described above.

For a specific implementation process of the processor 41, reference may be made to the above method embodiments, which implement similar principles and technical effects, and this embodiment is not described herein again.

In the embodiments shown in fig. 9-10, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.

The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.

The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.

The application also provides a computer-readable storage medium, in which computer execution instructions are stored, and when the processor executes the computer execution instructions, the television starting method executable by the television is realized.

The application also provides another computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the television starting method executable by the server is realized.

The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.

An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.

The division of a cell is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple cells or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on a plurality of block chain units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or portions thereof that substantially or partially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a block chain device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种适用于机顶盒的动态键值使用方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类