CN112804282A - Method and system for controlling terminal equipment - Google Patents
Method and system for controlling terminal equipment Download PDFInfo
- Publication number
- CN112804282A CN112804282A CN201911117719.2A CN201911117719A CN112804282A CN 112804282 A CN112804282 A CN 112804282A CN 201911117719 A CN201911117719 A CN 201911117719A CN 112804282 A CN112804282 A CN 112804282A
- Authority
- CN
- China
- Prior art keywords
- connection channel
- control instruction
- terminal device
- terminal equipment
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000012546 transfer Methods 0.000 claims abstract description 57
- 238000004590 computer program Methods 0.000 claims description 11
- 230000008901 benefit Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 238000007405 data analysis Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005406 washing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a method for controlling terminal equipment, because the transfer equipment sends a notice to the terminal equipment through a long connecting channel based on a control instruction in a cache, so as to inform the terminal equipment that the control instruction belonging to the terminal equipment is cached in the transfer equipment, the terminal equipment sends an instruction request to the transfer equipment after receiving the notice, and the transfer equipment sends the cached instruction to the terminal equipment through a short connection after receiving the instruction request. Therefore, the instruction request of the terminal equipment can not be frequently received no matter whether the relay equipment has the control instruction belonging to the terminal equipment or not, as in the prior art, so that the invalid instruction request can be prevented from being frequently received, and the network resource can be saved.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for controlling a terminal device.
Background
With the continuous development of science and technology, electronic technology has also gained rapid development, and the variety of electronic products is also more and more, and people also enjoy various conveniences brought by the development of science and technology. People can enjoy comfortable life and work brought along with the development of science and technology through various types of terminals. For example, mobile terminals such as smart phones and tablet computers have become an important part of people's lives, and users can listen to music and play games by using the mobile terminals such as smart phones and tablet computers, so as to relieve pressure brought by modern fast-paced lives.
In the prior art, in the internet of things technology, a relay device serving as an instruction relay and distribution device and a terminal device generally adopt a wireless connection mode, the terminal device sends an instruction request to the relay device to inquire whether a control instruction belongs to the terminal device, and when the control instruction exists in the relay device, the control instruction is sent to the terminal device, so that the terminal device executes corresponding operation. However, when most of the terminal devices send requests, the terminal devices frequently send instruction requests to the relay device because the relay device does not have a control instruction of the terminal device, and the relay device frequently receives invalid instruction requests until the control instruction is obtained, so that the network resources are excessively occupied, and the network resources are wasted.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method and system for controlling a terminal device that overcomes or at least partially solves the above-mentioned problems.
In one aspect of the present invention, a method for controlling a terminal device is provided, where the method is used for a transit device, and a control instruction set is prestored in a cache of the transit device; the method comprises the following steps:
generating a notification based on a target control instruction for the terminal device in the control instruction set;
sending the notification to the terminal equipment through a long connection channel, so that the terminal equipment sends an instruction request for requesting the target control instruction to the transfer equipment through a short connection channel after receiving the notification;
and after receiving the instruction request, sending the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction.
Optionally, a long connection channel protocol is provided between the relay device and the terminal device;
before the sending the notification to the terminal device through the long connection channel, the method further includes:
based on a long connection channel protocol, establishing the long connection channel with the terminal equipment;
and if the long connection channel is successfully established, executing the step of sending the notification to the terminal equipment through the long connection channel.
Optionally, after the long connection channel is established with the terminal device based on the long connection channel protocol, the method further includes:
and if the long connection channel is failed to be established, continuing to establish the long connection channel with the terminal equipment according to a preset time interval until the long connection channel is established.
Optionally, after the long connection channel is established with the terminal device based on the long connection channel protocol, the method further includes:
and if the long connection channel is failed to be established, receiving the instruction request through the short connection channel.
Optionally, the instruction request carries a characteristic parameter of the terminal device;
after receiving the command request, the sending the target control command to the terminal device through the short connection channel specifically includes:
after the instruction request is received, determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request;
and sending the target control instruction to the terminal equipment through the short connection channel.
Optionally, after receiving the instruction request, the method further includes sending a control instruction matching the terminal device in the control instruction set to the terminal device through the short connection channel, so that the terminal device executes an operation matching the control instruction, where the method further includes:
and receiving result data and/or state data of the terminal equipment executing the operation through the short connection channel.
Optionally, after receiving result data and/or status data of the terminal device performing the operation, the method further includes:
and storing the result data and/or the state data of the operation in the transfer equipment.
In another aspect of the present invention, a system for controlling a terminal device is provided based on another embodiment of the present application, and is configured to control a transit device, where a cache of the transit device is pre-stored with a control instruction set; the system comprises:
a generation notification module, configured to generate a notification based on a target control instruction for the terminal device in the control instruction set;
a sending notification module, configured to send the notification to the terminal device through a long connection channel, so that after receiving the notification, the terminal device sends an instruction request for requesting the target control instruction to the transfer device through a short connection channel;
and the instruction sending module is used for sending the target control instruction to the terminal equipment through the short connection channel after receiving the instruction request so as to enable the terminal equipment to execute the operation matched with the target control instruction. .
Optionally, the system further includes:
a first channel establishing module, configured to establish a long connection channel with the terminal device based on the long connection channel protocol before the notification is sent to the terminal device through the long connection channel;
the sending notification module is further configured to execute the step of sending the notification to the terminal device through the long connection channel if the long connection channel is successfully established.
Optionally, the system further includes:
and the first channel establishing module is used for continuing establishing the long connecting channel with the terminal equipment according to a preset time interval if the long connecting channel is failed to be established until the long connecting channel is established.
Optionally, the system further includes:
and the request receiving module is used for receiving the instruction request through the short connection channel if the long connection channel is failed to be established.
Optionally, the instruction request carries a characteristic parameter of the terminal device;
the instruction sending module specifically includes:
the instruction determining module is used for determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request after receiving the instruction request;
and the sending instruction submodule is used for sending the target control instruction to the terminal equipment through the short connection channel.
Optionally, the system further includes:
and the data receiving module is used for sending the control instruction matched with the terminal equipment in the control instruction set to the terminal equipment through the short connection channel after the instruction request is received, so that after the terminal equipment executes the operation matched with the control instruction, the result data and/or the state data of the operation executed by the terminal equipment are received through the short connection channel.
Optionally, the system further includes:
and the data caching module is used for storing the result data and/or the state data of the operation in the transfer equipment.
The invention discloses a readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention discloses a relay device, comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the steps of the method.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
the method is used for transferring equipment, wherein a control instruction set is prestored in a cache of the transferring equipment; the method comprises the following steps: generating a notification based on a target control instruction for the terminal device in the control instruction set; sending the notification to the terminal equipment through a long connection channel, so that the terminal equipment sends an instruction request for requesting the target control instruction to the transfer equipment through a short connection channel after receiving the notification; and after receiving the instruction request, sending the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction. Because the transfer equipment sends a notice to the terminal equipment through the long connection channel based on the control instruction in the cache to inform the terminal equipment that the control instruction belonging to the terminal equipment is cached in the transfer equipment, the terminal equipment sends an instruction request to the transfer equipment after receiving the notice, and the transfer equipment sends the cached instruction to the terminal equipment through the short connection after receiving the instruction request. Therefore, the instruction request of the terminal equipment can not be frequently received no matter whether the relay equipment has the control instruction belonging to the terminal equipment or not, as in the prior art, so that the invalid instruction request can be prevented from being frequently received, and the network resource can be saved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flow chart of a method of controlling a terminal device according to an embodiment of the invention;
fig. 2 shows a block diagram of a system configuration for controlling a terminal device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method and a system for controlling terminal equipment, which are used for solving the technical problem of network resource waste in the prior art.
In the prior art, there are several methods for controlling a terminal device:
1) short-distance point-to-point control based on Bluetooth;
2) controlling based on wifi of a local area network; for example: air conditioners, washing machines, refrigerators, televisions, etc.;
the prior art has the defects that:
terminal control based on bluetooth or wifi has the condition restriction of distance and environment, and more realize the point-to-point control function between the special equipment, and scalability is weak, can not reach platform nature access and management.
Therefore, in the technical field of internet of things, in order to realize remote multi-terminal device control, in the prior art, a cloud control terminal is used, but generally a relay device is required to relay and distribute a cloud instruction.
Specifically, in the prior art, the interaction mode between the transfer device and the terminal device is as follows: the transfer device receives a control instruction sent by the cloud to the terminal device, and the terminal device sends an instruction request to the transfer device to inquire whether the transfer device has the control instruction of the terminal device or not. However, when most of the terminal devices send requests, the terminal devices frequently send instruction requests to the relay device because the relay device does not have a control instruction of the terminal device, and the relay device frequently receives invalid instruction requests until the control instruction is obtained, so that the network resources are excessively occupied, and the network resources are wasted.
It can be seen from the analysis that the existing defects in the prior art are that the existing terminal devices all send request commands to the relay device through the short connection, and the network mechanism of the short connection determines that only the terminal devices can send command requests to the relay device to obtain the control commands.
In view of the defects of the prior art, the present application provides a method for controlling a terminal device through a relay device, and the following describes a technical solution of the present invention in detail with a plurality of embodiments.
Example one
According to the method for controlling the terminal equipment, a control instruction set is prestored in a cache of the transfer equipment; referring to fig. 1, the method specifically includes the following steps:
s101, generating a notification based on a target control instruction aiming at the terminal equipment in the control instruction set;
s102, sending the notification to the terminal equipment through a long connection channel, so that the terminal equipment sends an instruction request for requesting the target control instruction to the transfer equipment through a short connection channel after receiving the notification;
s103, after the instruction request is received, the target control instruction is sent to the terminal equipment through the short connection channel, so that the terminal equipment executes the operation matched with the target control instruction.
It should be noted that the control instruction set pre-stored in the cache of the transit device may be a set formed by control instructions for the terminal device, which are generated by cloud editing, and may include one control instruction or multiple control instructions. After caching, the transit device can generate a corresponding notification.
The transfer device interacting with the terminal in this embodiment may also be a cloud device or a cloud server, but at this time, the cloud device or the cloud server does not have a function of generating a control instruction, and can only receive the control instruction sent by the third party, perform caching, or distribute the control instruction to the terminal device. Therefore, in this embodiment, the device is defined as a relay device, but the device is not limited thereto.
The steps of the method of this embodiment are explained in detail below with reference to fig. 1.
First, S101 is executed to generate a notification based on a target control instruction for the terminal device in the control instruction set.
First, the notification is used to notify the terminal device that a target control command for the terminal device is in the relay device, and therefore, the notification must be generated based on the target control command for the terminal device in the control command set, and is purposefully sent to the corresponding terminal device.
Secondly, the notification can be based on the same control command, a notification is generated and sent to all the terminal devices; alternatively, a plurality of notifications may be generated based on different control commands and sent to different terminal devices.
Then, S102 is executed, and the notification is sent to the terminal device through the long connection channel, so that the terminal device sends an instruction request for requesting the target control instruction to the relay device through the short connection channel after receiving the notification.
It should be noted that, in the communication field, when the network communication uses the TCP protocol, before the actual read/write operation, a connection, i.e. a long connection and a short connection, must be established between the server and the client based on the protocol.
A long connection is a connection in which a plurality of packets can be transmitted continuously over one TCP connection, and if no packets are transmitted during the time that the TCP connection is maintained, both of them need to transmit a detection packet to maintain the connection. The connection mechanism is as follows: connection → data transfer → hold connection (heartbeat) → … … → close connection. This requires that long connections send data packets (heartbeats) at regular intervals when there is no data communication to maintain the connection; in the case of a long connection, the TCP connection between the client and the server for the HTTP data is not closed, and if the client accesses the web page on the server again, the already established connection is used again.
The short connection means that when two communication parties have data interaction, a TCP connection is established, and after the data transmission is completed, the TCP connection is disconnected (the management is simpler, the existing connections are all useful connections, and no additional control means is needed); the connection mechanism is as follows: connection → data transfer → close connection.
In the prior art, the command request defaults to the use of a short connection channel.
Since the long connection path has the connection holding function, it is not necessary to establish a connection path every time a notification is sent, and when there are a plurality of notifications, a plurality of notifications can be quickly sent to the terminal device and can be timely notified to the terminal device. After receiving the notification, the terminal device sends an instruction request for requesting the target control instruction to the transfer device through the short connection channel so as to acquire the target control instruction as early as possible, thereby improving the timeliness of terminal device management and avoiding the waste of cache space resources caused by overlong control instruction cache time.
Next, S103 is executed, and after receiving the instruction request, the target control instruction is sent to the terminal device through the short connection channel, so that the terminal device executes an operation matched with the target control instruction.
It should be noted that, unlike the prior art, the terminal device does not directly send the instruction request to the relay device, but sends the instruction request to the relay device in response to the notification sent by the relay device after receiving the notification, thereby avoiding many invalid instruction requests. And because the connection mechanism of the short connection is connection → data transmission → connection closing, that is, the connection is reestablished every time data is sent, the network response is slow, time is consumed, and the frequent and invalid instruction requests consume more network resources.
The notification is sent to the terminal device through the long connection channel, but cannot be sent to the terminal through the short connection of the prior art.
The foregoing has been used to explain the overall technical solutions, principles, and effects of the present invention, and after understanding the above solutions, it should be noted that there may be a plurality of terminal devices in the present invention, and the relay device may send the same control command to a plurality of terminal devices or send different control commands, and the following description is directed to two special cases.
In the first case:
n terminal devices are provided, wherein N is more than or equal to 2; the control instruction set comprises N control instructions which are respectively matched with each terminal device;
according to the method of the invention, firstly, based on the N control instructions, generating corresponding N notifications;
then, the N notifications are respectively sent to the corresponding N terminal devices through the long connection channel, so that the N terminal devices send corresponding N instruction requests to the transfer device through the short connection channel after receiving the notifications;
and finally, after the N instruction requests are received, the N control instructions are respectively sent to the N corresponding terminal devices through the short connection channel according to the characteristic parameters of each terminal device, so that each terminal device executes the operation matched with the received control instruction.
That is, the relay device sends different control instructions to different terminal devices.
In the second case:
the number of the terminal devices is N, N is more than or equal to 2, and the control instruction set comprises 1 control instruction matched with each terminal device;
then, according to the method of the present invention, first, based on the control instruction, the corresponding 1 notification is generated:
then, the notification is sent to each terminal device through the long connection channel, so that each terminal device sends an instruction request to the transfer device through the short connection channel after receiving the notification;
and finally, after the instruction request is received, sending the control instruction matched with the terminal equipment in the control instruction set to each terminal equipment through the short connection channel so that each terminal equipment executes the operation matched with the control instruction.
That is, the relay device transmits the same control instruction to different terminal devices.
In both the first and second cases, after receiving the command request, the control command matched with the terminal device needs to be selected from the control command set, so as to realize accurate control of different terminal devices.
In order to solve the above problem, as an optional implementation manner, the instruction request carries a characteristic parameter of the terminal device;
then, after receiving the instruction request, sending the target control instruction to the terminal device through the short connection channel, specifically including:
after the instruction request is received, determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request;
and sending the target control instruction to the terminal equipment through the short connection channel.
As mentioned above, in order to quickly send the notification to the terminal device, a long connection channel needs to be established, and for this reason, as an alternative implementation, the relay device and the terminal device have a long connection channel protocol therebetween;
before said sending said notification to said terminal device over said long connection channel, said method further comprises:
based on the long connection channel protocol, establishing a long connection channel with the terminal equipment;
as one of the cases, if the long connection path is successfully established, the step of sending the notification to the terminal device through the long connection path is performed.
As another situation, if the long connection path is failed to be established, the long connection path is continuously established with the terminal device according to a preset time interval until the long connection path is established.
It should be noted that a long connection, although having a connection holding function, does not permanently hold a connection, and it has a holding time that can be set in different server software (e.g., Apache).
Meanwhile, under the condition of bad network, the condition that the long connection channel cannot be established exists. Therefore, in order to realize quick transmission of the notification, if the long connection channel is failed to be established, the long connection channel is continuously established with the terminal device according to a preset time interval until the long connection channel is established.
In addition, in order to ensure that the control instruction can be sent to the terminal device when the long connection path cannot be established, as an optional implementation manner, after the long connection path is established with the terminal device based on the long connection path protocol, the method further includes:
and if the long connection channel is failed to be established, receiving the instruction request through the short connection channel.
As an optional implementation manner, after the receiving the instruction request, sending a control instruction matched with the terminal device in the control instruction set to the terminal device through the short connection channel, so that the terminal device performs an operation matched with the control instruction, the method further includes:
and receiving result data and/or state data of the terminal equipment executing the operation through the short connection channel.
The operation result data and/or the operation state data can be sent to the cloud end to be displayed, and data analysis can also be carried out by downloading, so that the analysis of the terminal equipment is facilitated.
As an optional implementation manner, after the receiving result data and/or status data of the terminal device performing the operation, the method further includes:
and storing the result data and/or the state data of the operation in the transfer equipment.
The operation result data and/or the operation state data can be sent to the cloud end to be displayed, and data analysis can also be carried out by downloading, so that the analysis of the terminal equipment is facilitated.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
the method of the embodiment is used for transfer equipment, wherein a control instruction set is prestored in a cache of the transfer equipment; a long connection channel protocol is arranged between the transfer equipment and the terminal equipment; the method comprises the following steps: generating a notification based on a target control instruction for the terminal device in the control instruction set; sending the notification to the terminal device through the long connection channel, so that the terminal device sends an instruction request for requesting the target control instruction to the transfer device through the short connection channel after receiving the notification; and after receiving the instruction request, sending the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction. Because the transfer equipment sends a notice to the terminal equipment through the long connection channel based on the control instruction in the cache to inform the terminal equipment that the control instruction belonging to the terminal equipment is cached in the transfer equipment, the terminal equipment sends an instruction request to the transfer equipment after receiving the notice, and the transfer equipment sends the cached instruction to the terminal equipment through the short connection after receiving the instruction request. Therefore, the instruction request of the terminal equipment can not be frequently received no matter whether the relay equipment has the control instruction belonging to the terminal equipment or not, as in the prior art, so that the invalid instruction request can be prevented from being frequently received, and the network resource can be saved.
Example two
Based on the same inventive concept as the first embodiment, the present embodiment provides a system for controlling a terminal device, configured to control a relay device, where a cache of the relay device pre-stores a control instruction set; referring to fig. 2, the system includes:
a generation notification module, configured to generate a notification based on a target control instruction for the terminal device in the control instruction set;
a sending notification module, configured to send the notification to the terminal device through a long connection channel, so that after receiving the notification, the terminal device sends an instruction request for requesting the target control instruction to the transfer device through a short connection channel;
and the instruction sending module is used for sending the target control instruction to the terminal equipment through the short connection channel after receiving the instruction request so as to enable the terminal equipment to execute the operation matched with the target control instruction. .
As an optional implementation manner, a long connection channel protocol is provided between the relay device and the terminal device;
the system, still include:
a first channel establishing module, configured to establish a long connection channel with the terminal device based on the long connection channel protocol before the notification is sent to the terminal device through the long connection channel;
the sending notification module is further configured to execute the step of sending the notification to the terminal device through the long connection channel if the long connection channel is successfully established.
As an optional implementation, the system further includes:
and the first channel establishing module is used for continuing establishing the long connecting channel with the terminal equipment according to a preset time interval if the long connecting channel is failed to be established until the long connecting channel is established.
As an optional implementation, the system further includes:
and the request receiving module is used for receiving the instruction request through the short connection channel if the long connection channel is failed to be established.
As an alternative embodiment, the
The instruction request carries the characteristic parameters of the terminal equipment;
the instruction sending module specifically includes:
the instruction determining module is used for determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request after receiving the instruction request;
and the sending instruction submodule is used for sending the target control instruction to the terminal equipment through the short connection channel.
As an optional implementation, the system further includes:
and the data receiving module is used for sending the control instruction matched with the terminal equipment in the control instruction set to the terminal equipment through the short connection channel after the instruction request is received, so that after the terminal equipment executes the operation matched with the control instruction, the result data and/or the state data of the operation executed by the terminal equipment are received through the short connection channel.
As an optional implementation, the system further includes:
and the data caching module is used for storing the result data and/or the state data of the operation in the transfer equipment.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
the system of the embodiment is used for transferring equipment, and a control instruction set is prestored in a cache of the transferring equipment; a long connection channel protocol is arranged between the transfer equipment and the terminal equipment; the method comprises the following steps: generating a notification based on a target control instruction aiming at the terminal equipment in the control instruction set by using a notification generation module; sending the notification to the terminal equipment through the long connection channel by using a sending notification module so that the terminal equipment sends an instruction request for requesting the target control instruction to the transfer equipment through a short connection channel after receiving the notification; and after receiving the instruction request, the instruction sending module sends the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction. Because the transfer equipment sends a notice to the terminal equipment through the long connection channel based on the control instruction in the cache to inform the terminal equipment that the control instruction belonging to the terminal equipment is cached in the transfer equipment, the terminal equipment sends an instruction request to the transfer equipment after receiving the notice, and the transfer equipment sends the cached instruction to the terminal equipment through the short connection after receiving the instruction request. Therefore, the instruction request of the terminal equipment can not be frequently received no matter whether the relay equipment has the control instruction belonging to the terminal equipment or not, as in the prior art, so that the invalid instruction request can be prevented from being frequently received, and the network resource can be saved.
Based on the same inventive concept as in the previous embodiments, embodiments of the present invention further provide a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method of an embodiment.
Based on the same inventive concept as in the foregoing embodiments, an embodiment of the present invention further provides a relay device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method according to the first embodiment are implemented.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of the readable storage medium, relay device, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or system programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several systems, several of these systems may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses A1 and a method for controlling terminal equipment, which is used for transfer equipment and is characterized in that a control instruction set is prestored in a cache of the transfer equipment; a long connection channel protocol is arranged between the transfer equipment and the terminal equipment; the method comprises the following steps:
generating a notification based on a target control instruction for the terminal device in the control instruction set;
sending the notification to the terminal device through the long connection channel, so that the terminal device sends an instruction request for requesting the target control instruction to the transfer device through the short connection channel after receiving the notification;
and after receiving the instruction request, sending the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction.
A2, the method as recited in A1, wherein before said sending the notification to the terminal device over the long connection channel, the method further comprises:
based on the long connection channel protocol, establishing a long connection channel with the terminal equipment;
and if the long connection channel is successfully established, executing the step of sending the notification to the terminal equipment through the long connection channel.
A3, the method as claimed in a2, wherein after the long connection channel establishment with the terminal device based on the long connection channel protocol, the method further comprises:
and if the long connection channel is failed to be established, continuing to establish the long connection channel with the terminal equipment according to a preset time interval until the long connection channel is established.
A4, the method as claimed in a2, wherein after the long connection channel establishment with the terminal device based on the long connection channel protocol, the method further comprises:
and if the long connection channel is failed to be established, receiving the instruction request through the short connection channel.
A5, the method as recited in a1, wherein the command request carries feature parameters of the terminal device;
after receiving the command request, the sending the target control command to the terminal device through the short connection channel specifically includes:
after the instruction request is received, determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request;
and sending the target control instruction to the terminal equipment through the short connection channel.
A6, the method as claimed in a1, wherein after the receiving the command request, sending a control command matching the terminal device in the control command set to the terminal device through the short connection channel, so as to make the terminal device execute the operation matching the control command, the method further comprises:
and receiving result data and/or state data of the terminal equipment executing the operation through the short connection channel.
A7, the method as claimed in A6, wherein after said receiving result data and/or status data of said operation performed by said terminal device, the method further comprises:
and storing the result data and/or the state data of the operation in the transfer equipment.
B8, a system for controlling a terminal device, configured to control a relay device, where a cache of the relay device is pre-stored with a control instruction set; a long connection channel protocol is arranged between the transfer equipment and the terminal equipment; the system comprises:
a generation notification module, configured to generate a notification based on a target control instruction for the terminal device in the control instruction set;
a sending notification module, configured to send the notification to the terminal device through the long connection channel, so that the terminal device sends, after receiving the notification, an instruction request for requesting the target control instruction to the transfer device through a short connection channel;
and the instruction sending module is used for sending the target control instruction to the terminal equipment through the short connection channel after receiving the instruction request so as to enable the terminal equipment to execute the operation matched with the target control instruction. .
B9, the system according to B8, characterized in that the system further comprises:
a first channel establishing module, configured to establish a long connection channel with the terminal device based on the long connection channel protocol before the notification is sent to the terminal device through the long connection channel;
the sending notification module is further configured to execute the step of sending the notification to the terminal device through the long connection channel if the long connection channel is successfully established.
B10, the system according to B9, characterized in that the system further comprises:
and the first channel establishing module is used for continuing establishing the long connecting channel with the terminal equipment according to a preset time interval if the long connecting channel is failed to be established until the long connecting channel is established.
B11, the system according to B9, characterized in that the system further comprises:
and the request receiving module is used for receiving the instruction request through the short connection channel if the long connection channel is failed to be established.
B12, the system according to B8, wherein the command request carries the feature parameters of the terminal device;
the instruction sending module specifically includes:
the instruction determining module is used for determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request after receiving the instruction request;
and the sending instruction submodule is used for sending the target control instruction to the terminal equipment through the short connection channel.
B13, the system according to B8, characterized in that the system further comprises:
and the data receiving module is used for sending the control instruction matched with the terminal equipment in the control instruction set to the terminal equipment through the short connection channel after the instruction request is received, so that after the terminal equipment executes the operation matched with the control instruction, the result data and/or the state data of the operation executed by the terminal equipment are received through the short connection channel.
B14, the system according to B13, characterized in that the system further comprises:
and the data caching module is used for storing the result data and/or the state data of the operation in the transfer equipment.
C15, a readable storage medium, having a computer program stored thereon, characterized in that the program, when being executed by a processor, is adapted to carry out the steps of the method according to any of the claims a1-a 7.
D16, a relay device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of a1-a7 when executing the program.
Claims (10)
1. A method for controlling terminal equipment is used for transfer equipment, and is characterized in that a control instruction set is prestored in a cache of the transfer equipment; the method comprises the following steps:
generating a notification based on a target control instruction for the terminal device in the control instruction set;
sending the notification to the terminal equipment through a long connection channel, so that the terminal equipment sends an instruction request for requesting the target control instruction to the transfer equipment through a short connection channel after receiving the notification;
and after receiving the instruction request, sending the target control instruction to the terminal equipment through the short connection channel so that the terminal equipment executes the operation matched with the target control instruction.
2. The method of claim 1, wherein the transit device has a long connection channel protocol with the terminal device;
before the sending the notification to the terminal device through the long connection channel, the method further includes:
based on the long connection channel protocol, establishing the long connection channel with the terminal equipment;
and if the long connection channel is successfully established, executing the step of sending the notification to the terminal equipment through the long connection channel.
3. The method of claim 2, wherein after the long connection channel establishment with the terminal device based on the long connection channel protocol, the method further comprises:
and if the long connection channel is failed to be established, continuing to establish the long connection channel with the terminal equipment according to a preset time interval until the long connection channel is established.
4. The method of claim 2, wherein after the long connection channel establishment with the terminal device based on the long connection channel protocol, the method further comprises:
and if the long connection channel is failed to be established, receiving the instruction request through the short connection channel.
5. The method of claim 1, wherein the command request carries a feature parameter of the terminal device;
after receiving the command request, the sending the target control command to the terminal device through the short connection channel specifically includes:
after the instruction request is received, determining the target control instruction from the control instruction set according to the characteristic parameters carried in the instruction request;
and sending the target control instruction to the terminal equipment through the short connection channel.
6. The method of claim 1, wherein after the receiving the command request, sending a control command matching the terminal device in the control command set to the terminal device through the short connection channel, so that the terminal device performs an operation matching the control command, the method further comprises:
and receiving result data and/or state data of the terminal equipment executing the operation through the short connection channel.
7. The method of claim 6, wherein after said receiving result data and/or status data of said terminal device performing said operation, said method further comprises:
and storing the result data and/or the state data of the operation in the transfer equipment.
8. A system for controlling terminal equipment is used for controlling transfer equipment and is characterized in that a control instruction set is prestored in a cache of the transfer equipment; the system comprises:
a generation notification module, configured to generate a notification based on a target control instruction for the terminal device in the control instruction set;
a sending notification module, configured to send the notification to the terminal device through a long connection channel, so that after receiving the notification, the terminal device sends an instruction request for requesting the target control instruction to the transfer device through a short connection channel;
and the instruction sending module is used for sending the target control instruction to the terminal equipment through the short connection channel after receiving the instruction request so as to enable the terminal equipment to execute the operation matched with the target control instruction.
9. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. A relay device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any one of claims 1 to 7 are performed when the program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911117719.2A CN112804282A (en) | 2019-11-14 | 2019-11-14 | Method and system for controlling terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911117719.2A CN112804282A (en) | 2019-11-14 | 2019-11-14 | Method and system for controlling terminal equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112804282A true CN112804282A (en) | 2021-05-14 |
Family
ID=75803930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911117719.2A Withdrawn CN112804282A (en) | 2019-11-14 | 2019-11-14 | Method and system for controlling terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112804282A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340759A (en) * | 2010-07-19 | 2012-02-01 | 中国电信股份有限公司 | Communication terminal state acquisition method and system |
CN104468547A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Long connection establishing method, device and system |
CN104486291A (en) * | 2014-11-24 | 2015-04-01 | 北京奇虎科技有限公司 | Method, device and system for building connection |
WO2016182008A1 (en) * | 2015-05-13 | 2016-11-17 | 株式会社Nttドコモ | Notification control system, server device, communication terminal device, program, and notification control method |
CN106961368A (en) * | 2016-01-08 | 2017-07-18 | 九阳股份有限公司 | A kind of household electrical appliances Cloud Server method of work and household electrical appliances cloud server system method of work |
CN108011912A (en) * | 2016-11-11 | 2018-05-08 | 北京车和家信息技术有限责任公司 | Control method for vehicle, server, car running computer equipment, terminal device and system |
CN108965400A (en) * | 2018-06-25 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of processing method of information, device, equipment and system |
-
2019
- 2019-11-14 CN CN201911117719.2A patent/CN112804282A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340759A (en) * | 2010-07-19 | 2012-02-01 | 中国电信股份有限公司 | Communication terminal state acquisition method and system |
CN104486291A (en) * | 2014-11-24 | 2015-04-01 | 北京奇虎科技有限公司 | Method, device and system for building connection |
CN104468547A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Long connection establishing method, device and system |
WO2016182008A1 (en) * | 2015-05-13 | 2016-11-17 | 株式会社Nttドコモ | Notification control system, server device, communication terminal device, program, and notification control method |
CN106961368A (en) * | 2016-01-08 | 2017-07-18 | 九阳股份有限公司 | A kind of household electrical appliances Cloud Server method of work and household electrical appliances cloud server system method of work |
CN108011912A (en) * | 2016-11-11 | 2018-05-08 | 北京车和家信息技术有限责任公司 | Control method for vehicle, server, car running computer equipment, terminal device and system |
CN108965400A (en) * | 2018-06-25 | 2018-12-07 | 阿里巴巴集团控股有限公司 | A kind of processing method of information, device, equipment and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112738805B (en) | Equipment control method and device, storage medium and electronic equipment | |
KR102095436B1 (en) | Request handling at the service layer | |
CN107277029B (en) | Remote procedure call method and device and computer equipment | |
CN107979493A (en) | Platform is construction method, server and the storage medium for servicing PAAS container platforms | |
CN106790629A (en) | Data synchronization unit and its realize the method for data syn-chronization, client access system | |
CN102981911B (en) | Distributed message handling system and device and method thereof | |
CN102904959B (en) | Network accelerating method and gateway | |
CN109302437B (en) | Method and device for redirecting website | |
CN112511598A (en) | Screen projection display method, intelligent terminal and storage medium | |
CN117312229B (en) | Data transmission device, data processing equipment, system, method and medium | |
US12041688B2 (en) | Screen projection method and system | |
CN115915289A (en) | Method, device, network element and medium for determining strategy or allocating resources of computing task | |
CN111600883A (en) | Vehicle diagnosis method and system, electronic equipment and storage medium | |
CN104639555B (en) | request processing method, system and device | |
CN110661673B (en) | Method and device for heartbeat detection | |
CN111245831B (en) | FTP data transmission method and device, and information interaction system of server and client | |
JP5610654B2 (en) | Apparatus for providing terminal management package and method for receiving terminal management package | |
CN111901395B (en) | Multi-cluster switching method and device | |
CN109711152A (en) | A kind of application keepalive method calculates equipment and storage medium | |
CN109981778B (en) | Method, device, equipment and storage medium for realizing service of content distribution network | |
CN112804282A (en) | Method and system for controlling terminal equipment | |
WO2018132557A1 (en) | Dynamic protocol switching | |
CN104301423A (en) | A method, device and system for sending heartbeat messages | |
CN118075278A (en) | Data transmission method, device, equipment and medium | |
CN117579664A (en) | A communication method, communication device and remote diagnosis system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210514 |