Home gateway and control method thereof
AssigneeBoe Technology Group Co., Ltd.
InventorLingfeng XU
Life of this patent
Estimating the term…
Abstract
A control method of a home gateway includes: receiving a cloud control command, identifying a manufacturer code and a communication protocol of an terminal device to be controlled from the cloud control command, selecting a target child process from a plurality of child processes, writing the cloud control command to a communication message queue corresponding to the target child process according to the communication protocol of the terminal device to be controlled; extracting the cloud control command, determining a first target communication interface coupled with the terminal device to be controlled, and controlling the terminal device to be controlled through the first target communication interface.
Claims16
A control method of a home gateway, the control method comprising:
- executing a master process to:
- receive a cloud control command, and identify a manufacturer code and a communication protocol of an terminal device to be controlled from the cloud control command;
- select a target child process from a plurality of child processes, wherein the plurality of child processes corresponds to a plurality of types of manufacturer information, each type of manufacturer information corresponds to at least one terminal device and includes at least a manufacturer code, each child process corresponds to a communication message queue, and a manufacturer code in manufacturer information corresponding to the target child process is the same as the manufacturer code of the terminal device to be controlled;
- and
- write the cloud control command into a communication message queue corresponding to the target child process according to the communication protocol of the terminal device to be controlled;
- and
- executing the target child process to:
- extract the cloud control command from the communication message queue corresponding to the target child process, determine a first target communication interface coupled with the terminal device to be controlled according to the cloud control command, and control the terminal device to be controlled through the first target communication interface.
A control method of a home gateway, wherein in the home gateway, each of a plurality of communication interfaces is capable of being coupled with at least one terminal device, and each communication interface corresponds to one interface message queue;
- and
- the plurality of communication interfaces are all coupled with at least one processor, the at least one processor includes a circular buffer, the circular buffer includes a head pointer corresponding to a frame header of a data frame and a dynamic tail pointer corresponding to the head pointer, and a storage length of the circular buffer is greater than a maximum storage length allowed to be stored between the head pointer and the dynamic tail pointer;
- the control method of the home gateway, comprises:
- receiving, by a second target communication interface, data from at least one terminal device coupled with the second target communication interface;
- reading, by the at least one processor, the data from the second target communication interface, storing, by the at least one processor, the data in the circular buffer, wherein a portion of the data corresponding to a frame header of a data frame is stored in a position of the circular buffer pointed to by the head pointer, and with a movement of the dynamic tail pointer, a portion of the data corresponding to a data portion of the data frame and a portion of the data corresponding to a frame end of the data frame are stored in a position of the circular buffer pointed to by the dynamic tail pointer in sequence according to a reading order;
- and
- once data stored between the head pointer and the dynamic tail pointer is greater than or equal to data of one data frame, parsing, by the at least one processor, the data from the location pointed to by the head pointer, and the parsed data is added into an interface message queue corresponding to the second target communication interface, so that the at least one processor extracts the parsed data from the interface message queue.
A home gateway, comprising:
- a plurality of communication interfaces, wherein each communication interface is configured to be coupled with at least one terminal device;
- and
- at least one processor coupled with the plurality of communication interfaces, wherein the at least one processor is configured to:
- receive a cloud control command, and identify a manufacturer code and a communication protocol of a terminal device to be controlled from the cloud control command;
- select a target child process from the plurality of child processes, wherein the plurality of child processes corresponds to a plurality of types of manufacturer information, each type of manufacturer information corresponds to at least one terminal device and includes at least a manufacturer code, each child process corresponding to a communication message queue, and a manufacturer code in manufacturer information corresponding to the target child process is the same as the manufacturer code of the terminal device to be controlled;
- write the cloud control command to a communication message queue corresponding to the target child process according to the communication protocol of the terminal device to be controlled;
- and
- extract the cloud control command from the communication message queue;
- determine a first target communication interface coupled with the terminal device to be controlled according to the cloud control command;
- and control the terminal device to be controlled through the first target communication interface.
Dependencies are inferred from the claim text.