Method for remotely controlling CPE equipment and remote control system
The central control terminal receives the registration connection messages of CPE equipment and user equipment, determines the connection mode and establishes a data transmission channel, which solves the problem of high resource overhead of the reverse SSH tunnel, realizes efficient remote control of CPE equipment, and reduces costs.
Patent Information
- Application Number
- CN202210211179.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-03-03
AI Technical Summary
In the existing technology, the reverse SSH tunnel has a large resource overhead when remotely controlling CPE equipment, has poor scalability, and requires high performance of the proxy server, resulting in high costs.
The central control terminal receives the registration connection messages of the CPE equipment and the user equipment, determines the connection mode, and establishes a data transmission channel between the CPE equipment and the user equipment to separate the control channel and data channel to achieve remote control.
It reduces resource overhead, improves system expansion performance, reduces dependence on proxy servers, and reduces costs.
Smart Images

Figure CN114640663B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of CPE device control, and in particular to a method for remotely controlling a CPE device, a remote control system, a computer-readable storage medium, and a processor. Background Art
[0002] As ipv4 is gradually exhausted, many ISPs allocate private IPs to CPEs, allowing them to access the Internet through carrier-grade NAT. For this type of network setting, the existing technology generally uses a reverse SSH tunnel for remote connection. This method mainly sets up a proxy server (publicServer) on a shared IP, adds a reverse SSH tunnel to the proxy server from the CLI port on the CPE side, and allows devices that want to remotely connect to the CPE side to operate the CLI to forward packets through the proxy server.
[0003] This remote control mechanism has poor scalability, requires high performance from the proxy server, and is expensive. Secondly, the resource overhead of the reverse SSH tunnel is relatively large. Summary of the invention
[0004] The main purpose of the present application is to provide a method for remotely controlling a CPE device, a remote control system, a computer-readable storage medium, and a processor to solve the problem of large resource overhead of a reverse SSH tunnel in the prior art.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for remotely controlling a CPE device is provided, the method being applied to a remote control system, the remote control system comprising a CPE device, a user device and a central control terminal, the method comprising: the central control terminal receiving registration online messages of the CPE device and the user device; the central control terminal determining an online mode of the CPE device according to the registration online messages of the CPE device; the central control terminal receiving a control message sent by the user device and forwarding the control message to the CPE device, and the central control terminal establishing a data transmission channel between the CPE device and the user device according to the online mode of the CPE device.
[0006] Furthermore, the central control end determines the online mode of the CPE device according to the registration online message of the CPE device, including: when the registration online message of the CPE device is a first registration online message, determining the online mode of the CPE device to be the first online mode; when the registration online message of the CPE device is a second registration online message, determining the online mode of the CPE device to be the second online mode; when the registration online message of the CPE device is a third registration online message, determining the online mode of the CPE device to be the third online mode.
[0007] Further, the registration connection message of the CPE device includes a socket and a wan ip. When the registration connection message of the CPE device is a third registration connection message, determining that the connection mode of the CPE device is the third connection mode includes: when the type of the socket is ipv6, determining that the connection mode of the CPE device is the third connection mode, and the third connection mode is a mode with an ipv6 address; when the registration connection message of the CPE device is a second registration connection message, determining that the connection mode of the CPE device is the second connection mode includes: when the address of the wan ip and the address of the socket are different, determining that the connection mode of the CPE device is the second connection mode, and the second connection mode is a mode of accessing the Internet through a telecommunications-grade NAT; when the registration connection message of the CPE device is a first registration connection message, determining that the connection mode of the CPE device is the first connection mode includes: when the address of the wan ip and the address of the socket are the same, determining that the connection mode of the CPE device is the first connection mode, and the first connection mode is a mode with an ipv4 address.
[0008] Further, the CPE device includes a kernel daemon process, and the user device includes a user device control module. When the online mode of the CPE device is the second online mode, the online mode of the user device control module is the server mode, and the online mode of the kernel daemon process is the client mode. When the online mode of the CPE device is the first online mode or the third online mode, the online mode of the user device control module is the client mode, and the online mode of the kernel daemon process is the server mode.
[0009] Furthermore, the registration online message of the CPE device includes the mac address and online status of the CPE device, the registration online message of the user device includes the mac address and online status of the user device, and the central control end stores an authorization list. The method also includes: when the mac address of the CPE device is in the authorization list and the online status of the CPE device is online, determining that the CPE device is a registered device; when the mac address of the user device is in the authorization list and the online status of the user device is online, determining that the user device is a registered device.
[0010] Furthermore, the method also includes: the central control end sends an online status detection signal to the CPE device and the user device at a predetermined time interval; if no reply signal is received from the CPE device and the user device within a predetermined time period, it is determined that the CPE device and the user device are unregistered devices; if the reply signal is received from the CPE device and the user device N times in a row, the predetermined time interval is increased.
[0011] Furthermore, the method further includes: when the online mode of the CPE device is the first online mode or the third online mode, setting the predetermined time interval to a maximum time interval.
[0012] According to another aspect of the present application, a method for remotely controlling a CPE device is provided, and the method is applied to a remote control system, wherein the remote control system includes a CPE device, a user device and a central control end, including: the CPE device sends a registration online message to the central control end; the user device sends a registration online message to the central control end; the central control end determines an online mode of the CPE device according to the registration online message of the CPE device; the user device sends a control message to the central control end, the central control end forwards the control message to the CPE device, and the central control end establishes a data transmission channel between the CPE device and the user device according to the online mode of the CPE device.
[0013] Furthermore, the CPE device includes a CPE port and a kernel daemon process, and the user device includes a user device port and a user device control module. The CPE device sends a registration online message to the central control end through the CPE port; the kernel daemon process establishes a connection with the serial interface of the CPE device and establishes multiple kernel function boot modules; the registration online message of the user device is sent to the central control end through the user device port; the user device control module generates the control message and establishes the data transmission channel between the user device control module and the kernel daemon process.
[0014] Furthermore, the method also includes: the kernel daemon process calls the kernel function boot module according to the control message to control the serial interface of the CPE device to complete the action corresponding to the control message.
[0015] According to another aspect of the present application, a remote control system is also provided, which includes a CPE device, a user device and a central control end, and the central control end includes: a receiving unit, a determining unit and a processing unit; the receiving unit is used to receive registration online messages of the CPE device and the user device; the determining unit is used to determine the online mode of the CPE device according to the registration online message of the CPE device; the processing unit is used to receive a control message sent by the user device, and forward the control message to the CPE device, and establish a data transmission channel between the CPE device and the user device according to the online mode of the CPE device.
[0016] According to another aspect of the present application, a remote control system is also provided, which includes: a CPE device, a user device and a central control terminal, wherein the central control terminal communicates with the CPE device and the user device respectively, and the central control terminal is used to execute any one of the methods described above.
[0017] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods.
[0018] According to another aspect of the present application, a processor is further provided, wherein the processor is used to run a program, wherein the program executes any one of the above methods when running.
[0019] By applying the technical solution of the present application, the online mode of the CPE device is determined according to the registration online message of the CPE device, the control message is forwarded to the CPE device, a control relationship between the user device and the CPE device is established through the control message, and data for controlling the CPE device to perform specific operations is transmitted through the data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A flowchart of a method for remotely controlling a CPE device according to an embodiment of the present application is shown;
[0022] Figure 2 A first schematic diagram of a remote control system according to an embodiment of the present application is shown;
[0023] Figure 3 A second schematic diagram of a remote control system according to an embodiment of the present application is shown;
[0024] Figure 4 A flowchart showing the registration of the CPE device port and the user equipment port with the central control terminal according to an embodiment of the present application is shown;
[0025] Figure 5 A flow chart of establishing a datatunnel from the user equipment port to the CPE equipment port according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be intermediate elements. Moreover, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element through a third element.
[0030] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0031] CPE: Customer Premises Equipment, which is equipment located at the end user's premises, usually a telephone or other service.
[0032] As introduced in the background technology, the remote control mechanism in the prior art is not scalable, has high performance requirements for the proxy server, and the proxy server is expensive. Secondly, the resource overhead of the reverse SSH tunnel is relatively large. In order to solve the problem of the large resource overhead of the reverse SSH tunnel in the prior art, the embodiments of the present application provide a method for remotely controlling a CPE device, a remote control system, a computer-readable storage medium, and a processor.
[0033] According to an embodiment of the present application, a method for remotely controlling a CPE device is provided.
[0034] Figure 1 1 is a flow chart of a method for remotely controlling a CPE device according to an embodiment of the present application. Figure 1 As shown, the above method is applied to a remote control system, the remote control system includes a CPE device, a user device and a central control terminal, and the method includes the following steps:
[0035] Step S101, the central control terminal receives registration connection information from the CPE device and the user device;
[0036] In the above steps, the registration connection information of the CPE device and the registration connection information of the user device are both registered to the central control end.
[0037] Step S102, the central control terminal determines the connection mode of the CPE device according to the registration connection information of the CPE device;
[0038] In step S103, the central control terminal receives the control message sent by the user equipment, and forwards the control message to the CPE device, and the central control terminal establishes a data transmission channel between the CPE device and the user equipment according to the connection mode of the CPE device.
[0039] In the above steps, the control message only establishes the control relationship between the user equipment and the CPE equipment. The actual data for controlling the CPE equipment to perform specific operations is transmitted through the data transmission channel, that is, the control channel and the data channel are distinguished. The central control end plays the role of data query and forwarding control messages. Separating the data channel and the control channel allows the system to have better expansion performance.
[0040] Specific operations include raising the temperature, opening the cabinet door, lowering the temperature, etc.
[0041] In the above steps, the online mode of the CPE device is determined according to the registration online message of the CPE device, the control message is forwarded to the CPE device, a data transmission channel is established between the CPE device and the user device, a control relationship is established between the user device and the CPE device through the control message, and data for controlling the CPE device to perform specific operations is transmitted through the data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art.
[0042] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] In one embodiment of the present application, the central control terminal determines the online mode of the CPE device according to the registration online message of the CPE device, including: when the registration online message of the CPE device is the first registration online message, determining the online mode of the CPE device to be the first online mode; when the registration online message of the CPE device is the second registration online message, determining the online mode of the CPE device to be the second online mode; when the registration online message of the CPE device is the third registration online message, determining the online mode of the CPE device to be the third online mode; the purpose of determining the online mode of the CPE device to be the online mode corresponding to the registration online message according to different registration online messages is achieved.
[0044] In one embodiment of the present application, the registration connection message of the CPE device includes a socket and a wan ip. When the registration connection message of the CPE device is a third registration connection message, determining that the connection mode of the CPE device is the third connection mode includes: when the type of the socket is ipv6, determining that the connection mode of the CPE device is the third connection mode, and the third connection mode is a mode with an ipv6 address; when the registration connection message of the CPE device is a second registration connection message, determining that the connection mode of the CPE device is the second connection mode includes: when the address of the wan ip is different from the address of the socket, determining that the connection mode of the CPE device is the second connection mode, and the second connection mode is a mode of accessing the Internet through a carrier-grade NAT; when the registration connection message of the CPE device is a first registration connection message, determining that the connection mode of the CPE device is the first connection mode includes: in the wan When the IP address is the same as the address of the socket, the online mode of the CPE device is determined to be the first online mode, and the first online mode is a mode with an IPv4 address; the purpose of determining the online mode of the CPE device by the type of the socket, the address of the socket and the address of the WAN IP is achieved.
[0045] In one embodiment of the present application, the CPE device includes a kernel daemon process, and the user device includes a user device control module. When the online mode of the CPE device is the second online mode, the online mode of the user device control module is the server mode, and the online mode of the kernel daemon process is the client mode. When the online mode of the CPE device is the first online mode or the third online mode, the online mode of the user device control module is the client mode, and the online mode of the kernel daemon process is the server mode. That is, the kernel daemon process of the CPE device and the user device including the user device control module are determined to be in client mode or server mode according to the online mode of the CPE device. The role conversion between the client mode and the server mode can solve the problem of NAT penetration.
[0046] In one embodiment of the present application, the registration online message of the above-mentioned CPE device includes the mac address and online status of the CPE device, the registration online message of the above-mentioned user device includes the mac address and online status of the user device, and the above-mentioned central control terminal stores an authorization list. The above-mentioned method also includes: when the mac address of the above-mentioned CPE device is in the above-mentioned authorization list and the online status of the above-mentioned CPE device is online, determining that the above-mentioned CPE device is a registered device; when the mac address of the above-mentioned user device is in the above-mentioned authorization list and the online status of the above-mentioned user device is online, determining that the above-mentioned user device is a registered device.
[0047] In one embodiment of the present application, the method further includes: the central control terminal sends an online status detection signal to the CPE device and the user device at a predetermined time interval; if the reply signal of the CPE device and the user device is not received within the predetermined time period, the CPE device and the user device are determined to be unregistered devices; if the reply signal of the CPE device and the user device is received N times in succession, the predetermined time interval is increased, and the CPE device and the user device are determined to be unregistered devices or the predetermined time interval is increased by judging whether the reply signal of the CPE device and the user device is received within the predetermined time period. Wherein, N>2. Wherein, the predetermined time interval can be set to 2ms, 5ms, 10ms, etc., and the predetermined time period can be set to 30ms, 60ms, 90ms, etc. Specifically, if the reply signal of the CPE device and the user device is received five times in succession, it proves that the communication is good, and the predetermined time interval can be appropriately increased at this time, for example, the predetermined time interval is increased from 2ms to 5ms, and after increasing to 5ms, the reply signal of the CPE device and the user device is received five times in succession, and the predetermined time interval is continued to be increased, and so on.
[0048] In one embodiment of the present application, the method further includes: when the online mode of the CPE device is the first online mode or the third online mode, setting the predetermined time interval to a maximum time interval. That is, when the online mode is an IPv4 address mode or an IPv6 address mode, directly setting the predetermined time interval to the maximum time interval can ensure normal communication. Specifically, the maximum time interval can be 30ms.
[0049] An embodiment of the present application also provides a method for remotely controlling a CPE device, and the method is applied to a remote control system, wherein the remote control system includes a CPE device, a user device and a central control terminal, including: the CPE device sends a registration online message to the central control terminal; the user device sends a registration online message to the central control terminal; the central control terminal determines the online mode of the CPE device according to the registration online message of the CPE device; the user device sends a control message to the central control terminal, the central control terminal forwards the control message to the CPE device, and the central control terminal establishes a data transmission channel between the CPE device and the user device according to the online mode of the CPE device, so as to achieve the purpose that the central control terminal can establish a data transmission channel between the CPE device and the user device according to the online mode of the CPE device.
[0050] In one embodiment of the present application, the CPE device includes a CPE port and a kernel daemon process, the user device includes a user device port and a user device control module, and the CPE device sends a registration online message to the central control terminal through the CPE port; the kernel daemon process establishes a connection with the serial interface of the CPE device, and establishes multiple kernel function boot modules (i.e. Figure 3 The user device control module generates the control message, and the data transmission channel is established between the user device control module and the kernel daemon process. The data transmission channel is directly established between the user device control module and the kernel daemon process, without middleware, and with low resource overhead.
[0051] Specifically, there is no restriction on user equipment ports and they need to be in the same device. The number of user equipment ports and external bandwidth can support large-scale deployment and observe system information.
[0052] In one embodiment of the present application, the above method also includes: the above kernel daemon process calls the above kernel function boot module according to the above control message to control the serial interface of the above CPE device to complete the action corresponding to the above control message, so as to achieve the purpose that the kernel daemon process can control the serial interface of the above CPE device to complete the action corresponding to the above control message through the above control message.
[0053] The embodiment of the present application also provides a remote control system. It should be noted that the remote control system of the embodiment of the present application can be used to execute the method for remotely controlling a CPE device provided in the embodiment of the present application. The remote control system provided in the embodiment of the present application is introduced below.
[0054] Figure 2 is a first schematic diagram of a remote control system according to an embodiment of the present application, Figure 3 is a second schematic diagram of a remote control system according to an embodiment of the present application. Figure 2 and 3 As shown, the system includes a CPE device, a user device and a central control terminal, and the central control terminal includes: a receiving unit 10, a determining unit 20 and a processing unit 30;
[0055] The receiving unit 10 is used to receive the registration connection information of the CPE device and the user equipment;
[0056] The determination unit 20 is used to determine the connection mode of the CPE device according to the registration connection information of the CPE device;
[0057] The processing unit 30 is used for receiving the control message sent by the user equipment, forwarding the control message to the CPE device, and establishing a data transmission channel between the CPE device and the user equipment according to the connection mode of the CPE device.
[0058] In the above-mentioned device, the control message sent by the above-mentioned user equipment is received according to the above-mentioned receiving unit, and the processing unit forwards the above-mentioned control message to the above-mentioned CPE device, and a data transmission channel is established between the above-mentioned CPE device and the above-mentioned user equipment according to the online mode of the above-mentioned CPE device, a control relationship between the user equipment and the CPE device is established through the control message, and data for controlling the CPE device to perform specific operations is transmitted through the data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art.
[0059] In one embodiment of the present application, the above-mentioned determination unit includes a first determination module, a second determination module and a third determination module. The first determination module is used to determine that the online mode of the above-mentioned CPE device is the first online mode when the registration online message of the above-mentioned CPE device is the first registration online message; the second determination module is used to determine that the online mode of the above-mentioned CPE device is the second online mode when the registration online message of the above-mentioned CPE device is the second registration online message; the third determination module is used to determine that the online mode of the above-mentioned CPE device is the third online mode when the registration online message of the above-mentioned CPE device is the third registration online message; the purpose of determining that the online mode of the above-mentioned CPE device is the online mode corresponding to the above-mentioned registration online message is achieved by using different registration online messages.
[0060] In one embodiment of the present application, the third determination module includes a third determination submodule, which is used to determine that the online mode of the CPE device is the third online mode when the type of the socket is ipv6, and the third online mode is a mode with an ipv6 address; the second determination module includes a second determination submodule, which is used to determine that the online mode of the CPE device is the second online mode when the address of the wan ip is different from the address of the socket, and the second online mode is a mode of accessing the Internet through a telecommunications-grade NAT; the first determination module includes a first determination submodule, which is used to determine that the online mode of the CPE device is the first online mode when the address of the wan ip is the same as the address of the socket, and the first online mode is a mode with an ipv4 address; the purpose of determining the online mode of the CPE device by the type of the socket, the address of the socket and the address of the wanip is achieved.
[0061] In one embodiment of the present application, the CPE device includes a kernel daemon process, and the user device includes a user device control module. When the online mode of the CPE device is the second online mode, the online mode of the user device control module is the server mode, and the online mode of the kernel daemon process is the client mode. When the online mode of the CPE device is the first online mode or the third online mode, the online mode of the user device control module is the client mode, and the online mode of the kernel daemon process is the server mode. That is, the kernel daemon process of the CPE device and the user device including the user device control module are determined to be in client mode or server mode according to the online mode of the CPE device. The role conversion between the client mode and the server mode can solve the problem of NAT penetration.
[0062] In one embodiment of the present application, the registration online message of the above-mentioned CPE device includes the mac address and online status of the CPE device, the registration online message of the above-mentioned user device includes the mac address and online status of the user device, the above-mentioned central control end stores an authorization list, and the above-mentioned central control end also includes a first processing unit and a second processing unit. The first processing unit is used to determine that the above-mentioned CPE device is a registered device when the mac address of the above-mentioned CPE device is in the above-mentioned authorization list and the online status of the above-mentioned CPE device is online; the second processing unit is used to determine that the above-mentioned user device is a registered device when the mac address of the above-mentioned user device is in the above-mentioned authorization list and the online status of the above-mentioned user device is online.
[0063] In one embodiment of the present application, the determination unit further includes a fourth determination module and a first processing module, and the central control terminal sends an online status detection signal to the CPE device and the user device at a predetermined time interval; the fourth determination module is used to determine that the CPE device and the user device are unregistered devices if no reply signal is received from the CPE device and the user device within a predetermined time period; the first processing module is used to increase the predetermined time interval if the reply signal of the CPE device and the user device is received N times in a row, and determine that the CPE device and the user device are unregistered devices or increase the predetermined time interval by judging whether the reply signal of the CPE device and the user device is received within the predetermined time period. Wherein, N>2. Wherein, the predetermined time interval can be set to 2ms, 5ms, 10ms, etc., and the predetermined time period can be set to 30ms, 60ms, 90ms, etc. Specifically, if reply signals from the CPE device and the user device are received five times in a row, it proves that the communication is good. At this time, the predetermined time interval can be appropriately increased. For example, the predetermined time interval can be increased from 2ms to 5ms. After increasing to 5ms, reply signals from the CPE device and the user device are received five times in a row. At this time, the predetermined time interval continues to be increased, and so on.
[0064] In one embodiment of the present application, the determination unit further includes a second processing module, which is used to set the predetermined time interval to a maximum time interval when the online mode of the CPE device is the first online mode or the third online mode. That is, when the online mode is an IPv4 address mode or an IPv6 address mode, directly setting the predetermined time interval to the maximum time interval can ensure normal communication. Specifically, the maximum time interval can be 30ms.
[0065] The above remote control system includes a processor and a memory. The above receiving unit, determining unit and processing unit are all stored in the memory as program units. The processor executes the above program units stored in the memory to realize corresponding functions.
[0066] The processor includes a kernel, and the kernel calls the corresponding program unit from the memory. One or more kernels can be set, and the problem of large resource overhead of the reverse SSH tunnel in the prior art can be solved by adjusting kernel parameters.
[0067] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0068] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for remotely controlling a CPE device.
[0069] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for remotely controlling a CPE device is executed when the program is run.
[0070] An embodiment of the present application also provides a remote control system, which includes: a CPE device, a user device and a central control terminal, wherein the central control terminal communicates with the CPE device and the user device respectively, and the central control terminal is used to execute any one of the above methods.
[0071] The embodiment of the present invention provides a device, the device includes a processor, a memory and a program stored in the memory and can be run on the processor, and the processor implements at least the following steps when executing the program: the central control terminal receives the registration connection message of the CPE device and the user device; the central control terminal determines the connection mode of the CPE device according to the registration connection message of the CPE device; the central control terminal receives the control message sent by the user device and forwards the control message to the CPE device, and the central control terminal establishes a data transmission channel between the CPE device and the user device according to the connection mode of the CPE device. The device in this article can be a server, PC, PAD, mobile phone, etc.
[0072] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps: the central control end receives registration online messages from the CPE device and the user device; the central control end determines the online mode of the CPE device according to the registration online messages of the CPE device; the central control end receives a control message sent by the user device, and forwards the control message to the CPE device, and the central control end establishes a data transmission channel between the CPE device and the user device according to the online mode of the CPE device.
[0073] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0074] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0075] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0077] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0078] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0079] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0080] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0081] Example
[0082] This embodiment relates to a solution for remotely controlling a CPE device. Figure 4 is a flowchart of the registration of the CPE device port and the user device port with the central control terminal according to an embodiment of the present application, Figure 5 1 is a flow chart of establishing a data tunnel from the user equipment port to the CPE equipment port according to an embodiment of the present application, such as Figure 4 and 5 As shown, the above solution is applied to a remote control system, which includes a CPE device, a user device and a central control terminal. The solution includes the following steps:
[0083] Step 1: The central control terminal receives registration connection information of the CPE device and the user device;
[0084] Step 2: When the address of the wan ip is the same as the address of the socket, the connection mode of the CPE device is determined to be the first connection mode, and the first connection mode is a mode with an ipv4 address; when the address of the wan ip is different from the address of the socket, the connection mode of the CPE device is determined to be the second connection mode, and the second connection mode is a mode of accessing the Internet through a carrier-grade NAT; when the type of the socket is ipv6, the connection mode of the CPE device is determined to be the third connection mode, and the third connection mode is a mode with an ipv6 address;
[0085] Specifically, Figure 4 As shown, when the CPE device port and the user device port register with the central control terminal:
[0086] ACE (AgileRemote CPE Endpoint, i.e., CPE device port) authenticates ACC (AgileRemote Ctrl Center, i.e., central control terminal) through TLV (Type-length-value, i.e., a message format BER encoding, where the T field indicates the message type, the L field indicates the message length, and the V field is often used to store the message content). ACC determines the CPE connection mode based on the authentication message, wherein the above CPE connection mode includes but is not limited to: 1. CPE (CPE device) accesses the Internet through CGN (carrier-grade NAT); 2. CPE has an ipv6 global unicast address; 3. CPE has an ipv4 public IP address; in addition, AWE (AgileRemote Windows Endpoint, i.e., user device port) authenticates ACC (AgileRemote Ctrl Center, i.e., central control terminal) through TLV, and AWE maintains connection to ACC through keepalive packets; ACE maintains connection to ACC through keep alive packets. alive is an abstract component: it does not render a DOM element itself, nor does it appear in the parent component chain; when a dynamic component is wrapped with keep alive, inactive component instances are cached instead of being destroyed) and the package remains online to the ACC.
[0087] Step 3: The central control terminal sends an online status detection signal to the CPE device and the user device at a predetermined time interval; if no reply signal is received from the CPE device and the user device within the predetermined time period, the CPE device and the user device are determined to be unregistered devices; if the reply signal is received from the CPE device and the user device N times in succession, the predetermined time interval is increased;
[0088] Step 4: When the online mode of the CPE device is the first online mode or the third online mode, setting the predetermined time interval to a maximum time interval;
[0089] Step 5: The central control terminal receives the control message sent by the user equipment, and forwards the control message to the CPE device, and the central control terminal establishes a data transmission channel between the CPE device and the user equipment according to the connection mode of the CPE device.
[0090] Specifically, Figure 5 As shown, when the user equipment port establishes a data tunnel (data transmission channel) to the CPE device port:
[0091] 1. AWE (AgileRemote Windows Endpoint, i.e., user equipment port) queries ACC (AgileRemoteCtrl Center, i.e., central control terminal) for the online mode of CPE (CPE device);
[0092] 2. AWE establishes the connection mode of AWC (AgileRemote Windows Console, i.e., user device control module) and AKD (AgileRemote Kernel Daemon, i.e., kernel daemon) according to the connection mode of CPE, and sends a connection request to ACE through ACC. This request includes the connection mode required by AKD.
[0093] 3. AWE initiates a connection request to ACE (AgileRemote CPE Endpoint, i.e. CPE device port) through ACC;
[0094] 4. ACC forwards AWE's connection request and connection information;
[0095] 5. ACE establishes AKD's online mode according to AWE's online request;
[0096] 6.AKD registers multiple hook functions to the kernel;
[0097] 7. ACC forwards ACE's connection response to AWE, and connects it to AKD through the connection response;
[0098] 8. Establish Date Tunnel (data transmission channel);
[0099] 9. AWC performs various operations on the kernel hook (kernel function boot module) of CPE through AKD.
[0100] In the above steps, the online mode of the CPE device is determined according to the registration online message of the CPE device, the control message is forwarded to the CPE device, a control relationship between the user device and the CPE device is established through the control message, and data for controlling the CPE device to perform specific operations is transmitted through the data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art.
[0101] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0102] 1) The method for remotely controlling a CPE device of the present application determines the online mode of the CPE device according to the registration online message of the CPE device, forwards the control message to the CPE device, establishes a control relationship between the user device and the CPE device through the control message, and transmits data for controlling the CPE device to perform specific operations through a data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art.
[0103] 2) The remote control system of the present application receives the control message sent by the user device through the receiving unit, and the processing unit forwards the control message to the CPE device, and establishes a data transmission channel between the CPE device and the user device according to the online mode of the CPE device, establishes a control relationship between the user device and the CPE device through the control message, and transmits data for controlling the CPE device to perform specific operations through the data transmission channel, thereby realizing remote control of the CPE device and solving the problem of large resource overhead of the reverse SSH tunnel in the prior art.
[0104] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for remotely controlling a CPE device, It is characterized in that The method is applied to a remote control system, which includes a CPE device, a user device and a central control terminal, including: The central control terminal receives registration connection messages of the CPE device and the user equipment; The central control terminal determines the online mode of the CPE device according to the registration online message of the CPE device; The central control end receives the control message sent by the user equipment, and forwards the control message to the CPE device, and the central control end establishes a data transmission channel between the CPE device and the user equipment according to the online mode of the CPE device; The registration connection information of the CPE device includes a socket and a wan ip; The central control terminal determines the connection mode of the CPE device according to the registration connection message of the CPE device, including: In the case where the registration connection message of the CPE device is a third registration connection message, determining that the connection mode of the CPE device is a third connection mode includes: in the case where the type of the socket is ipv6, determining that the connection mode of the CPE device is the third connection mode, and the third connection mode is a mode with an ipv6 address; When the registration connection message of the CPE device is a second registration connection message, determining that the connection mode of the CPE device is a second connection mode includes: when the address of the wan ip and the address of the socket are different, determining that the connection mode of the CPE device is the second connection mode, and the second connection mode is an Internet access mode through a carrier-grade NAT; When the registration connection message of the CPE device is the first registration connection message, determining the connection mode of the CPE device as the first connection mode includes: when the address of the wan ip and the address of the socket are the same, determining the connection mode of the CPE device as the first connection mode, and the first connection mode is a mode with an ipv4 address.
2. The method according to claim 1, It is characterized in that The CPE device includes a kernel daemon process, and the user equipment includes a user equipment control module. When the online mode of the CPE device is the second online mode, the online mode of the user equipment control module is the server mode, and the online mode of the kernel daemon process is the client mode. When the online mode of the CPE device is the first online mode or the third online mode, the online mode of the user equipment control module is the client mode, and the online mode of the kernel daemon process is the server mode.
3. The method according to claim 1 or 2, It is characterized in that The registration online message of the CPE device includes the MAC address and online status of the CPE device, the registration online message of the user device includes the MAC address and online status of the user device, the central control terminal stores an authorization list, and the method further includes: When the MAC address of the CPE device is in the authorization list and the online status of the CPE device is online, determining that the CPE device is a registered device; When the MAC address of the user device is in the authorization list and the online status of the user device is online, the user device is determined to be a registered device.
4. The method according to claim 1, It is characterized in that The method further comprises: The central control terminal sends an online status detection signal to the CPE device and the user equipment at a predetermined time interval; If no reply signal is received from the CPE device and the user equipment within a predetermined time period, determining that the CPE device and the user equipment are unregistered devices; If the reply signals from the CPE device and the user equipment are received N times in succession, the predetermined time interval is increased, wherein N>2.
5. The method according to claim 4, It is characterized in that The method further comprises: When the online mode of the CPE device is the first online mode or the third online mode, the predetermined time interval is set to a maximum time interval.
6. A method for remotely controlling a CPE device, It is characterized in that The method is applied to a remote control system, which includes a CPE device, a user device and a central control terminal, including: The CPE device sends a registration connection message to the central control terminal; The user equipment sends a registration connection message to the central control terminal; The central control terminal determines the online mode of the CPE device according to the registration online message of the CPE device; The user equipment sends a control message to the central control end, the central control end forwards the control message to the CPE device, and the central control end establishes a data transmission channel between the CPE device and the user equipment according to the online mode of the CPE device; The registration connection information of the CPE device includes a socket and a wan ip; The central control terminal determines the connection mode of the CPE device according to the registration connection message of the CPE device, including: In the case where the registration connection message of the CPE device is a third registration connection message, determining that the connection mode of the CPE device is a third connection mode includes: in the case where the type of the socket is ipv6, determining that the connection mode of the CPE device is the third connection mode, and the third connection mode is a mode with an ipv6 address; When the registration connection message of the CPE device is a second registration connection message, determining that the connection mode of the CPE device is a second connection mode includes: when the address of the wan ip and the address of the socket are different, determining that the connection mode of the CPE device is the second connection mode, and the second connection mode is an Internet access mode through a carrier-grade NAT; When the registration connection message of the CPE device is the first registration connection message, determining the connection mode of the CPE device as the first connection mode includes: when the address of the wan ip and the address of the socket are the same, determining the connection mode of the CPE device as the first connection mode, and the first connection mode is a mode with an ipv4 address.
7. The method according to claim 6, It is characterized in that The CPE device includes a CPE port and a kernel daemon process, and the user equipment includes a user equipment port and a user equipment control module. The CPE device sends a registration connection message to the central control terminal through the CPE port; The kernel daemon process establishes a connection with the serial interface of the CPE device and establishes a plurality of kernel function boot modules; Sending a registration online message of the user equipment to the central control terminal through the user equipment port; The user equipment control module generates the control message and establishes the data transmission channel between the user equipment control module and the kernel daemon process.
8. The method according to claim 7, It is characterized in that The method further comprises: The kernel daemon process calls the kernel function boot module according to the control message to control the serial interface of the CPE device to complete the action corresponding to the control message.
9. A remote control system, It is characterized in that include: CPE equipment, user equipment and central control terminal, the central control terminal includes: A receiving unit, configured to receive registration connection messages between the CPE device and the user equipment; A determination unit, configured to determine an online mode of the CPE device according to a registration online message of the CPE device; A processing unit, configured to receive a control message sent by the user equipment, forward the control message to the CPE device, and establish a data transmission channel between the CPE device and the user equipment according to an online mode of the CPE device; The registration connection information of the CPE device includes a socket and a wan ip; The determining unit includes a first determining module, a second determining module and a third determining module, The third determination module is used to determine that the connection mode of the CPE device is a third connection mode when the registration connection message of the CPE device is a third registration connection message; The third determination module includes a third determination submodule, and the third determination submodule is used to determine that the online mode of the CPE device is the third online mode when the type of the socket is ipv6, and the third online mode is a mode with an ipv6 address; The second determination module is used for determining that the online mode of the CPE device is the second online mode when the registration online message of the CPE device is the second registration online message; Wherein, the second determination module includes a second determination submodule, and the second determination submodule is used to determine that the online mode of the CPE device is a second online mode when the address of the wanip and the address of the socket are different, and the second online mode is an Internet access mode through a carrier-grade NAT; The first determination module is used to determine that the online mode of the CPE device is the first online mode when the registration online message of the CPE device is the first registration online message; Among them, the first determination module includes a first determination submodule, and the first determination submodule is used to determine that the online mode of the CPE device is a first online mode when the address of the wanip and the address of the socket are the same, and the first online mode is an ipv4 address mode.
10. A remote control system, It is characterized in that include: A CPE device, a user device and a central control terminal, wherein the central control terminal communicates with the CPE device and the user device respectively, and the central control terminal is used to execute the method described in any one of claims 1 to 5.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 5.
12. A processor, It is characterized in that The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 5 when running.
