Movatterモバイル変換


[0]ホーム

URL:


CN117834690A - Intelligent switch control method, device, equipment and storage medium - Google Patents

Intelligent switch control method, device, equipment and storage medium
Download PDF

Info

Publication number
CN117834690A
CN117834690ACN202311767811.XACN202311767811ACN117834690ACN 117834690 ACN117834690 ACN 117834690ACN 202311767811 ACN202311767811 ACN 202311767811ACN 117834690 ACN117834690 ACN 117834690A
Authority
CN
China
Prior art keywords
target
switch
control instruction
switch control
intelligent switch
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.)
Pending
Application number
CN202311767811.XA
Other languages
Chinese (zh)
Inventor
曾庆子
张缘
张菊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ziguang New Energy Technology Co ltd
Original Assignee
Shenzhen Purple Lighting Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Purple Lighting Technology Co ltdfiledCriticalShenzhen Purple Lighting Technology Co ltd
Priority to CN202311767811.XApriorityCriticalpatent/CN117834690A/en
Publication of CN117834690ApublicationCriticalpatent/CN117834690A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例公开了一种智能开关的管控方法及装置、设备及存储介质,方法应用于服务器,服务器分别与客户端以及智能开关之间具有通讯连接,智能开关用于与外部设备串连,用于控制外部设备的开关状态,方法包括:接收客户端发出的目标开关控制指令,目标开关控制指令至少携带有目标设备地址;利用目标设备地址以及预设的设备列表,确定目标设备地址对应的目标智能开关,设备列表至少包括设备地址与智能开关的对应关系;将目标开关控制指令发送至目标智能开关,并接收目标智能开关返回的指令执行结果,将指令执行结果返回至客户端。通过上述方法,在将智能开关与外部设备串连时,远程控制智能开关,控制外部设备的开关状态,更利于降低能耗。

The embodiment of the present invention discloses a method and device, equipment and storage medium for controlling a smart switch. The method is applied to a server, and the server has communication connections with a client and a smart switch respectively. The smart switch is used to be connected in series with an external device to control the switch state of the external device. The method includes: receiving a target switch control instruction issued by a client, and the target switch control instruction carries at least a target device address; using the target device address and a preset device list to determine the target smart switch corresponding to the target device address, and the device list at least includes the corresponding relationship between the device address and the smart switch; sending the target switch control instruction to the target smart switch, and receiving the instruction execution result returned by the target smart switch, and returning the instruction execution result to the client. Through the above method, when the smart switch is connected in series with an external device, the smart switch is remotely controlled to control the switch state of the external device, which is more conducive to reducing energy consumption.

Description

Control method and device of intelligent switch, equipment and storage medium
Technical Field
The present invention relates to the field of remote control technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling an intelligent switch.
Background
With the development of information control technology, the control systems in modern buildings or plants are more and more complex. Taking the lighting system as an example, the lighting system in the same building is provided with lighting devices scattered at all positions of the building, so that if the lighting system is not reasonably controlled, larger energy consumption can be caused, and the lighting devices are manually turned on or off at all positions, so that the time and the labor are wasted, and the processing efficiency is low. Therefore, there is still a need for a way to increase the control efficiency of a control system to reduce energy consumption.
Disclosure of Invention
The invention mainly aims to provide a control method, a device, equipment and a storage medium of an intelligent switch, which can solve the problem that a mode for improving the control efficiency of an informatization system is lacking in the prior art.
In order to achieve the above object, a first aspect of the present invention provides a method for controlling an intelligent switch, where the method is applied to a server, the server is respectively connected with a client and the intelligent switch in a communication manner, the intelligent switch is used for being connected in series with an external device, and is used for controlling a switching state of the external device, and the method includes:
Receiving a target switch control instruction sent by the client, wherein the target switch control instruction at least carries a target equipment address;
determining a target intelligent switch corresponding to the target equipment address by using the target equipment address and a preset equipment list, wherein the equipment list at least comprises the corresponding relation between the equipment address and the intelligent switch;
and sending the target switch control instruction to the target intelligent switch, receiving an instruction execution result returned by the target intelligent switch, and returning the instruction execution result to the client.
In one possible implementation, the method further includes:
acquiring working state data of the external equipment, wherein the working state data is used for reflecting the power-on time and the power-off time of the external equipment;
carrying out the usage habit analysis of the external equipment by utilizing the working state data to generate a usage habit report of the external equipment;
the habit report is sent to the client, and the client is used for receiving the habit report of the external equipment; generating a timing duration based on the usage habit report; and generating a timing switch control instruction by using the timing time length, wherein the timing switch control instruction carries the timing time length, and the target switch control instruction comprises the timing switch control instruction.
In one possible implementation, the method further includes:
encrypting the target switch control instruction according to a preset encryption algorithm, and determining the encrypted target switch control instruction;
and sending the encrypted target switch control instruction to the target intelligent switch.
In one possible implementation manner, the encrypting the target switch control instruction according to a preset encryption algorithm, and determining the encrypted target switch control instruction includes:
randomly extracting a target encryption algorithm from a preset encryption algorithm list, and determining the current number of a decryption algorithm corresponding to the target encryption algorithm, wherein the number of the decryption algorithm is dynamically updated according to a preset first updating period and a first number generating algorithm;
encrypting the target switch control instruction by using the target encryption algorithm to obtain an encrypted target switch control instruction;
the sending the encrypted target switch control instruction to the target intelligent switch includes:
and sending the target number and the encrypted target switch control instruction to the target intelligent switch.
In order to achieve the above object, a first aspect of the present invention provides a method for controlling an intelligent switch, where the method is applied to an intelligent switch, the server is respectively connected with a client and the intelligent switch in a communication manner, and the intelligent switch is used for being connected in series with an external device and controlling a switching state of the external device, and the method includes:
Receiving and executing a target switch control instruction sent by the server to obtain an instruction execution result;
and returning the instruction execution result to the server.
In one possible implementation manner, the receiving and executing the target switch control instruction sent by the server further includes:
receiving a target number sent by the server and an encrypted target switch control instruction;
determining a target decryption algorithm by using the target number and the corresponding relation between a preset decryption algorithm and the number, wherein the number is dynamically updated according to a preset second updating period and a second number generating algorithm;
decrypting the encrypted target switch control instruction according to the target decryption algorithm to obtain the target switch control instruction;
and executing the target switch control instruction.
In order to achieve the above object, a third aspect of the present invention provides a control device for an intelligent switch, where the device is applied to a server, the server is respectively connected with a client and the intelligent switch in a communication manner, the intelligent switch is used for being connected in series with an external device, and is used for controlling a switching state of the external device, and the device includes:
And a data receiving module: the target switch control instruction is used for receiving a target switch control instruction sent by the client, and the target switch control instruction at least carries a target equipment address;
the switch determining module: the device list at least comprises the corresponding relation between the device address and the intelligent switch;
and a result return module: and the target switch control instruction is sent to the target intelligent switch, an instruction execution result returned by the target intelligent switch is received, and the instruction execution result is returned to the client.
In order to achieve the above object, a fourth aspect of the present invention provides a control device for an intelligent switch, the device being applied to the intelligent switch, the server having a communication connection with a client and the intelligent switch, respectively, the intelligent switch being used for being connected in series with an external device and for controlling a switching state of the external device, the device comprising:
the instruction receiving module: the target switch control instruction is used for receiving and executing the target switch control instruction sent by the server to obtain an instruction execution result;
and a result reporting module: and the instruction execution result is returned to the server.
To achieve the above object, a fifth aspect of the present invention provides a computer-readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps as in the first aspect, the second aspect and any one of the possible implementations.
To achieve the above object, a sixth aspect of the present invention provides a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps as in the first aspect, the second aspect and any one of the possible implementations.
The embodiment of the invention has the following beneficial effects:
the invention provides a control method of an intelligent switch, which is applied to a server, wherein the server is respectively in communication connection with a client and the intelligent switch, the intelligent switch is used for being connected with external equipment in series, and is used for controlling the switching state of the external equipment, and the method comprises the following steps: receiving a target switch control instruction sent by a client, wherein the target switch control instruction at least carries a target equipment address; determining a target intelligent switch corresponding to the target equipment address by utilizing the target equipment address and a preset equipment list, wherein the equipment list at least comprises the corresponding relation between the equipment address and the intelligent switch; and sending the target switch control instruction to the target intelligent switch, receiving an instruction execution result returned by the target intelligent switch, and returning the instruction execution result to the client. According to the method, when the intelligent switch is connected with the external equipment in series, the client side sends the switch control instruction to remotely control the intelligent switch, and then the on-off state of the external equipment is remotely controlled, for example, when the external equipment is lighting equipment, the power-on and power-off time of the external equipment can be controlled, so that the control efficiency of the control system can be improved, and the energy consumption can be reduced more conveniently.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is an application environment diagram of a control method of an intelligent switch in an embodiment of the invention;
FIG. 2 is a flowchart of a control method of an intelligent switch according to an embodiment of the present invention;
FIG. 3 is another flow chart of a control method of an intelligent switch according to an embodiment of the invention;
FIG. 4 is a block diagram of a control device of an intelligent switch according to an embodiment of the present invention;
FIG. 5 is another block diagram of a control device of an intelligent switch according to an embodiment of the present invention;
fig. 6 is a block diagram of a computer device in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is an application environment diagram of a control method of an intelligent switch in an embodiment of the present invention, as shown in fig. 1, applied to a control system 00 of an intelligent switch, where the control system 00 of an intelligent switch includes a client 20, a server 10, and at least one intelligent switch 30, the server 30 is respectively connected with the client 20 and the intelligent switch 30 in a communication manner, and the intelligent switch 30 is further used for being connected in series with an external device 40 and controlling a switch state of the external device 40, where the server may be implemented by an independent server or a server cluster formed by a plurality of servers, the client may be a web browser used on the world wide web, instant messaging client software or an application program such as a mobile phone micro-letter public number, and the client may be a mobile phone micro-letter public number remote control switch. The intelligent switch is a switch element with data processing capability, and can be connected with external equipment such as a computer, lighting equipment and the like in series to control the on-off state of the external equipment, for example, if the intelligent switch is in an on state, the external equipment is started to work, if the intelligent switch is in an off state, the external equipment is shut down to stop working and the like. Furthermore, the intelligent switch is provided with a clock timer, such as a WATCHDOG timer (WATCHDOG), so that long-term operation is ensured, the time can be set remotely, the switch is controlled automatically in a timing manner, and automatic remote timing is realized; the wiring method is simple, and the equipment can be controlled by only connecting the intelligent switch in series to the front end of the external equipment to be controlled; the switch has a memory function, and can keep the original switch state when the switch is powered on after power is off; the secondary hold relay current is 80A. The industrial design and wide working range (working temperature: minus 20 ℃ to plus 55 ℃ and working humidity of less than or equal to 90%) are adopted. No matter how far apart, the location where the NB-IOT signal is located can be controlled; and the system is always on, and can automatically enter a working state and keep all the time once the system is powered on and operated.
Further, the server, the client and the intelligent switch can establish communication by adopting the internet of things, specifically, the internet of things card is arranged in the intelligent switch, plug and play is realized, communication is carried out with the server through the BIN service and the PRO service, wherein the BIN service is mainly used for the communication of the internet of things card and network establishment, the internet of things card is mainly used for the networking and data transmission of the internet of things equipment, but if the internet of things equipment needs to carry out bank card payment transaction, the BIN service code can be used for carrying out transaction processing. The payment system or the payment gateway can verify the validity of the bank card, check the balance of the card, authorize and process the transaction and the like through the BIN service code on the Internet of things card so as to complete the payment transaction. Thus, the internet of things device can use the internet of things card to conduct bank card payment transaction when needed. In short, the recharging method is used for recharging the Internet of things card on the equipment. The PRO service can help provide services such as technical support, remote monitoring, data analysis, optimization, customized development and the like of the equipment in the switching equipment so as to improve the performance, reliability and user experience of the equipment.
Further, a client (e.g., browser) distributed on the front end executes the front end code and a server distributed on the back end executes the back end code. The front end and the back end interact and cooperate with each other through network communication.
In the architecture with separated front end and back end, the front end is responsible for the presentation and interaction of user interfaces, and the back end is responsible for processing business logic and data processing. The server is deployed on the cloud server and is used for running back-end codes and providing services.
When a user accesses a front-end page on a browser, the front-end code is downloaded to the user's browser and executed in the browser. The front-end code may send a request to the back-end server to retrieve data or execute business logic. After the back-end server receives the request, the corresponding back-end code is executed to process the request, including obtaining data from a database, processing business logic, and the like. And then, the back-end server returns the processing result to the front end, and the front end displays or executes corresponding operation according to the returned data.
The control system of the intelligent switch can be regarded as a remote intelligent control switch system, is graphical software with powerful functions and convenient operation, monitors and controls the state of the lighting loop in a graphical mode, supports the control interfaces of operating systems such as Window XP/Window7/Window10 and the like, is simple and convenient to operate, and can be controlled in a networking mode. Support a variety of functions: device management, device editing area division, switch control, timing control setting function, data storage, data analysis, displayable device working state and manager level authority setting function.
Specifically, 1) device management: the main function is to manage the remote switching device.
2) Device editing region division: because the system database belongs to a distributed architecture, the device areas are divided according to different domestic areas, and seven areas are divided, namely North China, northeast China, east China, south China, southwest and northwest China, so that the division of the areas can be edited.
3) Switch control, timing control setting function: the principle of switch control is mainly implemented by operating equipment, switching or issuing timing tasks through an upper computer, forming specific codes (such as a frame header, an equipment address, a verification code, a time stamp and a frame tail) according to the operated equipment, and sending the specific codes to a cloud server for further encryption and then sending the specific codes to designated 4G equipment. And the system displays the successful execution state of the equipment in real time according to the data returned by the equipment after control.
4) Data storage and data analysis: the upper computer receives the state returned by the equipment in real time, judges the hanging state of the equipment according to the state returned by the equipment, generates a data report according to the time of year, month, day and hour, and can automatically send a timing task to the equipment after the system analyzes the data according to the power-on time and the power-off time of the equipment, so that the automatic switching timing function is realized, and the energy consumption is saved.
Referring to fig. 2, fig. 2 is a flowchart of a control method of an intelligent switch in an embodiment of the present invention, where the method shown in fig. 2 is applied to a server, the server is respectively connected with a client and the intelligent switch in a communication manner, and the intelligent switch is used for being connected in series with an external device and controlling a switch state of the external device, and the method shown in fig. 2 includes the following steps:
201. receiving a target switch control instruction sent by the client, wherein the target switch control instruction at least carries a target equipment address;
it should be noted that, the control of the intelligent switch shown in the application may establish a connection with the lighting system, specifically may be at least an external device that strings the intelligent switch into the lighting system, where the external device includes, but is not limited to, lighting devices, computers, and other devices that may be mounted, and the lighting devices include, but are not limited to, various lamps and lanterns, and the lamps and lanterns may be mounted everywhere. And then the intelligent switch is controlled by adopting a remote control mode, so that the control of the lighting system is realized.
Further, in order to timely manage a control system such as a lighting system, a client is provided, a user can install the client on a terminal, the terminal can be a desktop terminal or a mobile terminal, the mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer and the like, and then the user can interact with the client through the terminal to enable the user to receive a target switch control instruction from the user at the client. The server is in communication connection with the client and the intelligent switches, the client can forward the target switch control instruction sent by the user to the server and send the target switch control instruction to each intelligent switch by the server, wherein in order to effectively control each intelligent switch, the target switch control instruction carries equipment addresses, the equipment addresses are in one-to-one correspondence with the intelligent switches and are used for uniquely identifying the intelligent switch addresses, the target equipment addresses are used for indicating the target intelligent switches corresponding to the target switch control instruction, the target switch control instruction can be an on-off control instruction for controlling the intelligent switches to be turned on or off, and can also be a timing on-off control instruction for controlling the intelligent switches to be turned on or off at regular time, and the application is not limited herein.
202. Determining a target intelligent switch corresponding to the target equipment address by using the target equipment address and a preset equipment list, wherein the equipment list at least comprises the corresponding relation between the equipment address and the intelligent switch;
203. and sending the target switch control instruction to the target intelligent switch, receiving an instruction execution result returned by the target intelligent switch, and returning the instruction execution result to the client.
Further, after the server obtains the target device address that can uniquely identify the address of the intelligent switch, the target intelligent switch can be found from a preset device list based on the target device address, and specifically, the server may preset a device list, where the device list is used for storing device information, including but not limited to a correspondence between the device address and the intelligent switch. And then the target intelligent switch can be found by looking up a table. And finally, accurately forwarding the target switch control instruction to the target intelligent switch, wherein the target intelligent switch can receive and execute the target switch control instruction, for example, the target switch control instruction is a closed switch, the target intelligent switch is closed, otherwise, the target switch control instruction is an open switch, the target intelligent switch is opened, so that the switch state of an external device connected with the intelligent switch in series is controlled, for example, the external device is a lamp, the switch state can be regarded as an illumination state, and if the external device is a computer, the switch state can be regarded as a switch-on state.
For example, the user may manually send a function control command, such as manually acquiring the power consumption state, and step 1 switches to the console. Step 2, the acquisition function is clicked manually. Step 3, defining an instruction packet of each function through a protocol, wherein the client sends the instruction packet to the remote intelligent control switch based on clicking operation of a user.
For example, the switch instruction packet (target switch control instruction) is: frame header + device address + command string + authentication code + timestamp + frame trailer:
if the switch instruction packet is the switch instruction packet, the frame head, the device address, the switch instruction string, the verification code, the time stamp and the frame tail are as follows:
AA55+AA10A001+01+DFFF618DC43CE4FD98D74497B15699B6+1700634632644+D0A1
if the switch command packet is the switch command packet, the frame head, the device address, the switch command string, the verification code, the time stamp and the frame tail are as follows:
AA55+AA10A001+00+DFFF618DC43CE4FD98D74497B15699B6+1700634632644+D0A1。
step 4, returning a correct data instruction packet; and 5, executing the prompt function.
If a switch is temporarily connected, the switch is provided with an Internet of things card, a remote ip and a port of the cloud platform are set when the equipment leaves a factory, and after the equipment is powered on, 4G is automatically connected with the cloud platform to establish communication connection.
In one possible implementation manner, in order to reduce the energy consumption of the lighting system, the intelligent switch may be controlled at regular time, and the intelligent switch is turned on and off in time, further, the timing duration of the timing control of the intelligent switch may be set manually, or in order to better conform to the behavior pattern of the external device, further reduce the energy consumption, or may be obtained by analyzing the working state data of the external device, so the method may further include the following steps a01 to a03:
A01, acquiring working state data of the external equipment, wherein the working state data are used for reflecting the power-on time and the power-off time of the external equipment;
a02, carrying out using habit analysis of the external equipment by utilizing the working state data, and generating a using habit report of the external equipment;
it should be noted that, the intelligent switch may collect working state data of the external device, and the server may obtain working state data of the external device collected by the smart card switch, where the working state data is used to reflect working time of the external device, and the working time includes power-on time and power-off time. And then, performing behavior analysis on the working time of the external equipment by using the working time, determining the behavior habit of the external equipment, specifically, performing using habit analysis on the external equipment by using the working state data, and generating a using habit report of the external equipment.
A03, sending the habit report to the client, wherein the client is used for receiving the habit report of the external equipment; generating a timing duration based on the usage habit report; and generating a timing switch control instruction by using the timing time length, wherein the timing switch control instruction carries the timing time length, and the target switch control instruction comprises the timing switch control instruction.
After the usage habit report is obtained, the usage habit report can be sent to the client, so that the client can generate timing time based on the usage habit report, the timing time can reflect the working time of the external equipment, the on-off of the related intelligent switch can be controlled based on the timing time, the energy consumption is reduced, and specifically, the timing time is utilized to generate a timing switch control instruction which carries the timing time, so that the target intelligent switch is closed or opened based on the timing time.
In one possible implementation, in order to improve the security of data transmission, the control instruction may be encrypted, so the method further includes steps C01 to C02:
c01, encrypting the target switch control instruction according to a preset encryption algorithm, and determining the encrypted target switch control instruction;
and C02, sending the encrypted target switch control instruction to the target intelligent switch.
After receiving the target switch control instruction, the server may encrypt the target switch control instruction first, and then forward the encrypted target switch control instruction. The encryption algorithm includes, but is not limited to, a hash algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm, and the like.
In a possible implementation manner, in order to further improve security, an encryption algorithm list is preset at a server side, where the encryption algorithm list includes a plurality of encryption algorithms, a decryption algorithm corresponding to each encryption algorithm, and a number of each decryption algorithm, where the number of the decryption algorithm is dynamically updated according to a preset first update period and a first number generation algorithm, for example, the first update period is updated every day, the number generation algorithm includes a number generation function limited to various serial number generation functions, so that numbers of the decryption algorithms in the encryption algorithm list may be dynamically changed in real time, and further, step C01 may include D01 to D02:
d01, randomly extracting a target encryption algorithm from a preset encryption algorithm list, and determining the current number of a decryption algorithm corresponding to the target encryption algorithm, wherein the number of the decryption algorithm is dynamically updated according to a preset first updating period and a first number generating algorithm;
d02, encrypting the target switch control instruction by using the target encryption algorithm to obtain an encrypted target switch control instruction;
it will be appreciated that the target switch control command may be randomly extracted from a plurality of encryption algorithms, encrypted using the extracted target encryption algorithm, and the current number of the decryption algorithm corresponding to the target encryption algorithm determined at the same time. Further, the target switch control instructions after the target number encryption may be sent to the target intelligent switch, that is, step C02 may include: and sending the target number and the encrypted target switch control instruction to the target intelligent switch.
It should be noted that, the number of the decryption algorithm is dynamically updated according to a certain period, so that the numbers at different moments may be different, and because the number is dynamically updated, even if the data sent by the server is intercepted, the decryption algorithm cannot be accurately obtained, and cannot be broken, so that the security is increased.
The invention provides a control method of an intelligent switch, which is applied to a server, wherein the server is respectively in communication connection with a client and the intelligent switch, the intelligent switch is used for being connected with external equipment in series, and is used for controlling the switching state of the external equipment, and the method comprises the following steps: receiving a target switch control instruction sent by a client, wherein the target switch control instruction at least carries a target equipment address; determining a target intelligent switch corresponding to the target equipment address by utilizing the target equipment address and a preset equipment list, wherein the equipment list at least comprises the corresponding relation between the equipment address and the intelligent switch; and sending the target switch control instruction to the target intelligent switch, receiving an instruction execution result returned by the target intelligent switch, and returning the instruction execution result to the client. According to the method, when the intelligent switch is connected with the external equipment in series, the client side sends the switch control command to remotely control the intelligent switch, and then the switch state of the external equipment is remotely controlled, for example, when the external equipment is lighting equipment, the power-on and power-off time of the external equipment can be controlled, the control efficiency of the control system can be improved, the energy consumption can be reduced more easily, and the command encryption can be improved to the safety of data transmission.
Referring to fig. 3, fig. 3 is another flowchart of a control method of an intelligent switch according to an embodiment of the present invention, where the method shown in fig. 3 is applied to the intelligent switch, the server is respectively connected to a client and the intelligent switch in a communication manner, and the intelligent switch is used for being connected in series with an external device and controlling a switch state of the external device, and the method shown in fig. 3 includes the following steps:
301. receiving and executing a target switch control instruction sent by the server to obtain an instruction execution result;
302. and returning the instruction execution result to the server.
It should be noted that, the intelligent switch may receive and execute the target switch control instruction sent by the server to obtain an instruction execution result, where the instruction execution result includes execution success or execution failure, and return the execution result to the server, and the execution result is forwarded to the client by the server so as to be known by the user.
In one possible implementation, the target switch control command may be encrypted, so receiving and executing the target switch control command sent by the server may include steps E01 to E04:
e01, receiving a target number sent by the server and an encrypted target switch control instruction;
E02, determining a target decryption algorithm by using the target number and the corresponding relation between the preset decryption algorithm and the number, wherein the number is dynamically updated according to a preset second updating period and a second number generating algorithm;
furthermore, the intelligent switch side also writes an encryption algorithm list in advance, and can decrypt the encrypted target switch control instruction based on the corresponding relation between the decryption algorithm and the number in the encryption algorithm list.
The server sends the target number and the encrypted target switch control instruction to the target intelligent switch, so that after the target intelligent switch receives the target number and the encrypted target switch control instruction, the target decryption algorithm can be determined by using the target number and the corresponding relation between the preset decryption algorithm and the number, and specifically, the target decryption algorithm corresponding to the target number is searched in the corresponding relation between the decryption algorithm and the number based on the target number. The numbers in the corresponding relation between the decryption algorithm and the numbers of the intelligent switch side are dynamically updated according to a preset second updating period and a second number generating algorithm, wherein the second updating period and the second number generating algorithm can be the same as those of the server side, and therefore the server and the intelligent switch can synchronously update the numbers.
For example, in the list of servers and smart switches, there may be a first day: the number of the decryption algorithm A is 1, and the number of the decryption algorithm B is 2; the following day: the number of the decryption algorithm A is 2, and the number of the decryption algorithm B is 1; third day: the number of the decryption algorithm A is a, and the number of the decryption algorithm B is B; fourth day: the number of the decryption algorithm a is B, the number of the decryption algorithm B is a, etc., and the expression of the number is only exemplified herein and is not particularly limited.
E03, decrypting the encrypted target switch control instruction according to the target decryption algorithm to obtain the target switch control instruction;
and E04, executing the target switch control instruction.
Furthermore, the target decryption algorithm can be used for decrypting the encrypted target switch control instruction to obtain the target switch control instruction, and further, the instruction execution result can also comprise a prompt of success or failure of decryption. For example, the instruction execution results may include a first execution result of successful decryption and successful execution, a second execution result of successful decryption and failed execution, a third execution result of failed decryption, and the like, so as to accurately prompt the user.
The client can perform visualization processing based on the execution result, and the execution result is visually and intuitively displayed on a display screen of the terminal.
The invention provides a control method of an intelligent switch, which is applied to the intelligent switch, wherein a communication connection is arranged between a server, a client and the intelligent switch, the intelligent switch is used for being connected with external equipment in series, and the method is used for controlling the switching state of the external equipment and comprises the following steps: receiving and executing a target switch control instruction sent by the server to obtain an instruction execution result; and returning the instruction execution result to the server. According to the method, when the intelligent switch is connected with the external equipment in series, the client side sends the switch control command to remotely control the intelligent switch, and then the switch state of the external equipment is remotely controlled, for example, when the external equipment is lighting equipment, the power-on and power-off time of the external equipment can be controlled, the control efficiency of the control system can be improved, the energy consumption can be reduced more easily, and the command encryption can be improved to the safety of data transmission.
Referring to fig. 4, fig. 4 is a block diagram of a control device of an intelligent switch according to an embodiment of the present invention, where the device shown in fig. 4 is applied to a server, the server is respectively connected to a client and the intelligent switch in a communication manner, and the intelligent switch is used for being connected in series with an external device and for controlling a switching state of the external device, and the device shown in fig. 4 includes:
The data receiving module 401: the target switch control instruction is used for receiving a target switch control instruction sent by the client, and the target switch control instruction at least carries a target equipment address;
the switch determination module 402: the device list at least comprises the corresponding relation between the device address and the intelligent switch;
the result returns to the module 403: and the target switch control instruction is sent to the target intelligent switch, an instruction execution result returned by the target intelligent switch is received, and the instruction execution result is returned to the client.
It should be noted that, the contents of each module in the apparatus shown in fig. 4 are similar to the contents of each step in the method shown in fig. 2, and for avoiding repetition, the details of each step in the method shown in fig. 2 may be referred to herein.
The invention provides a control device of an intelligent switch, which is applied to a server, wherein the server is respectively in communication connection with a client and the intelligent switch, the intelligent switch is used for being connected with external equipment in series and controlling the switching state of the external equipment, and the device comprises: and a data receiving module: the target switch control instruction is used for receiving a target switch control instruction sent by the client, and the target switch control instruction at least carries a target equipment address; the switch determining module: the device comprises a target device address and a preset device list, wherein the target device address is used for determining a target intelligent switch corresponding to the target device address; and a result return module: and the target switch control instruction is sent to the target intelligent switch, an instruction execution result returned by the target intelligent switch is received, and the instruction execution result is returned to the client. Through the device, when the intelligent switch is connected with the external equipment in series, the client side sends the switch control instruction to remotely control the intelligent switch, and then the on-off state of the external equipment is remotely controlled, for example, when the external equipment is lighting equipment, the power-on and power-off time of the external equipment can be controlled, the control efficiency of the control system can be improved, and the energy consumption can be reduced more favorably.
Referring to fig. 5, fig. 5 is another block diagram of a control device of an intelligent switch according to an embodiment of the present invention, where the device shown in fig. 5 is applied to the intelligent switch, the server is respectively connected to a client and the intelligent switch in a communication manner, and the intelligent switch is used for being connected in series with an external device and controlling a switching state of the external device, and the device shown in fig. 5 includes:
instruction receiving module 501: the target switch control instruction is used for receiving and executing the target switch control instruction sent by the server to obtain an instruction execution result;
the result reporting module 502: and the instruction execution result is returned to the server.
It should be noted that, the contents of each module in the apparatus shown in fig. 5 are similar to the contents of each step in the method shown in fig. 3, and for avoiding repetition, the contents of each step in the method shown in fig. 3 may be referred to specifically.
The invention provides a control device of an intelligent switch, which is applied to the intelligent switch, a server is respectively in communication connection with a client and the intelligent switch, the intelligent switch is used for being connected with external equipment in series, and is used for controlling the switch state of the external equipment, and the device comprises: the instruction receiving module: the target switch control instruction is used for receiving and executing the target switch control instruction sent by the server to obtain an instruction execution result; and a result reporting module: and the instruction execution result is returned to the server. Through the device, when the intelligent switch is connected with the external equipment in series, the client side sends the switch control instruction to remotely control the intelligent switch, and then the on-off state of the external equipment is remotely controlled, for example, when the external equipment is lighting equipment, the power-on and power-off time of the external equipment can be controlled, the control efficiency of the control system can be improved, the energy consumption can be reduced more easily, and the security of data transmission can be improved by encrypting the instruction.
FIG. 6 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 6, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program which, when executed by a processor, causes the processor to implement the method described above. The internal memory may also have stored therein a computer program which, when executed by a processor, causes the processor to perform the method described above. It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is presented comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as shown in fig. 2 or 3.
In an embodiment, a computer-readable storage medium is proposed, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as shown in fig. 2 or 3.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

CN202311767811.XA2023-12-212023-12-21 Intelligent switch control method, device, equipment and storage mediumPendingCN117834690A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311767811.XACN117834690A (en)2023-12-212023-12-21 Intelligent switch control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311767811.XACN117834690A (en)2023-12-212023-12-21 Intelligent switch control method, device, equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN117834690Atrue CN117834690A (en)2024-04-05

Family

ID=90510752

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311767811.XAPendingCN117834690A (en)2023-12-212023-12-21 Intelligent switch control method, device, equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN117834690A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105652676A (en)*2016-01-202016-06-08惠州市物联微电子有限公司Intelligent home remote control system and control method
CN107104969A (en)*2017-04-272017-08-29山西大学The method that the individual privacy information in express delivery is protected with dynamic encryption mechanism
US10021765B1 (en)*2017-08-012018-07-10Kleverness IncorporatedIntelligent switch device and central control system thereof
CN111586952A (en)*2020-06-112020-08-25上海庆科信息技术有限公司Switch control method, device, processor and intelligent switch equipment
CN214851936U (en)*2021-05-142021-11-23深圳市紫光照明技术股份有限公司Lamp control gateway and lamp control system
CN113824728A (en)*2021-09-272021-12-21南京华远时代科技有限公司Network communication method and system based on data encryption

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105652676A (en)*2016-01-202016-06-08惠州市物联微电子有限公司Intelligent home remote control system and control method
CN107104969A (en)*2017-04-272017-08-29山西大学The method that the individual privacy information in express delivery is protected with dynamic encryption mechanism
US10021765B1 (en)*2017-08-012018-07-10Kleverness IncorporatedIntelligent switch device and central control system thereof
CN111586952A (en)*2020-06-112020-08-25上海庆科信息技术有限公司Switch control method, device, processor and intelligent switch equipment
CN214851936U (en)*2021-05-142021-11-23深圳市紫光照明技术股份有限公司Lamp control gateway and lamp control system
CN113824728A (en)*2021-09-272021-12-21南京华远时代科技有限公司Network communication method and system based on data encryption

Similar Documents

PublicationPublication DateTitle
CN112507027B (en)Kafka-based incremental data synchronization method, device, equipment and medium
CN104660682B (en)A kind of OPC data collection and monitoring intelligent terminal based on TD-LTE
EP3371930B1 (en)Method and apparatus for secure aggregated event reporting
CN204598011U (en)A kind of OPC data acquisition and monitoring intelligent terminal based on TD-LTE
CN112017007A (en)User behavior data processing method and device, computer equipment and storage medium
US9420056B2 (en)Analytics caching based on users connected
CN111405032A (en)General cloud platform of industry thing networking
CN109067599B (en)Cluster deployment method and device
US11237534B2 (en)Managing certificates in a building management system
CN104007738A (en)Public building energy efficiency data collecting and processing system based on OPC UA
CN105765533A (en)Method and apparatus for firmware virtualization
CN106326372A (en)Git central warehouse management system and control method
CN114301940B (en)Internet of things equipment control method, device and system
CN103716384A (en)Method and device for realizing cloud storage data synchronization in cross-data-center manner
CN110597913A (en)Transaction information tracking method, device, system, storage medium and computer equipment
CN107979629A (en)Distributed cache system and its data cache method and device
CN102890486A (en)Center boiler remote monitoring system and control method thereof
CN110032612A (en)Information-pushing method and device
CN107423313B (en) A County-level Meteorological Comprehensive Observation Service Integration System
CN112231039A (en) Work order information statistics method, device, computer equipment and storage medium
CN117834690A (en) Intelligent switch control method, device, equipment and storage medium
CN113395180B (en)Industrial real-time big data acquisition and release method and industrial real-time big data platform
CN114243914A (en)Electric power monitoring system
CN102868746B (en)Method for realizing mobile informationization
CN103136014A (en)Installation method and installation system of data base

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
TA01Transfer of patent application right

Effective date of registration:20250304

Address after:518000 Room 301, building B, Weicheng intelligent industrial park, No. 533, Gushu 1st Road, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Applicant after:SHENZHEN ZIGUANG NEW ENERGY TECHNOLOGY CO.,LTD.

Country or region after:China

Address before:518000 401, building B, Weicheng intelligent industrial park, No. 533, Gushu 1st Road, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong Province

Applicant before:SHENZHEN PURPLE LIGHTING TECHNOLOGY Co.,Ltd.

Country or region before:China

TA01Transfer of patent application right

[8]ページ先頭

©2009-2025 Movatter.jp