CN108391241B - Control method and system - Google Patents
Control method and system Download PDFInfo
- Publication number
- CN108391241B CN108391241B CN201711479462.6A CN201711479462A CN108391241B CN 108391241 B CN108391241 B CN 108391241B CN 201711479462 A CN201711479462 A CN 201711479462A CN 108391241 B CN108391241 B CN 108391241B
- Authority
- CN
- China
- Prior art keywords
- control
- server
- control instruction
- time sequence
- sequence number
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
- H04W4/14—Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/15—Setup of multiple wireless link connections
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention provides a control method and a system, which comprise a user side, a server side and a control side, and comprise the following steps: establishing connection between the server and the control end; the user side sends a service request to the control side; the server receives the control instruction group and executes the control instruction group or the server receives the control instruction and executes the control instruction; and the server returns an execution result to the control end. Compared with the prior art, the invention has the following beneficial effects: and based on the requirement of a remote control server, the remote control server can communicate with the equipment in a long distance. When the remote signal cannot reach the server, the Bluetooth function can be started through the user mobile terminal, and the Bluetooth close-range control scheme is automatically switched. Based on the intelligent power bank scheme, instructions for starting discharging and stopping discharging can be issued. Based on intelligent rack scheme, can issue and borrow precious instruction, the precious instruction of locking charge etc.. Based on the intelligent server scheme, the latest state data information of the hardware can be periodically acquired at regular time.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a control method and system.
Background
The current mature control scheme of the Internet of things generally adopts a short-distance scheme and a long-distance scheme, the short-distance scheme comprises WI-FI, Bluetooth, infrared and the like, the long-distance scheme is used for moving data, and the mobile data are distinguished (2G, 3G and 4G). The scheme adopts Bluetooth in a close range and adopts a scheme of mobile data 2G in a long range. Generally, a WI-FI and infrared alternating scheme is used in the field of intelligent home control, such as an intelligent air conditioner, and a scheme of using mobile data in some fields and scenes needing remote control.
Disclosure of Invention
In view of the defects in the prior art, the present invention aims to provide a control method and system capable of providing multiple communication modes.
In order to solve the above technical problem, the present invention provides a control method, which includes a user side, a server side and a control side, and includes the following steps:
establishing connection between the server and the control end;
the user side sends a service request to the control side;
the server receives the control instruction group and executes the control instruction group or the server receives the control instruction and executes the control instruction;
and the server returns an execution result to the control end.
Preferably, the step of the server receiving the control instruction group and executing the control instruction group or the step of the server receiving the control instruction and executing the control instruction comprises:
the control end sends a control instruction group to the server end after receiving the service request, and the server end executes the control instruction in the control instruction group sent by the control end; or
The user side sends a control instruction to the server side, and the server side executes the control instruction.
Preferably, the step of establishing a connection between the server and the controller includes:
the server side initiates an authentication request to the control side and simultaneously sends an initial time sequence to the control side;
and after the authentication is passed, the control end establishes connection with the service end.
Preferably, the step of sending the control instruction group to the server after the controller receives the service request includes:
the control end sends a control instruction group to the server end after receiving the service request, wherein the control instruction group at least comprises a short message control instruction and a data control instruction;
and the server executes the short message control instruction or the data control instruction in the control instruction group.
Preferably, the short message control instruction in the control instruction group sent to the server after the control end receives the service request at least comprises a short message time sequence number;
the data control instruction in the control instruction group sent to the server after the control end receives the service request at least comprises a data time sequence number;
the short message time sequence number in the same control instruction group is consistent with the data time sequence number.
Preferably, the step of the server executing the short message control instruction or the data control instruction in the control instruction group includes:
when the first arrival control command arrives at the server, the server immediately executes the first arrival control command, and the server extracts and records the first arrival time sequence number of the first arrival control command;
when the backward control instruction reaches the server, the server extracts and records the backward time sequence number of the backward control instruction;
the server compares the first arrival time sequence number with the second arrival time sequence number;
if the first arrival time sequence number is consistent with the second arrival time sequence number, the second arrival control instruction is not executed;
if the arrival-first time sequence number is earlier than the arrival-later time sequence number, the arrival-later control instruction is continuously executed; wherein
The first arrival control instruction is a control instruction which arrives at the server side in advance in the short message control instruction or the data control instruction;
the backward control instruction is a control instruction which reaches the server after delay in the short message control instruction or the data control instruction.
Preferably, the step of the server executing the short message control instruction or the data control instruction in the control instruction group further includes: the server executes the short message control command or the data control command with the short message time sequence number or the data time sequence number lagging the initial time sequence.
Preferably, the step of sending the control command from the user side to the server side includes:
the control end does not send a control instruction group to the service end after receiving the service request;
establishing connection between a user side and a server side;
the user side sends a control instruction to the server side.
Preferably, the server returns the execution result to the control end through the data channel; and if the server side can not return the execution result to the control side through the data channel, the server side returns the execution result to the control side through the short message channel.
A system comprises a user side, a server side and a control side, and the system adopts a control method.
Compared with the prior art, the invention has the following beneficial effects:
and based on the requirement of a remote control server, the remote control server can communicate with the equipment in a long distance.
When the remote signal cannot reach the server, the Bluetooth function can be started through the user mobile terminal, and the Bluetooth close-range control scheme is automatically switched.
Based on the intelligent power bank scheme, instructions for starting discharging and stopping discharging can be issued.
Based on intelligent rack scheme, can issue and borrow precious instruction, the precious instruction of locking charge etc..
Based on the intelligent server scheme, the latest state data information of the hardware can be periodically acquired at regular time.
Drawings
Other characteristic objects and advantages of the invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following figures.
FIG. 1 is a timing chart of the control method of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
As shown in fig. 1, the control method of the present invention includes a user side, a server side and a control side, and is characterized by including the following steps:
in the process of the first startup (or initialization) of the server, the server needs to initiate an authentication request to the controller. In the authentication request, the server side carries unique identity information and is used for identity authentication of the control side. After the identity authentication is passed, the control end can establish a highly available (long-time connection) data transmission channel in a consensus manner for collecting the relevant state data of the service end, the unique identity authentication information and the encryption algorithm are irreversible, and the encryption key is not transmitted on the wide area network.
The request is sent and the service is provided as follows.
Firstly, after the connection is established, the user side sends a service request to the control side. In the process of establishing connection by the server side initialization, the control side can set a default initial time sequence to the server side initialization.
When the control end needs to control the service end to provide service, a double-channel (short message and data) control instruction is generated at the same time and sent to the service end. The dual-channel control instruction has time and space unique time sequence numbers.
When the first-arriving control instruction arrives at the server, the server immediately carries out the first-arriving instruction and judges and executes the first-arriving instruction according to the unique time sequence number (namely only the first-arriving short message control instruction or data control instruction in the same group of double-channel control instructions is executed).
When the backward control command reaches the server, the server will judge the timeliness of the command. If the time sequence number of the backward control instruction is consistent with the time sequence number of the executed control instruction, the backward control instruction is not executed any more so as to avoid the repeated and differentiated execution of the control instruction; and if the time sequence number of the subsequent control instruction is later than that of the first control instruction, executing the subsequent control instruction (namely, the server executes a new dual-channel control instruction).
And after the execution is finished, the server returns an execution result to the control end, and if the data channel is not communicated, the execution result is uploaded through a short message.
Secondly, after the connection is established, the user side sends a service request to the control side. In the process of establishing connection by the server side initialization, the control side can set a default initial time sequence to the server side initialization. For example, within a period of time (10 seconds to 15 seconds), the service end does not provide corresponding charging service (no response).
At the moment, the user side can receive a notice that the control side reminds the user to turn on the Bluetooth, the user turns on the Bluetooth switch, and sends a service request instruction to the server side through the Bluetooth to provide related services.
After the server side successfully executes the service instruction through the Bluetooth channel, the response of successful execution is uploaded to the control side through the data channel. If the response fails to be successfully uploaded and executed through the data channel, an execution success result is uploaded to the control terminal through the short message channel.
The invention also provides a system, which comprises the user terminal, the server terminal and the control terminal, and the system adopts the control method.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (5)
1. A control method comprises a user side, a server side and a control side, and is characterized by comprising the following steps:
establishing connection between the server and the control end;
the user side sends a service request to the control side;
the server receives the control instruction group and executes the control instruction group or the server receives the control instruction and executes the control instruction;
the server returns the execution result to the control end,
the steps that the server receives the control instruction group and executes the control instruction group or the server receives the control instruction and executes the control instruction comprise:
the control end sends a control instruction group to the server end after receiving the service request, and the server end executes the control instruction in the control instruction group sent by the control end; or
The user side sends a control instruction to the server side, and the server side executes the control instruction;
the step of establishing connection between the server and the control end comprises the following steps:
the server side initiates an authentication request to the control side and simultaneously sends an initial time sequence to the control side;
after the authentication is passed, the control terminal establishes connection with the server terminal;
the step of sending the control instruction group to the server after the controller receives the service request comprises the following steps:
the control end sends a control instruction group to the server end after receiving the service request, wherein the control instruction group at least comprises a short message control instruction and a data control instruction;
the server executes the short message control instruction or the data control instruction in the control instruction group;
the short message control instruction in the control instruction group sent to the server after the control end receives the service request at least comprises a short message time sequence number;
the data control instruction in the control instruction group sent to the server after the control end receives the service request at least comprises a data time sequence number;
the short message time sequence number in the same control instruction group is consistent with the data time sequence number;
the step that the server executes the short message control instruction or the data control instruction in the control instruction group comprises the following steps:
when the first arrival control command arrives at the server, the server immediately executes the first arrival control command, and the server extracts and records the first arrival time sequence number of the first arrival control command;
when the backward control instruction reaches the server, the server extracts and records the backward time sequence number of the backward control instruction;
the server compares the first arrival time sequence number with the second arrival time sequence number;
if the first arrival time sequence number is consistent with the second arrival time sequence number, the second arrival control instruction is not executed;
if the arrival-first time sequence number is earlier than the arrival-later time sequence number, the arrival-later control instruction is continuously executed; wherein
The first arrival control instruction is a control instruction which arrives at the server side in advance in the short message control instruction or the data control instruction;
the backward control instruction is a control instruction which reaches the server after delay in the short message control instruction or the data control instruction.
2. The control method according to claim 1, wherein the step of the server executing the short message control command or the data control command in the control command group further comprises: the server executes the short message control command or the data control command with the short message time sequence number or the data time sequence number lagging the initial time sequence.
3. The control method according to claim 1, wherein the step of the user side sending the control command to the server side comprises:
the control end does not send a control instruction group to the service end after receiving the service request;
establishing connection between a user side and a server side;
the user side sends a control instruction to the server side.
4. The control method according to claim 3, wherein the server returns the execution result to the control end through the data channel;
and if the server side can not return the execution result to the control side through the data channel, the server side returns the execution result to the control side through the short message channel.
5. A control system, comprising a user end, a server end and a control end, wherein the system employs the control method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711479462.6A CN108391241B (en) | 2017-12-29 | 2017-12-29 | Control method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711479462.6A CN108391241B (en) | 2017-12-29 | 2017-12-29 | Control method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108391241A CN108391241A (en) | 2018-08-10 |
CN108391241B true CN108391241B (en) | 2021-03-16 |
Family
ID=63076669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711479462.6A Active CN108391241B (en) | 2017-12-29 | 2017-12-29 | Control method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108391241B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110070654B (en) * | 2019-04-29 | 2022-01-11 | 深圳前海微众银行股份有限公司 | Electronic lock unlocking method, system, terminal, electronic lock and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101267599A (en) * | 2008-05-12 | 2008-09-17 | 中南大学 | SMS receiving/transmission device and method with failure retransfer and receiving filtration function |
CN102801773A (en) * | 2012-03-09 | 2012-11-28 | 无锡互惠信息技术有限公司 | Internet of things system and acquisition and monitoring method for article information |
CN105159181A (en) * | 2015-04-23 | 2015-12-16 | 小米科技有限责任公司 | Control method and device for intelligent equipment |
CN106302056A (en) * | 2016-09-30 | 2017-01-04 | 宁波方太厨具有限公司 | Household Internet of Things communication connection system and communication connecting method |
CN106453472A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Multi-communication mode internet of things electronic product-based high-availability realization method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9812006B1 (en) * | 2016-05-06 | 2017-11-07 | Nxcontrol System Co., Ltd. | System and method for integrating infrared remote controls of home appliances |
-
2017
- 2017-12-29 CN CN201711479462.6A patent/CN108391241B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101267599A (en) * | 2008-05-12 | 2008-09-17 | 中南大学 | SMS receiving/transmission device and method with failure retransfer and receiving filtration function |
CN102801773A (en) * | 2012-03-09 | 2012-11-28 | 无锡互惠信息技术有限公司 | Internet of things system and acquisition and monitoring method for article information |
CN105159181A (en) * | 2015-04-23 | 2015-12-16 | 小米科技有限责任公司 | Control method and device for intelligent equipment |
CN106453472A (en) * | 2016-07-15 | 2017-02-22 | 孙宝石 | Multi-communication mode internet of things electronic product-based high-availability realization method and system |
CN106302056A (en) * | 2016-09-30 | 2017-01-04 | 宁波方太厨具有限公司 | Household Internet of Things communication connection system and communication connecting method |
Also Published As
Publication number | Publication date |
---|---|
CN108391241A (en) | 2018-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106878926B (en) | Data transmission method based on low-power-consumption Bluetooth, slave master device and system | |
CN104749996B (en) | A kind of ZigBee remote controlers long-range control method | |
CN111490916B (en) | Method, system, device and medium for binding ZigBee sub-devices of ZigBee | |
CN108781473B (en) | Method and equipment for sharing files among different terminals | |
CN107592634B (en) | Method and system for realizing multi-network coverage based on cloud SIM technology | |
CN109639692B (en) | Offline login method, device, equipment, system and storage medium | |
CN103209089A (en) | Method for obtaining heart beat period, terminal and server | |
CN105392185B (en) | A kind of networking method of smart machine, apparatus and system | |
CN105493529B (en) | Control the method, apparatus and RAN equipment of UE wireless charging | |
CN111586105A (en) | Automatic network distribution method for intelligent equipment and intelligent equipment | |
CN111264079B (en) | Data transmission method, electronic device, system and storage medium | |
CN104754523A (en) | Communication method, terminal and communication system | |
CN111132100A (en) | Bluetooth connection method and device, Bluetooth equipment and Bluetooth system | |
CN112637931A (en) | Method and device for establishing network connection | |
CN108391241B (en) | Control method and system | |
CN110149622B (en) | Intelligent household appliance control method and device | |
CN111385611B (en) | Account login method of smart television, smart television and terminal equipment | |
CN111491351B (en) | Method and system for sensing online of WiFi terminal based on authentication information | |
CN111478816A (en) | Method, system, device and medium for configuring Zigbee and ZigBee sub-equipment | |
CN111147336A (en) | Intelligent terminal access control system and method | |
CN107257586B (en) | Mobile network connection method and system when intelligent terminal is connected with WiFi | |
CN107027126B (en) | Data communication method and system, terminal equipment and control equipment | |
CN109712380A (en) | Find method and device, the storage medium, terminal device, remote control equipment of remote control equipment | |
CN105245258A (en) | Bluetooth-based unpacking method and device | |
CN110972148B (en) | ZigBee device networking method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |