CN118233295A - Self-generating switch, processing method thereof, electronic equipment and control system - Google Patents

Self-generating switch, processing method thereof, electronic equipment and control system Download PDF

Info

Publication number
CN118233295A
CN118233295A CN202410322951.4A CN202410322951A CN118233295A CN 118233295 A CN118233295 A CN 118233295A CN 202410322951 A CN202410322951 A CN 202410322951A CN 118233295 A CN118233295 A CN 118233295A
Authority
CN
China
Prior art keywords
self
distribution network
generating
key
message
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
CN202410322951.4A
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.)
Wuhan Linptech Co Ltd
Original Assignee
Wuhan Linptech 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 Wuhan Linptech Co Ltd filed Critical Wuhan Linptech Co Ltd
Priority to CN202410322951.4A priority Critical patent/CN118233295A/en
Publication of CN118233295A publication Critical patent/CN118233295A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F03MACHINES OR ENGINES FOR LIQUIDS; WIND, SPRING, OR WEIGHT MOTORS; PRODUCING MECHANICAL POWER OR A REACTIVE PROPULSIVE THRUST, NOT OTHERWISE PROVIDED FOR
    • F03GSPRING, WEIGHT, INERTIA OR LIKE MOTORS; MECHANICAL-POWER PRODUCING DEVICES OR MECHANISMS, NOT OTHERWISE PROVIDED FOR OR USING ENERGY SOURCES NOT OTHERWISE PROVIDED FOR
    • F03G1/00Spring motors
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F03MACHINES OR ENGINES FOR LIQUIDS; WIND, SPRING, OR WEIGHT MOTORS; PRODUCING MECHANICAL POWER OR A REACTIVE PROPULSIVE THRUST, NOT OTHERWISE PROVIDED FOR
    • F03GSPRING, WEIGHT, INERTIA OR LIKE MOTORS; MECHANICAL-POWER PRODUCING DEVICES OR MECHANISMS, NOT OTHERWISE PROVIDED FOR OR USING ENERGY SOURCES NOT OTHERWISE PROVIDED FOR
    • F03G5/00Devices for producing mechanical power from muscle energy
    • F03G5/06Devices for producing mechanical power from muscle energy other than of endless-walk type
    • F03G5/062Devices for producing mechanical power from muscle energy other than of endless-walk type driven by humans
    • F03G5/065Devices for producing mechanical power from muscle energy other than of endless-walk type driven by humans operated by the hand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Chemical & Material Sciences (AREA)
  • Combustion & Propulsion (AREA)
  • Health & Medical Sciences (AREA)
  • Mechanical Engineering (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Toxicology (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a self-generating switch, comprising: a self-generating generator; the key can directly or indirectly trigger the self-generating machine to generate electric energy; the control assembly, it electricity is connected from the generator for: when receiving the electric energy from the self-generating motor, the electric energy is electrified, and the electric energy can support the control assembly to work for a designated time; in the distribution network mode, at least two different first distribution network messages and second distribution network messages are sent outwards in response to electric energy generated by at least one operation of the keys; buffer time is provided between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating motor, so that the first distribution network message and the second distribution network message can be sent in a designated time, and the self-generating switch enters a power-down state after the message is sent; such that: the external device is capable of receiving and joining the self-generating switch to the designated network based on the first and second distribution network messages.

Description

Self-generating switch, processing method thereof, electronic equipment and control system
Technical Field
The present invention relates to the field of switches, and in particular, to a self-generating switch, a processing method thereof, an electronic device, and a control system.
Background
A wireless switch may be understood as a switch configured with a wireless communication module, wherein one type of wireless switch is a self-generating switch, and in a conventional self-generating switch, the wireless switch usually communicates with the outside through a radio frequency communication module, for example, the self-generating switch may communicate with various receiving ends (such as a lamp, a wall switch, etc.) through radio frequency signals.
In the prior art, the self-generating switch can be simply controlled by a receiving end matched with the self-generating switch. In a control scenario where a network needs to be connected, the network needs to be allocated first, and then the self-generating switch is connected to the network, so that rich control is realized. However, the power generated by the self-generating switch is limited, and different requirements are met when the power distribution network data of the self-generating switch are accessed to different networks, so that the self-generating switch cannot cope with various distribution network requirements, and rich control cannot be realized through the access network.
Disclosure of Invention
The invention provides a self-generating switch, a processing method thereof, electronic equipment and a control system, which are used for solving the problem that the self-generating switch cannot cope with various distribution network requirements and further cannot realize rich control through an access network.
According to a first aspect of the present invention, there is provided a self-generating switch comprising:
a self-generating generator;
The key can directly or indirectly trigger the self-generating machine to generate electric energy;
The control assembly is electrically connected with the self-generating motor and is used for:
Powering up when receiving electrical energy derived from the self-generating electrical machine, the electrical energy being capable of supporting the control assembly for a specified period of time;
In the distribution network mode, at least a first distribution network message and a second distribution network message are sent outwards in response to electric energy generated by at least one operation of the keys; buffer time is provided between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in a designated time, and the self-generating switch enters a power-down state after the message is sent; such that: the external equipment can receive and add the self-generating switch to a specified network based on the first distribution network message and the second distribution network message; the first distribution network message and the second distribution network message are different.
According to a second aspect of the present invention, there is provided a method of processing a self-generating switch, comprising:
If the self-generating switch is in a distribution network mode and at least one operation is performed on a key of the self-generating switch, generating at least a first distribution network message and a second distribution network message, wherein the first distribution network message and the second distribution network message are different;
Sending at least the first distribution network message and the second distribution network message to the outside, wherein buffer time is reserved between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in a designated time, and the self-generating switch enters a power-down state after the message is sent; such that: the external device is capable of receiving and joining the self-generating switch to a designated network based on the first and second distribution network messages.
According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a program stored in the memory and running on the processor, characterized in that the processor implements the following steps when executing the program:
The electronic equipment at least receives a first distribution network message and a second distribution network message sent by a self-generating switch, wherein the first distribution network message and the second distribution network message are sent outwards by the self-generating switch in a distribution network mode in response to electric energy generated by at least one operation of a key, and buffer time is reserved between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating switch, so that the first distribution network message and the second distribution network message can be sent in a designated time, and after the message is sent, the self-generating switch enters a power-down state, wherein the first distribution network message and the second distribution network message are different;
the electronic equipment verifies at least the first distribution network message and the second distribution network message;
And the electronic equipment adds the self-generating switch which passes the verification to a specified network.
According to a fourth aspect of the present invention, there is provided a control system comprising a self-generating switch as described above, and an electronic device as described above.
In the self-generating switch, the processing method thereof, the electronic equipment and the control system provided by the invention, under the distribution network mode, the electric energy generated by the self-generating device enables the control assembly to generate and externally send different first distribution network messages and second distribution network messages, more distribution network data can be carried by sending different distribution network messages, and rich distribution network data combinations are formed so as to effectively meet the requirements of various distribution network data, and meanwhile, the buffer time between the first distribution network messages and the second distribution network messages is set; the buffering time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in the appointed time, further, the limited energy generated by the primary triggering of the self-generating machine is enough to support the outward sending of two different distribution network messages, after the external equipment receives the two different distribution network messages, the distribution network of the self-generating switch can be completed according to distribution network data carried by the two different distribution network messages or the combination of the distribution network data, and the distribution network can be effectively distributed under the condition that the electric quantity of the self-generating switch is limited so as to meet various distribution network requirements, and further, the rich control is realized through an access network.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of a control system according to an embodiment of the present invention;
FIG. 2 is a second schematic diagram of a control system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of signal receiving scanning at a receiving end according to an embodiment of the invention;
FIG. 4 is a schematic diagram showing a self-generating switch transmitting packet and receiving scanning at a receiving end according to an embodiment of the present invention;
FIG. 5 is a second schematic diagram of a self-generating switch transmitting and receiving scanning in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of a self-generating switch in accordance with an embodiment of the present invention;
FIG. 7 is a second schematic diagram of a self-generating switch according to an embodiment of the present invention;
FIG. 8 is a diagram showing key shake during key press of a self-generating switch according to an embodiment of the present invention;
FIG. 9 is a schematic flow chart of a cycle of reading key values from a power generation switch according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a data structure of a message sent from a power switch according to an embodiment of the present invention;
FIG. 11a is a schematic diagram of a data structure of a distribution network message sent from a power generation switch according to an embodiment of the present invention;
FIG. 11b is a second schematic diagram of a data structure of a distribution network packet sent from a power switch according to an embodiment of the present invention;
fig. 11c is a schematic diagram III of a data structure of a distribution network packet sent from a power generation switch according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a data structure of a control message sent from a power switch according to an embodiment of the present invention;
FIG. 13 is a flow chart of a method for processing a self-generating switch according to an embodiment of the invention;
Fig. 14 is a schematic view of the configuration of an electronic 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.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Referring to fig. 1 to 2, the present application provides a control system, which may include a self-generating switch 1, an electronic device 2, and an intelligent controller 3. In an actual control system, the number of the self-generating switches 1 and the intelligent controllers 3 can be multiple, and meanwhile, wireless signals can be transmitted among the self-generating switches 1, the electronic devices 2 and the intelligent controllers 3, and the wireless signals can be Bluetooth, radio frequency, wifi, zigbee and the like.
The self-generating switch 1 can be a switch capable of communicating externally based on wireless communication, and the wireless communication can be any mode such as radio frequency, bluetooth, wifi, zigbee and the like. The electrical energy required by the self-generating switch 1 may be generated when the self-generating switch is depressed and/or rebounded. In one example, a self-generating switch includes: the key can directly or indirectly trigger the self-generating motor to generate electric energy; the control component is electrically connected with the self-generating motor, and is powered on and sends a message when receiving electric energy from the self-generating motor. The self-generating electrical generator may be an electromagnetic generator or other electrical generator in the form of mechanical to electrical energy, for example.
The electronic device 2 may be any network device capable of forming a corresponding network, or may be a device or a combination of devices capable of establishing or accessing a network, which is capable of performing wireless communication with the self-generating switch 1 and the intelligent controller 3. The electronic device 2 may include a gateway, a terminal (e.g., a cell phone, a computer, a tablet computer, a car phone, etc.), a router, etc. The network established by the electronic device 2 may include a bluetooth network, a Wifi network, a Zigbee network, etc. The number of the electronic devices 2 may be one or more, and in particular, the electronic devices 2 may be, but not limited to, bluetooth gateways.
The intelligent controller 3 may be any device or combination of devices capable of being controlled to realize on-off control, and is provided with a module with data processing capability and a module with wireless communication capability, wherein one example of the intelligent controller may be a wall switch, and the other examples of the intelligent controller may be a controlled device such as a fan, a lamp, a socket, a garbage disposal device or the like, or a device connected with the controlled device. The external communication mode of the intelligent controller 2 may include at least one of the following: radio frequency, bluetooth, wifi, zigbee, mobile network, etc.
In an example, the electronic device 2 is a bluetooth gateway, the corresponding network is a bluetooth network, the self-generating switch 1 is a bluetooth-based self-generating switch (a wireless communication unit may be a bluetooth radio frequency unit), and the intelligent controller 3 is various bluetooth-based controlled devices such as an intelligent wall switch, a curtain, a lamp set, and the like. The self-generating switch 1 may send a bluetooth control message, such as a bluetooth low energy beacon message, to control the intelligent controller 3 (also may be described as a bluetooth device) that is a bluetooth receiver.
In addition, the Bluetooth equipment can communicate with the Bluetooth gateway, receive control commands of the Bluetooth gateway and report the state of the Bluetooth equipment to the Bluetooth gateway. All devices accessed to the Bluetooth network are stored in a device list of the Bluetooth gateway, and when the self-generating switch and the Bluetooth gateway are configured, a user can select any one or more devices in the gateway device list as controlled devices of the self-generating switch.
Any device accessing the bluetooth network may choose whether to turn on the proxy function. And once the Bluetooth equipment with the proxy function is started, the Bluetooth equipment forwards the control message of the self-generating switch to other members in the Bluetooth network where the Bluetooth equipment is located after receiving the control message sent by the self-generating switch of the matched network. When the distance between the self-generating switch and the controlled device is too far, the controlled device cannot directly receive the control message of the self-generating switch, the problem can be solved by proxy (relay) through other devices in the Bluetooth network, and the control distance is increased.
Further, in some embodiments, the control system further includes a server 4, where the server 4 may be any device or combination of devices that has data storage capability, data processing capability, and is capable of interacting with the electronic device 2, and specifically may be, for example, a local or cloud server, where a desired program may be deployed.
Referring to fig. 6, the self-generating switch provided by the present application includes:
a self-generating generator;
The key can directly or indirectly trigger the self-generating machine to generate electric energy;
The control assembly is electrically connected with the self-generating motor and is used for:
Powering up when receiving electrical energy derived from the self-generating electrical machine, the electrical energy being capable of supporting the control assembly for a specified period of time; when the self-generating switch is in a distribution network mode, at least a first distribution network message and a second distribution network message are externally sent in response to electric energy generated by at least one operation of the key; buffer time is provided between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in a designated time, and the self-generating switch enters a power-down state after the message is sent; such that: the external equipment can receive and add the self-generating switch to a specified network based on the first distribution network message and the second distribution network message; the first distribution network message and the second distribution network message are different.
In the application, if the self-generating switch is subjected to specific control, software triggering, resetting or re-electrifying and the like, the self-generating switch can enter a distribution network mode, and the distribution network mode can be understood as a mode for realizing the distribution network between the self-generating switch and the electronic equipment and/or the server, and the self-generating switch can communicate with the electronic equipment and/or the server after the self-generating switch is distributed. In the distribution network mode, the self-generating switch responds to at least one operation of the keys to generate electric energy, and the self-generating switch sends out at least two different distribution network messages.
According to the technical scheme, the distribution network with the network server can be realized under the condition of limited electric energy generated by one-time triggering of the self-generating switch, and further mutual control with intelligent equipment connected to the network can be realized. Specifically, because the electric quantity of the self-generating switch is limited, low-power consumption communication protocols (such as bluetooth and Zigbee) are mostly adopted, the number of bytes of effective data carried by messages of the low-power consumption communication protocols is limited, but the existing main stream intelligent home platform (such as millet, hua for and doodle) has larger requirement on effective network distribution data carried by the accessed intelligent device in a network distribution process of the network distribution message, and the general low-power consumption communication protocols are difficult to finish data transmission through one message, so that the existing self-generating switch cannot be directly accessed to a server of the intelligent home platform. Based on the technical scheme disclosed by the application, the distribution network data sent during distribution network can be split into a plurality of different distribution network messages according to the requirements of different intelligent home platforms on the distribution network data size of the connected self-generating switch during distribution network, so that the self-generating switch can adapt to the distribution network requirements of different distribution network data sizes, and further the self-generating switch is connected with a network server through a low-power consumption communication protocol. The data carried by the plurality of distribution network messages, namely the distribution network messages, can be completely different, can also be partially repeated, and can form the required complete distribution network data.
In addition, the server corresponding to the intelligent home platform has higher safety requirements on the access of the self-generating switch to the network, and based on the technical scheme, the application can carry more distribution network safety information by sending a plurality of distribution network messages or encrypt each part of distribution network safety information by a plurality of distribution network messages respectively, thereby further meeting the higher safety requirements of the distribution network.
In addition, considering that in the distribution network mode, the electric energy generated by the primary trigger of the self-generating switch needs to send at least two different distribution network messages outwards, so that buffer time is configured between the first distribution network message and the second distribution network message which are sent outwards, and the buffer time between the two different distribution network messages is matched with the electric energy generated by the primary trigger of the self-generating switch, namely, the electric quantity required by the total time of the transmission of the at least two different distribution network messages can be in the energy range generated by the primary trigger of the self-generating switch by setting the buffer time, so that the self-generating switch can successfully send at least two different distribution network messages under the condition of limited electric energy generated by the primary trigger of the self-generating switch. For example, in some embodiments, if the distribution network data is split into a plurality of distribution network messages, the energy generated by triggering the self-generating motor can only support the transmission of the plurality of distribution network messages, i.e. each distribution network message can only be transmitted once, a suitable buffer time is calculated according to the electric energy generated by triggering the self-generating motor once, so that the electric energy generated by triggering the self-generating motor once can just transmit all the distribution network messages. In other embodiments, if the distribution network data is split into a plurality of smaller distribution network messages, a suitable buffer time is calculated according to the electric energy generated by one triggering of the self-generating generator, so that at least one distribution network message can be sent multiple times or at least one distribution network message can be sent on multiple frequency points or channels under the electric energy generated by one triggering of the self-generating generator. The method does not deviate from the above-mentioned range as long as at least two different distribution network messages can be transmitted within a specified time within the energy range generated by triggering the self-generating machine once. And after the message is sent, the self-generating switch enters a power-down state so as to save the electric energy of the self-generating switch.
In the application, under the distribution network mode, the electric energy generated by the self-generating switch enables the control component to generate and externally send different first distribution network messages and second distribution network messages, more distribution network data can be carried by sending different distribution network messages, and rich distribution network data combinations are formed so as to effectively meet the requirements of various distribution network data, and meanwhile, the buffer time between the first distribution network messages and the second distribution network messages is set; the buffering time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in the appointed time, further, the limited energy generated by the primary triggering of the self-generating machine is enough to support the outward sending of two different distribution network messages, after the two different distribution network messages are received by external equipment, distribution network of the self-generating switch can be completed according to distribution network data carried by the two different distribution network messages or combination of the two different distribution network messages, the purpose that the self-generating switch can effectively distribute networks under the condition of limited electric quantity is achieved, various distribution network demands are met, and further, rich control is achieved through an access network.
Further, in some embodiments, in the distribution network mode, the distribution network data of the self-generating switch is split into a plurality of distribution network messages, and if the electric energy generated by one-time triggering of the self-generating generator can only send out part of the split plurality of distribution network messages, when the self-generating generator is triggered again, the electric energy generated by the re-triggering of the self-generating generator is used for sending out the rest of the distribution network messages. When the electric energy generated by one-time triggering of the self-generating motor can not support the transmission of all the network distribution messages, different network distribution messages are transmitted through multiple triggering, so that the effective network distribution is realized.
Further, in some embodiments, the buffering time is set to N/M; n is the scanning window of the external equipment, M is a non-integer greater than 1, and/or the duty ratio of the scanning window and the scanning interval of the external equipment is not less than 80%, so that the packet loss rate of the distribution network message is reduced, and the distribution network success rate of the self-generating switch can be improved. In other words, in this embodiment, in order to improve the success rate of the distribution network of the self-generating switch, the buffering time is configured to enable the distribution network message to reach the external device within the scanning window of the external device when all the distribution network messages sent by the self-generating switch are completed, so as to miss the scanning blind area of the external device as much as possible, so that at least two different distribution network messages sent outwards based on the electric energy generated by the primary triggering of the self-generating generator can be received by the external device, that is, the receiving end, so as to complete the distribution network of the self-generating switch. Wherein the receiving end comprises at least one of the following: electronic devices (e.g., gateway, terminal, router, etc.), servers, intelligent controllers.
Specifically, an external device based on the bluetooth communication protocol is exemplified herein as the receiving end. As shown in fig. 3, the receiving end may receive the bluetooth message sent out from the power generation switch in the scanning window, and the start time difference of the two scanning windows is defined as a scanning interval, where the scanning interval includes a scanning window and a scanning sleep time. The receiving end can not receive the message in the time of scanning dormancy. In this embodiment, the bluetooth signal sent out from the power generation switch may, for example, use 2.4GHZ as the carrier frequency, and respectively transmit the data packet through the designated bluetooth channel. Specifically, the self-generating switch transmits data in 40 channels using bluetooth low energy technology. Preferably, the data is transmitted in a broadcast channel. The frequency points of the three broadcast channels are respectively: the 37 channel is 2.402GHz; the 38 channel is 2.428GHz; the 39 channel is 2.480GHz. The receiving end can also scan and receive bluetooth messages on the 37, 38 and 39 channels.
In the application, because the electric energy generated by the primary triggering of the self-generating switch is limited and at least two different distribution network messages need to be sent in the limited electric energy, the higher the duty ratio of the scanning window and the scanning dormancy of the receiving end is, the higher the probability that the at least two different distribution network messages sent by the primary triggering of the self-generating switch are received by the receiving end is, and the electric energy generated by the primary triggering of the self-generating switch can generally send at least 3-10 packets of data through a large number of creative tests, and the duty ratio of the scanning window and the scanning interval of the receiving end is not less than 80 percent, so that the at least two different distribution network messages sent by the primary triggering of the self-generating switch can be received by the receiving end in the scanning window of the self-generating switch, thereby improving the success rate of distribution network. Preferably, in order to reduce the packet loss rate of the system as much as possible, the scanning window of the receiving end is set to be consistent with the value of the scanning interval, so that the receiving end can scan and obtain the Bluetooth broadcast signal and successfully receive the Bluetooth broadcast signal at any time point as long as the Bluetooth broadcast signal exists in the space, and the probability that at least two different distribution network messages sent by one-time triggering of the self-generating machine are received by the receiving end is further improved.
In addition, considering that the receiving end needs to switch channels, the switching channels need to close radio frequency reception firstly, then set new receiving channels, and then open radio frequency reception. The channel switching occurs at the time difference between the end of the previous scanning window and the beginning of the next scanning window, and during the channel switching, the receiving end cannot receive the bluetooth data at this time (the time is called a scanning blind zone of the receiving end) because the radio frequency receiving is closed, and the receiving end cannot recover the bluetooth receiving function until the next scanning window is opened. The time to scan for the dead zone depends on the hardware performance of the bluetooth chip, and the dead zone time is typically within 1 ms. If the buffer time of the two different distribution network messages sent outwards from the power generation switch is set improperly, the distribution network messages sent outwards from the power generation switch possibly fall into a scanning blind area, so that packet loss is caused, and further distribution network failure is caused.
In some embodiments, as shown in fig. 4, the probability of receiving bluetooth signals by a receiving end can be improved by increasing the scanning window and the scanning interval, for example, if a broadcast event just coincides with a scanning blind area of the receiving end, but due to the larger scanning window, both the front and rear broadcast events of the coincident broadcast event can fall into the scanning window. The larger the scan window is theoretically set, the lower the probability that the broadcast event sent from the power generation switch coincides with the scan blind area. But if the scan window is set too large, this means that the frequency of channel switching is reduced. When co-channel interference exists around the device, the larger the scanning window is, the lower the reliability of communication is. For example, assuming that the scan window and scan interval are set to 40ms, the 2 nd and 4 th broadcast events in the figure coincide with the scan blind zone, resulting in loss of both broadcast events. Therefore, the buffering time is set to N/M in the present embodiment; n is a scanning window of the external device, and M is a non-integer greater than 1. Namely, the selection of the scanning window and the scanning interval value of the receiving end avoids the integral multiple of the buffer time of sending out two different distribution network messages from the power generation switch as much as possible, so that the condition that the two different distribution network messages fall into a scanning blind area when a plurality of distribution network messages are sent can be effectively avoided, and the distribution network success rate is further improved. Preferably, considering that the scanning window of the receiving end is not suitable to be too large, after multiple experiments, when the scanning window and the scanning interval of the receiving end are set to be about 1.5 times of the buffering time, the same-frequency interference to the receiving end is smaller, and at least two different distribution network messages sent outwards after one-time triggering of the self-generating motor of the self-generating switch can be received by the receiving end in the scanning window.
In some embodiments, when the control component sends at least the first distribution network message and the second distribution network message to the outside, the method includes: and broadcasting a plurality of groups of messages sequentially outwards, wherein the first distribution network message and the second distribution network message are arranged in different message groups, each group of messages comprises a plurality of identical messages, buffer time is reserved between two adjacent groups of messages, and at least two of three adjacent buffer times are different. For example, when the control component sends the first network distribution message to the outside, the first network distribution messages may be sent on the channels 37, 38, and 39, respectively, and may be regarded as a broadcast event, which corresponds to an outbound broadcast message group, where the message group includes a plurality of first network distribution messages. Because there is the scanning blind area between two scanning windows around the receiving terminal, and when the time of scanning window is fixed, the scanning blind area also can appear at fixed interval, if from the generating switch when outwards sending multiunit network deployment message, the buffering time that sets up between two adjacent groups network deployment message is a fixed value, then when the scanning window of receiving terminal and buffering time unanimity like all being 20ms, then probably if from the generating switch outwards send a set of network deployment message just fall into the scanning blind area, because buffering time is fixed, follow-up multiunit network deployment message all can fall into the scanning blind area, then lead to from generating switch send multiunit network deployment message all unable be received by the receiving terminal, cause the packet loss. Thus, as shown in fig. 5, the buffering time between two adjacent sets of messages in the present application is configured to be: at least two of the three adjacent buffering times are different. By pertinently setting different buffer times, the network allocation message can be prevented from falling into a scanning blind area, so that the probability of packet loss is reduced. And only two of the three adjacent buffer times can be different, for example, the buffer time at the middle position in the three adjacent buffer times is different from the two buffer times before and after, so that extra loss caused by overlarge jump of the buffer time between each network distribution message to electric energy is avoided when the self-generating machine of the self-generating switch triggers to send a plurality of different network distribution messages once, electric energy is saved, and the electric energy generated by the one-time triggering of the self-generating machine is enough to support the transmission of the plurality of different network distribution messages and can be received by a receiving end. In an optional implementation manner, a random number (random delay) may be added to the buffering time, so that the buffering time of the self-generating switch for sending the distribution network message jumps randomly within a range of a specified minimum value and a specified maximum value, so as to avoid a scanning blind area of the receiving end and reduce the packet loss probability.
In some embodiments, the scanning blind area of the receiving end is considered to be within 1ms in the application, meanwhile, because the electric energy generated by one-time triggering of the self-generating machine is limited, the requirement on the power consumption of the self-generating switch is very high, and a larger broadcasting interval means that higher additional power consumption can be introduced, so that the additional power consumption is reduced as much as possible, and the buffering time of the self-generating switch for sending the distribution network message is not longer than 30ms. I.e. the buffering time for sending the distribution network message from the power generating switch is set to between 1ms and 30ms. Therefore, different distribution network messages sent by the power generation switch can avoid the scanning blind area of the receiving end, the distribution network messages are prevented from just falling into the scanning blind area of the receiving end, and the electric energy loss can be saved.
Based on the above, in the distribution network mode, the self-generating switch generates electric energy once triggered by the self-generating motor so that the control component generates and externally transmits at least two distribution network messages, and the two distribution network messages are different and are used for carrying more distribution network data, so that the safety of the distribution network process is ensured. Because the two distribution network messages are different, the two distribution network messages can be sent out and received by the receiving end, the buffer time is set between the two distribution network messages, the two distribution network messages are prevented from falling into a scanning blind area of the receiving end by the setting of the buffer time, and the electric quantity required by the total time of sending the two distribution network messages is in the energy range generated by pressing the self-generating machine once. Therefore, the automatic generation switch can effectively allocate the network through a low-power-consumption communication protocol under the condition of limited electric quantity so as to cope with various network allocation requirements, and rich control is realized through an access network.
In some embodiments, the first distribution network message further includes a first verification identifier, and the second distribution network message further includes a second verification identifier, so that the external device can verify at least the first distribution network message and the second distribution network message, for example, prevent the verification of attacks such as copy, counterfeit or repeated distribution networks, and join the self-generating switch to the designated network after the verification is passed. The verification identifier may be any character or combination of characters that may be suitable for implementing verification. According to the application, the verification identifier is added into different distribution network messages, so that the security of the distribution network can be improved, and the requirements on the security of the distribution network under different distribution network scenes can be met. The first verification identifier and the second verification identifier may be the same, but are encrypted in different network distribution messages respectively, and then decrypted and verified by external devices which receive the network distribution messages. The first verification identifier and the second verification identifier can be different, and the external device receiving the distribution network message can verify the first verification identifier and the second verification identifier respectively, or can verify the combination of the first verification identifier and the second verification identifier, thereby improving the security of the distribution network. The external devices may include, but are not limited to, electronic devices (e.g., gateways, terminals, routers, etc.), servers, intelligent controllers, etc. For example, after the self-generating switch sends the first distribution network message and the second distribution network message, the gateway can verify the first verification identifier and the second verification identifier in the received distribution network message, and join the self-generating switch in the network of the gateway after the verification is passed; the gateway can also transmit the first verification identifier and the second verification identifier in the distribution network message to the server, the server verifies the first verification identifier and the second verification identifier, and the gateway is instructed to add the self-generating switch into the network of the gateway after the verification is passed; the gateway can also verify a part, and the server verifies a part, such as verifying the first verification identifier in the received distribution network message by the gateway, sending the second verification identifier in the distribution network message to the server after the verification is passed, verifying the second verification identifier by the server, and indicating the gateway to join the self-generating switch into the network of the gateway after the verification is passed. The protection scope of the application is not deviated as long as the external device verifies the received first verification identifier and second verification identifier in the first distribution network message and the second distribution network message, and joins the self-generating switch in the network after the verification is passed. In one example, the control assembly is further configured to: generating a random character string in a distribution network mode; wherein the random string comprises at least the first authentication identifier and the second authentication identifier. When the control component generates the distribution network message, the random character string is generated, the random character string is split to generate the first verification identifier and the second verification identifier, and the first verification identifier and the second verification identifier are respectively written into different distribution network messages.
In some embodiments, the first distribution network message further comprises a first sequence identity, and the second distribution network message further comprises a second sequence identity, the first sequence identity and the second sequence identity being used to indicate that there is an association between the first distribution network message and the second distribution network message. Because the self-generating switch in the application needs to send at least two different distribution network messages outwards when distributing the network, compared with the same distribution network messages sent when distributing the network in the prior art, the receiving end does not need to sort and distinguish, the sequence identifier is added in the distribution network message in the application, so that the receiving end can sort the plurality of received distribution network messages according to the first sequence identifier in the first distribution network message and the second sequence identifier in the second distribution network message after receiving the distribution network message so as to extract the effective distribution network message. Wherein the first sequence identifier and the second sequence identifier are used for indicating the sequence between the first distribution network message and the second distribution network message; or the first sequence identity is the same as the second sequence identity. For example, in an alternative embodiment, the plurality of distribution network messages sent from the power generation switch have an order, and the effective information in the plurality of distribution network messages needs to be extracted and combined according to the order to form the complete effective distribution network message, so that the order of each distribution network message can be indicated by different sequence identifiers in the distribution network message. In another alternative embodiment, the plurality of distribution network messages may be out of order or no strict sequence is required to be set, and valid information in the plurality of distribution network messages need not be combined, so that different sequence identifiers in each distribution network message may be the same or identifiers with specific identical portions. In addition, the first distribution network message and/or the second distribution network message further comprises message type indication information, wherein the message type indication information is used for indicating the message type of the first distribution network message and/or the second distribution network message, and the message type comprises a distribution network message or a control message.
In some embodiments, the first distribution network message includes a first plaintext domain and a first ciphertext domain, and the first sequence identity is carried in the first plaintext domain, or carried in the first ciphertext domain, or carried in the first plaintext domain and the first ciphertext domain; the second distribution network message comprises a second plaintext domain and a second ciphertext domain, and the second sequence identifier is carried in the second plaintext domain, or carried in the second ciphertext domain, or carried in the second plaintext domain and the second ciphertext domain. The first ciphertext domain is generated via a first key encryption; the second ciphertext domain is generated via the first key encryption. The first key may be recorded in the self-generating switch in a manner of storage or burning.
After the self-generating switch joins the designated network, the control component is further configured to: generating a third message, the third message including a third ciphertext domain, the third ciphertext domain generated via encryption of a third key, the third key having an association with at least the first key, the first authentication identifier, and the second authentication identifier. In one example, the third key is generated based at least on the first key, the first authentication identifier, and the second authentication identifier. In the application, after the self-generating switch is added to the appointed network, the third message generated by the control component, namely the control message, can be generated according to the first key, the first verification identifier and the second verification identifier. Therefore, the first verification identifier and the second verification identifier which are generated by the self-generating switch in the distribution network mode and used for verification of the receiving end are also used for generating the control message in the subsequent control stage after the distribution network is successful. In this way, after the distribution network is reset each time, the updated verification identifier is also used in the subsequent control process when the distribution network is re-distributed, that is, the relevant parameters of the control message after the distribution network is reset each time are updated, so that the distribution network and the control safety of the self-generating switch are further improved.
Further, referring to fig. 6, at least a part of the key 101 is configured to generate a displacement in response to an external action, where the external action includes an external action of pressing the key; external actions (e.g., actions to remove a depressing force) to rebound the key; further, under the external action, actions that may occur by the key include, for example, a pressing action and a rebound action;
The self-generating electric machine 103 is arranged to convert mechanical energy into electric energy at least once in response to the displacement;
The control component is electrically connected to the self-generating generator 103, and the self-generating generator 103 provides working electric energy for the control component;
Wherein the control assembly comprises a communication processing module 102, an electric energy storage and conversion module 104 and a storage module 105, and the self-generating machine 103 can comprise an induction part and a motion part; the motion part can be understood as a part or a combination of parts which can be driven by at least one of a key, a reset piece and the like to move, the sensing part can be understood as a part or a combination of parts which can be acted with the motion part to sense electric energy when the motion part moves, and any structure which can generate electric energy based on the motion can be used as an alternative of the embodiment of the application in the field.
In a specific example, the self-generating motor 103 may be configured with a permanent magnet portion, a magnetic conductive portion, and a coil portion, and the coil portion may be disposed on the magnetic conductive portion, so that when the permanent magnet portion and the magnetic conductive portion move relatively, the coil portion may generate an induced voltage. The coil part can be regarded as the above-mentioned induction part, and the permanent magnet part or the magnetic conduction part can be regarded as the above-mentioned movement part, namely: in some examples, the permanent magnet part moves to directly and indirectly drive the key, the reset piece and the like, and in other examples, the magnetic conduction part moves to directly and indirectly drive the key, the reset piece and the like. It can be seen that the sensing portion may or may not move with the moving portion.
The communication processing module 102 is electrically connected with the storage module 105, the induction part of the self-generating machine 103 is electrically connected with the electric energy storage and conversion module 104, and the electric energy storage and conversion module 104 is electrically connected with the communication processing module 102 and the storage module 105.
The key 101 is directly or indirectly driven to the motion part of the self-generating motor 103; wherein: the movement part is arranged to be capable of being driven to move in a first direction when the key 101 is pressed; the sensing part is configured to be capable of generating a first sensing voltage in response to the first direction in which the moving part occurs; the electric energy storage and conversion module 104 is configured to rectify and store a first electric energy corresponding to the first induced voltage; further, the electric energy storage and conversion module 104 is further configured to convert the stored electric energy to output a required power supply voltage to the communication processing module 102 and the storage module 105, so that the communication processing module 102 and the storage module 105 are powered up.
In part of the solution, please refer to fig. 7, the self-generating switch 1 further includes: a reset member 106. The reset piece 106 is configured to directly or indirectly drive the moving part of the self-generating motor 103, the reset piece 106 is configured to deform in response to the movement of the moving part in a first direction and generate a reset force overcoming the deformation, the reset piece 106 is further configured to drive the moving part to move in a second direction by using the reset force after the force that presses the key 101 is removed, and the key 101 rebounds; when the motion part moves in a second direction, a second induced voltage can be generated; the electrical energy storage and conversion module 104 is also configured to store and/or convert a second electrical energy corresponding to the second induced voltage to an appropriate voltage.
In one embodiment, referring to fig. 7, the self-generating switch 1 further includes: a mode identifying module 107, wherein the mode identifying module 107 is electrically connected with the communication processing module 102, the mode identifying module 107 responds to a target touch operation and sends a trigger instruction to the communication processing module 102, and the communication processing module 102 controls the self-generating switch to enter a distribution network mode according to the trigger instruction; otherwise, the communication processing module 102 controls the self-generating switch to enter a control mode. In one example, the mode identifying module 107 may specifically be a network distribution button, and in other examples, the mode identifying module may be implemented in any manner such as a micro switch, a dial switch, a knob switch, etc.
In an alternative embodiment, when the network is configured, a user presses a network configuration button first, then presses a key 101 of a self-generating switch, the key 101 can directly or indirectly trigger the self-generating generator 103 to generate electric energy, the electric energy storage and conversion module 104 rectifies pulse electric energy generated by the self-generating generator 103 and then adjusts the pulse electric energy to a voltage suitable for power supply of the communication processing module 102, then supplies power to the communication processing module 102, the communication processing module 102 detects the network configuration button first after starting, if the network configuration button is detected to be pressed, it is determined that the self-generating switch is currently in a network configuration mode, and the communication processing module 102 splits data required by the network configuration into at least two network configuration messages, namely broadcast data packets, and encrypts and sends the broadcast data packets one by one.
During control, a user presses a key of the self-generating switch, the key 101 can directly or indirectly trigger the self-generating generator 103 to generate electric energy, the electric energy storage and conversion module 104 rectifies pulse electric energy generated by the self-generating generator 103 and then adjusts the pulse electric energy to a voltage suitable for power supply of the communication processing module 102 to supply power to the communication processing module 102, after the communication processing module 102 is started, the communication processing module 102 detects that a distribution network button is not pressed down, then the self-generating switch is determined to be in a control mode, data required by a control command is combined into a control message, namely a Bluetooth broadcast packet, and then the control command is sent outwards.
Further, in some embodiments, when the self-generating switch is in the control mode, current control information and a third sequence identifier are obtained; the current manipulation information includes a key value, the key value characterizing at least one of: the self-generating switch currently receives a controlled key; the key in the self-generating switch is operated by the current received operation; the key value is carried in a parameter field of the third ciphertext domain; the third sequence identity is carried in a third plaintext domain, or carried in the third ciphertext domain, or carried in both the third plaintext domain and the third ciphertext domain, of the control message. The control component obtains current control information and a third sequence identifier, and the method comprises the following steps:
generating the current control information in response to the current control of the self-generating switch;
Reading the stored third sequence identifier;
If the current manipulation belongs to the target manipulation, transforming the third sequence identifier from a first numerical value to a second numerical value according to a preset transformation rule, wherein the first numerical value is different from the second numerical value; the target manipulation includes a push down manipulation and/or a rebound manipulation.
When the communication processing module responds to the current operation of the self-generating switch to send a third message, namely a current control message, the current control message records the current operation information and the current sequence identifier, so that: the receiving end verifies whether the relation between the current sequence identifier in the current control message and the stored historical sequence identifier is matched with a preset transformation rule of the current sequence identifier, and when the relation is matched with the transformation rule, the receiving end executes a control event corresponding to the current control information, and the historical sequence identifier is determined according to the sequence identifier recorded in a control message or a distribution network message sent to the receiving end before the self-generating switch.
The current steering information characterizes at least one of: the self-generating switch; the self-generating switch currently receives a controlled key; and the key in the self-generating switch is operated by the current operation and control action.
It can be seen that since the pushing action and the springback action are in opposition and continuous, springback generally must occur after pushing. Furthermore, in the above scheme, the current sequence identifier may be updated only after the pressed manipulation action occurs, or may be updated only after the rebounded manipulation action occurs, or may be updated both after the pressed manipulation action and after the rebounded manipulation action.
In a specific example, the current control information may include a switch identifier, and further, the switch identifier may be used to characterize the self-generating switch, and the current control information may further include a key value, and further, the key value is used to characterize the key currently received by the self-generating switch, and the currently received control action of the key in the self-generating switch.
The current sequence identifier may be understood as being currently sent out by the self-generating switch, and the historical sequence identifier may be understood as being stored at the receiving end before the self-generating switch sends out.
In some examples, the history sequence identifier may be a current sequence identifier that is sent to the receiving end (sent with the control message or the pairing message) and stored by the receiving end when the self-generating switch generates the control action last time, or determined according to the current sequence identifier, and in other examples, the history sequence identifier may be a current sequence identifier that is sent to the receiving end (sent with the control message or the pairing message) and stored by the receiving end when the self-generating switch generates the specific control action last time (such as the pressed control action or the rebound control action) or determined according to the current sequence identifier.
In one embodiment, referring to fig. 7, the self-generating switch 1 further includes a push-down detection module 108; the pressing detection module 108 is electrically connected to the self-generating motor 103 (for example, an induction part thereof) and the communication processing module 102. The communication processing module 102 is further configured to: the pressing detection module 108 is used for identifying the current operation of the key, and determining that the current operation is a target operation, where the target operation is a designated one selected from a pressing operation and a rebound operation.
In one embodiment, referring to fig. 7, the self-generating switch 1 further includes a key value detection module 109, where the key value detection module 109 is electrically connected to the communication processing module 102; the communication processing module 102 may be further configured to, prior to generating the current control message:
reading a switch identification characterizing the self-generating switch from the memory module 105;
If the currently occurring manipulation action is a pushing manipulation action, then: acquiring current key information through the key value detection module 109, and updating the current key information in the storage module 105;
If the currently occurring manipulation action is a rebound manipulation action, then: acquiring the stored current key information from the storage module 105;
the current control information is determined based on the switch identifier, the currently occurring control action, and the obtained current key information, for example, the switch identifier may be written into the current control message, or the key value may be determined based on the control action and the current key information, and the key value may be written into the current control message.
The communication processing module 102 is further configured to:
After receiving the current operation, responding to the current operation of the self-generating switch, and generating current operation information; reading the stored current sequence identifier; judging whether the current operation belongs to target operation or not; if yes, the current sequence identifier is converted from a first numerical value to a second numerical value according to a preset conversion rule, wherein the first numerical value is different from the second numerical value; the target manipulation includes a push down manipulation and/or a rebound manipulation. In particular, the target manipulation may be determined by one of a push-down and a rebound. In one embodiment, the transformation rule includes: the second value may be obtained by accumulating, subtracting, multiplying or dividing the first value by a reference value.
When the user presses the key of the self-generating switch, immediate feedback of the control effect is often desired. Furthermore, if the serial number is updated only when the command is to rebound (i.e., the target command is a rebound command), then all of the power at the time of the depression can be used for other tasks, particularly signaling, without expending power to update the serial number.
In a specific example, the self-generating switch carries a serial number (i.e. a sequence identifier), the serial number is self-increased (or self-decreased) when the sequence number is pressed for each time, and the serial number is self-increased once after a complete pressing and rebound operation; the message carries information representing pressing/bouncing (it can be understood that the manipulation information can represent manipulation actions).
Specifically, each time the self-generating switch is pressed, the self-generating switch rebounds, and the self-generating generator acts to generate electricity when pressed and rebounded, so as to supply power to the back-end circuit (such as the communication processing module 102, the storage module 105 and the like). The back-end circuit can identify whether the push-down or rebound is performed by the push-down detection module 108.
If a pressed manipulation is performed, the sequence number (i.e., the stored sequence identifier) is read from the memory module 105, then the sequence number is self-increased (which can be understood as the transformation), and then the key information is read to generate a control message. The serial number and key information are written back to the memory module 105, and then can be used for reading when rebounding, and then a message is sent. Wherein the order of writing back the memory module 105 and sending the messages may be interchanged.
If a rebound is performed, the serial number is read directly from the memory module 105 without self-addition (i.e., without performing the transformation), and the key information is also read directly from the memory module 105 (rather than reading the feedback signal to the switching device).
In the application, after a receiving end such as a controlled device receives a current control message, whether the relation between the current sequence identifier and the stored historical sequence identifier is matched with the transformation rule or not can be verified; and executing the control event corresponding to the current control message when the relation is matched with the transformation rule.
If the relationship does not match the transformation rule, the corresponding message (e.g., the current control message) may be discarded; the discarding of the current control message may be understood as not processing based on the current control message, for example: and the control event corresponding to the current control message is not executed, and the information such as the historical sequence identification and the like is not updated and changed based on the current control message.
Therefore, by introducing the current sequence identifier in the interaction process of the self-generating switch and the receiving end, the matching verification of the current sequence identifier and the historical sequence identifier can be used as the basis for executing the control event, the control event of executing the copy message is avoided, and the effect of preventing the copy attack is realized. Meanwhile, by means of the matching verification that whether the current sequence identifier and the historical sequence identifier are matched with the transformation rule or not, a basis can be provided for filtering repeated messages. The replication attack can be understood as follows: an attacker firstly grabs a legal switch message and then sends out the legal switch message as it is. By using sequence identification, copy attacks can be effectively prevented, for example: the receiving end stores the sequence number (i.e. sequence identifier) of the last received message, and after receiving the new message, the receiving end continues checking the sequence number even if the signature information is checked to be legal: the sequence number that has been received when pressed or rebounded before is not allowed, but can only be a larger sequence number than before and falls within a window (all, or a sufficiently large sliding window).
Further, in some embodiments, the control component obtains current steering information, including:
Responding to a detection signal generated by at least one key operated, and circularly reading the detection signal corresponding to each key by the control component according to a set first cycle number to obtain a first key value;
After a preset time interval, the control component circularly reads the current detection signal of each key according to the set second circulation times to obtain a second key value, and the second key value is used as the key value in the current control information; the second key value has an association relationship with the first key value.
In the application, when the self-generating switch is provided with a plurality of keys, any key or a plurality of keys of the self-generating switch are pressed down simultaneously, and the depression degree of the keys drives the self-generating generator to start so as to generate electric energy. And after the communication processing module responds to the power-on operation of the electric energy, the level of all the IO ports is detected in a polling way, and the pressed keys are identified according to the level of the IO ports. For example, if a key is pressed, the IO port to which the key is connected is low, otherwise high. The communication processing module detects that the key is pressed, the key value bit corresponding to the key is set to be 1, otherwise, the key value bit is set to be 0. And after all the IOs are detected, the communication processing module acquires the complete key value, and at the moment, the key value information is added into the message, and the message is sent out through wireless.
However, when the user uses the multi-key combination control of the self-generating switch, for example, a plurality of keys are simultaneously pressed to perform a specific manipulation. When a user presses multiple keys simultaneously, the "simultaneous" is a macroscopic simultaneous operation, while the microscopic key presses are of a differential action time. That is, when the user presses a plurality of keys simultaneously, the connection of the level of the IO port corresponding to each key has a time difference. Moreover, as shown in fig. 8, when the key is pressed, the IO level has a jitter problem, if the communication processing module detects the IO level, just at the time point of pressing the key, the IO level has a jitter, and it is possible that the key is missed to read the wrong key value, and finally the message sent out is the wrong key value, thereby causing control errors.
Based on this, in some embodiments, to solve the key shake problem, when the communication processing module detects a key, the shake eliminating manner is to delay for about 10ms after detecting a low level, and then re-read the IO level, if the IO level is still low, the communication processing module determines that the IO level is a valid key event, otherwise, determines that the IO level is a signal interference, and ignores the low level event. Although the problem of key shake can be solved, an accurate key value is identified, because the self-power-generation switch has limited electric quantity, if the self-power-generation switch waits for IO delay one by one according to the shake-elimination mode, a large part of electric quantity is consumed, so that the electric quantity finally available for sending out messages is too small, and the quantity of sent packets is insufficient or even no packets are sent.
Further, in the application, considering that in the process of pressing the key of the self-generating switch, the self-generating motor is likely to act first, but the key is not turned on, at this time, the program in the communication processing module is started to run, but the key is not turned on, so that the program cannot detect the correct key value, and finally the message sent out by wireless contains the wrong key value. According to the application, the communication processing module circularly reads the detection signal corresponding to each key according to the set first cycle times after responding to the detection signal generated by the operation and control action of at least one key, namely after detecting that the key is pressed down, so as to obtain a first key value, thereby avoiding the influence caused by different key on-time differences when a plurality of keys are pressed down simultaneously; and after a preset time interval, the control component circularly reads the current detection signal of each key according to the set second circulation times to obtain a second key value, and the second key value is used as the key value in the current control information. The second key value has an association relationship with the first key value, for example, the second key value may be read based on the first key value, or after the second key value is read, the first key value is used as a comparison object to perform comparison, a final key value is obtained according to a comparison result, and the like. Thus, if the phenomenon of key missing reading exists when the first key value is obtained through the first cycle reading, the second key value obtained through the second cycle reading after waiting for a certain time interval can be used as the supplement of the key value missing reading, so that the accuracy of the key value reading is improved, and the problem of key value reading errors caused by key shaking is effectively avoided. The first cycle times and the second cycle times may be the same or different, and may be set in a user-defined manner according to the actual application.
In one example, as shown in fig. 9, after initializing the IO and its rf unit, the communication processing module sets the rf unit to a low power mode, and then waits for a key press, and if no key is pressed, it waits all the time. After the communication processing module detects that a key is pressed, starting to circularly read the key value, and circularly reading for a plurality of times to avoid the influence caused by the key-on time difference. After the key is turned on, due to the problem of level jitter, the communication processing module and the radio frequency unit thereof are in a low power consumption mode during waiting for 10ms, so that the power consumption is reduced, after the power consumption exceeds 10ms, the communication processing module wakes up to read the key again (reads 100 times circularly), then configures the radio frequency unit thereof to exit the low power consumption mode, and then sends a wireless message. When the key is read for 100 times in the first cycle, the key may be at the time point of front edge jitter in fig. 8, and the risk of key value missed reading caused by front edge jitter may be reduced by adopting a bitwise or operation mode. The key value data read for the first time can be reserved in a bit pressing or operation mode when the key value is read for the second time in a circulating mode, and meanwhile, if the key value is read for the first time, the key value is read for the second time, and the key value can be used as a supplement of the key value missing reading.
Specifically, the control component circularly reads the detection signal corresponding to each key according to the set first cycle times to obtain a first key value, which comprises the following steps:
After the detection signals corresponding to all keys are read in each cycle, generating a current key value, performing OR operation on the current key value and the historical key value generated in at least the last cycle reading, and obtaining a first key value after the cycle reading operation is performed for the set first cycle times.
In one example, the key value of the multi-key self-generating switch is represented by binary data, i.e., 1 bit to represent the state of a single key, 1 bit if the key is in the pressed state, and 0 bit if the key is in the non-pressed state. The self-generating switch has 6 keys, each key is respectively connected to one IO pin of the communication processing module, and the corresponding relation between each key and the IO pin is shown in the following table 1:
Assuming that the button 1 is pressed, the port P0.3 is low, the return value of the program read port P0 key value of the communication processing module is 0Bxxxxxxxxxxxx < 0 > xxx, namely bit3 is 0 (representing low level), and the rest bit levels are uncertain. Assuming that all IOs are configured with pull-up, the key is pressed low and not pressed high. At this time, if the key 1 is pressed, the P0 port level return key value read by the program is: 0B1111111111110111; if the key 2 is pressed, the P0 port level return key value read by the program is as follows: 0B1111101111111111; if the key 1, the key 2 and the key 3 are pressed simultaneously, the P0 port level return key value read by the program is: 0B1111101111110110.
Assuming that 1 uint8 type variable keynum is defined, in order to achieve that 1 byte represents a key value, each IO read key value needs to be assigned to a key value byte after shift integration processing. Namely, the key value read by the key 1 is shifted to the right by 3 bits, and is bit-wise or operated with the key value byte keynum after being taken out, and the calculated result is reassigned to keynum; the key value read by the key 2 moves by 9 bits to the right, and after the key value is taken out, the key value is subjected to bit pressing or operation with a key value byte keynum, and the calculated result is reassigned to keynum; the key value read by the key 3 is shifted to the left by 2 bits, and is bit-wise or operated with the key value byte keynum after being taken out otherwise, and the calculated result is reassigned to keynum; the key value read by the key 4 moves 2 bits to the right, and after the key value is taken out, the key value is subjected to bit pressing or operation with a key value byte keynum, and the calculated result is reassigned to keynum; the key value read by the key 5 is directly fetched, and then is subjected to bit pressing or operation with a key value byte keynum, and the calculated result is reassigned to keynum; the key value read by the key 6 is shifted by 1 bit to the right, and after the key value is taken out, the key value is subjected to bit pressing or operation with the key value byte keynum, and the calculated result is reassigned to keynum.
After the above processing, assuming that only the key 1 is pressed, the key value read by the communication processing module is 0x01; assuming that only the key 2 is pressed, the key value read by the communication processing module is 0x02; assuming that only the key 3 is pressed, the key value read by the communication processing module is 0x04; assuming that the key 1, the key 2, and the key 3 are simultaneously pressed, the key value read by the communication processing module is 0x07. I.e. the position of each key in the read key value is determined. Therefore, when the key value is read in each cycle, the value of each key in the key value and the value of each key in the key value read last time can be subjected to bit pressing or operation, and when a certain key is in a front shaking stage and is missed in the previous reading of the key value, the missed key can be effectively corrected in a mode of repeated cycle reading and combined with bit pressing or operation, so that the risk of key value missed reading caused by front shaking is reduced.
In some embodiments, the data size of the distribution network required by different electronic devices or servers when the self-generating switch is connected to the network is larger than the maximum data size carried by one message sent by the self-generating switch, so that the distribution network data can be split into a plurality of distribution network messages according to the difference of the data sizes of the distribution network data when the different electronic devices or servers are connected to the network.
In one example, the bluetooth message format sent from the power switch is shown in fig. 10, where the Preamble field characterizes the Preamble. The ACCESS ADDRESS field characterizes the access address. The PDU Header field characterizes the broadcast parameters. The PayLoad field characterizes the payload section. sourceAddress characterize the physical address of the self-generating switch. The AD structure field characterizes the broadcast data structure. The Length field characterizes the Length of the broadcast data. The AD Type field characterizes the AD Type. The AD Date field characterizes broadcast data in which payload data may be considered to be included. The payload data includes assistance data and valid data that may be carried in Params parameter fields in the AD Date field. In the figure, it can be known that the data carried by the Params parameter field in one bluetooth packet is at most 10 bytes, and in some scenarios, different electronic devices or servers require that the valid data sent by the network allocation packet is 30 bytes in total when the network is accessed to the self-generating switch, which exceeds the maximum valid data carried by one bluetooth packet sent by the self-generating switch. Based on the above, when the self-generating switch is configured, the valid data of 30 bytes needs to be split into at least 3 bluetooth messages to be sent, and after receiving the complete 30-byte configuration parameters, different electronic devices or servers can execute the operation of adding the self-generating switch to the network.
The 3 bluetooth messages split during the power generation switch network distribution are shown in fig. 11a, 11b and 11c, wherein each split bluetooth message, namely, the network distribution message, comprises a plaintext domain and a ciphertext domain, wherein the plaintext domain can be regarded as a plaintext part of the message, the ciphertext domain can be regarded as a ciphertext part of the message, and the first sequence identifier or the second sequence identifier sn is carried in the plaintext and the ciphertext of the message. The plaintext includes a device trademark identification field Company ID for characterizing a device manufacturer ID, which may be 2 bytes in length. The invention also comprises a message type indication field head, wherein the message type indication field is used for indicating the message type of the current message, and the message type comprises a distribution network message type and a control message type; the head field is used for indicating whether the current message is a distribution network message or a control message, and further, the content carried by the sequence identification field and the Params parameter field in the distribution network message and the control message are different; the head field may be 1 byte in length. The invention also includes a switch identification field mac, where the switch identification field is used to indicate identification information of the self-generating switch, and the length of the switch identification field may be 6 bytes. The parameter field in the secret carries valid data, and the valid data can comprise distribution network data and verification identification. As described above, since the distribution network data and the verification identifier are added to exceed the data amount that can be carried by the parameter field in one distribution network message, the distribution network data and the verification identifier are split into the parameter fields of 3 distribution network messages, and the splitting mode may be random splitting, splitting according to the size of the data amount, splitting according to the arrangement sequence of the distribution network data and the verification identifier, and the like, which is not limited herein. In addition, in order to enable the receiving end receiving 3 distribution network messages to extract complete distribution network data and verification identifications, the sequence identification is used for indicating the sequence of different distribution network messages.
Optionally, the distribution network data includes at least one of a product type identification pid, hardware version number information fw-ver, byte order conversion type information ind, protocol version number information protocol-ver, and attribute indication information flags or various combinations thereof. The authentication identifier may be a random string srand generated when the power generation switch is configured. Splitting the distribution network data and the verification mark into parameter fields of 3 distribution network messages to form 3 distribution network messages. As shown in the figure, each distribution network packet may include a portion of distribution network data and a portion of random string srand, where the length of the product type identifier pid is 8 bytes, the length of the hardware version number information fw-ver is 1 byte, the length of the byte sequence conversion type information kined is 2 bytes, the length of the protocol version number information protocol-ver is 1 byte, the length of the attribute indication information flags is 1 byte, and the length of the random string srand is 10 bytes. In addition, the parameter field may further include reserved information rev, so that when a subsequent protocol adds new content, the reserved information rev may be used to carry the new content, without needing to make a larger change to the format of the message, thereby improving flexibility of message application. The last byte of the parameter field in the last split distribution network message can also carry the crc information, and the crc information is used for indicating the crc calculated values of the parameter field contents in all split distribution network messages, so that the subsequent receiving end performs crc verification on the parameter field contents in the distribution network messages, and the accuracy of the distribution network is improved.
In some embodiments, the secret further includes a CRC field, where the CRC field carries a CRC calculation value for the parameter field and the sequence identifier sn, so that after the receiving end receives the network packet, the receiving end verifies whether the information of the parameter field and the sequence identifier sn is correct by checking the CRC calculation value of the CRC field. Also included in the message is a transmission indication field (tp) that characterizes at least one of:
The association information of the distribution network message and other distribution network messages; for example, if the distribution network packet is one of the split distribution network packets, the transmission indication field may indicate whether the distribution network packet has another split distribution network packet in the next step, so that the receiving end processes the split distribution network packet.
And the forwarding information is used for triggering the function of forwarding the information to other equipment by the external equipment receiving the distribution network message.
Wherein, the length of the parameter field may be 10 bytes, the length of the CRC field may be 1 byte, and the length of the transmission indication field may be 1 byte.
It should be noted that, the first sequence identifier and the second sequence identifier in the network configuration mode may indicate the sequence of the plurality of network configuration messages, and of course, the network configuration mode may also have an effect of preventing copy attack. In an alternative embodiment, the first sequence identifier, the second sequence identifier and the third sequence identifier during control in the network configuration may be stored and maintained as the same sequence identifier in the self-generating switch, so as to accumulate and update based on control. The difference between the two is mainly whether the distribution network message or the control message is written.
In another alternative embodiment, the first sequence identifier, the second sequence identifier, and the third sequence identifier when the network is configured, may be stored and maintained in the self-generating switch as separate sequence identifiers. For example, the first sequence identifier and the second sequence identifier in the network configuration process may be only used to indicate the sequence of the multiple network configuration messages, so that after the receiving end receives the multiple network configuration messages, the receiving end orders the multiple network configuration messages according to the first sequence identifier and the second sequence identifier, so as to combine the multiple network configuration messages into complete network configuration data. The first sequence identifier and the second sequence identifier may not be limited to have strict incremental changes, for example, when the self-generating switch resets the distribution network, the first sequence identifier may also be reset to 0, and the sequence identifiers in the multiple distribution network messages may be 1,2, 3, and so on. When the distribution network is completed and in the control mode, the third sequence identifier in the control message changes (increases or decreases) according to a preset transformation rule based on the target manipulation such as pressing or bouncing, and the change basis of the third sequence identifier is the historical sequence identifier generated by the last target manipulation in the control mode. The third sequence identifier needs to be strictly increased or decreased according to a preset transformation rule, so that the receiving end can perform anti-copy attack processing on the received control message according to the third sequence identifier and can perform duplicate removal filtering.
In one example, the distribution network flow of the self-generating switch is as follows:
Configuring a mobile phone APP or a Bluetooth gateway to enter a distribution network mode;
the user presses the distribution network button of the self-generating switch and simultaneously presses a key to operate the self-generating switch to send the distribution network message outwards. The ciphertext part of the distribution network message is encrypted by adopting a prestored first key as an encryption key, and a sequence identifier (such as a serial number) and a verification identifier (such as a random character string) are added into the encrypted data content for preventing copy attack. The self-generating switch encrypts and packetizes information comprising pid, mac address, serial number, random character string and the like, sends the information to the mobile phone APP or the Bluetooth gateway, calculates and generates a third key according to the first key and the random character string just generated after the self-generating switch sends the message out, and stores the third key into the nonvolatile storage module 105, wherein the third key is used for controlling data encryption of the message after the follow-up network distribution is completed.
After receiving a plurality of distribution network messages sent by the power generation switch, the mobile phone APP or the Bluetooth gateway decrypts and verifies the ciphertext by using a second key, wherein the second key is matched with the first key. The first key and the second key may be the same, or in other examples, may be different. After the mobile phone APP or the Bluetooth gateway verifies the distribution network information in the distribution network message, determining that the self-generating switch is legal equipment information, sending the distribution network message to a server such as a cloud, and decrypting and checking the distribution network message after the cloud receives the distribution network message reported by the mobile phone APP or the Bluetooth gateway, for example, the cloud decrypts whether a ciphertext part sequence number of the distribution network message is consistent with a plaintext part sequence number or not by using a second secret key, or checks a CRC calculation value in a CRC field, and after the verification is passed, further, verifying a random character string in the distribution network message, for example, the cloud acquires a switch identifier in the distribution network message; verifying whether at least the combination of the switch identification, the first verification identification and the second verification identification is matched with the cloud-stored historical verification identification. After the power generation switch is successfully distributed, the cloud end records a random character string (namely a combination of the first verification identifier and the second verification identifier) generated when the power generation switch is matched with the power generation switch. When the cloud receives the current distribution network message, the cloud verifies whether the switch identification and the corresponding random character string in the current distribution network message are recorded in the historical data of the cloud, so that an attacker is prevented from repeating the distribution network by using the switch identification and the corresponding random character string of the self-generating switch to copy and attack. If the switch identifier, the first identifier and the second identifier are verified to be combined, the combination is not recorded on the cloud, the verification is passed, a third key is generated according to a first key (the first key can be stored in the server in advance), the first identifier and the second identifier, and the third key is issued to the mobile phone APP or the Bluetooth gateway. After receiving the third secret key issued by the cloud, the mobile phone APP or the Bluetooth gateway stores the third secret key into a nonvolatile memory of the mobile phone APP or the Bluetooth gateway, and adds the self-generating switch into the network, so that the distribution network of the self-generating switch is completed.
After the power generation switch is successfully distributed, the third secret key generated after the power generation switch sends the distribution network message is consistent with the third secret key issued to the mobile phone APP or the Bluetooth gateway by the cloud, so that the power generation switch can encrypt the control message based on the third secret key and perform information interaction with the mobile phone APP or the Bluetooth gateway in a control mode, and control of other controlled equipment connected to the mobile phone APP or the Bluetooth gateway through the network is realized.
In the application, the third secret key is generated by the self-generating switch and the cloud server respectively and is not transmitted to the server through broadcasting after being generated by the self-generating switch, so that the danger that the third secret key is hijacked and cracked in the transmission process is reduced; in addition, a random character string is introduced in the generation process of the third secret key, and the random character string is generated by a self-generating switch during network distribution, so that the whole encryption has larger uncertainty, the difficulty of external cracking is greatly increased, and the safety of data transmission, network distribution and control is improved.
In addition, the third secret key is not directly broadcast and sent to the gateway by the self-generating switch when the network is configured, but is generated after the server passes verification and then is issued to the gateway, and the gateway can only join the self-generating switch to the network after receiving the third secret key issued by the server. The verification complexity of the self-generating switch during network distribution is increased, the self-generating switch can be distributed only in a networking state (such as authorization of a server is needed), the network cannot be distributed in a non-networking state, and the network distribution safety is improved.
After the self-generating switch is successfully distributed, the Bluetooth equipment in the Bluetooth mesh network can be controlled by sending a control message. The format of the control message is shown in fig. 12. The self-generating switch can fill information representing control modes, control types, lengths, key values and the like in parameter fields of the control message, and further can realize scene control of any controlled equipment in the network by configuring scenes on the mobile phone APP.
Referring to fig. 13, the present application further provides a method for processing a self-generating switch, including:
S1301: if the self-generating switch is in a distribution network mode and at least one operation is performed on a key of the self-generating switch, generating at least a first distribution network message and a second distribution network message, wherein the first distribution network message and the second distribution network message are different;
S1302: sending at least the first distribution network message and the second distribution network message to the outside, wherein buffer time is reserved between the first distribution network message and the second distribution network message; the buffer time is matched with the electric energy generated by the primary triggering of the self-generating machine, so that the first distribution network message and the second distribution network message can be sent in a designated time, and the self-generating switch enters a power-down state after the message is sent; such that: the external device is capable of receiving and joining the self-generating switch to a designated network based on the first and second distribution network messages.
Optionally, the buffering time is set to N/M; n is a scanning window of the external device, M is a non-integer greater than 1, and/or the duty ratio of the scanning window of the external device to the scanning interval is set to be not less than 80%.
Optionally, the buffering time is set to between 1ms and 30 ms.
Optionally, the sending at least the first distribution network message and the second distribution network message to the outside includes:
and broadcasting a plurality of groups of messages sequentially outwards, wherein the first distribution network message and the second distribution network message are arranged in different message groups, each group of messages comprises a plurality of identical messages, buffer time is reserved between two adjacent groups of messages, and at least two of three adjacent buffer times are different.
Optionally, the first distribution network message further includes a first verification identifier, the second distribution network message further includes a second verification identifier, so that the external device verifies at least the first distribution network message and the second distribution network message, and joins the self-generating switch in the designated network after the verification is passed.
Optionally, the method further comprises:
generating a random character string in a distribution network mode; wherein the random string comprises at least the first authentication identifier and the second authentication identifier.
Optionally, the first network allocation message further includes a first sequence identifier, and the second network allocation message further includes a second sequence identifier, where the first sequence identifier and the second sequence identifier are used to indicate that there is an association between the first network allocation message and the second network allocation message.
Optionally, the first sequence identifier and the second sequence identifier are used for indicating an order between the first distribution network message and the second distribution network message; or the first sequence identity is the same as the second sequence identity.
Optionally, the first distribution network message includes a first plaintext domain and a first ciphertext domain, and the first sequence identifier is carried in the first plaintext domain, or carried in the first ciphertext domain, or carried in the first plaintext domain and the first ciphertext domain;
The second distribution network message comprises a second plaintext domain and a second ciphertext domain, and the second sequence identifier is carried in the second plaintext domain, or carried in the second ciphertext domain, or carried in the second plaintext domain and the second ciphertext domain.
Optionally, the first distribution network message includes a first ciphertext domain, and the first ciphertext domain is generated by encrypting a first key; the second distribution network message includes a second ciphertext domain that is generated via encryption of the first key.
Optionally, after the self-generating switch joins the specified network, the method further includes: generating a third message, the third message including a third ciphertext domain, the third ciphertext domain generated via encryption of a third key, the third key having an association with at least the first key, the first authentication identifier, and the second authentication identifier.
Optionally, the third key is generated at least according to the first key, the first authentication identifier and the second authentication identifier.
Referring to fig. 14, the present application further provides an electronic device 90, including a memory 92, a processor 91, and a program stored in the memory 92 and running on the processor 91, wherein the processor 91 can communicate with the memory 92 through a bus 93, and the processor 91 implements the following steps when executing the program:
the electronic equipment at least receives a first distribution network message and a second distribution network message sent by a power generation switch, wherein the first distribution network message and the second distribution network message are different;
the electronic equipment verifies at least the first distribution network message and the second distribution network message;
And the electronic equipment adds the self-generating switch which passes the verification to a specified network.
Optionally, the electronic device may be capable of communicating with a server, the first network allocation message further includes a first authentication identifier, and the second network allocation message further includes a second authentication identifier; before the electronic device joins the self-generating switch after passing the verification to the designated network, the electronic device further includes:
The electronic equipment at least verifies the first distribution network message and the second distribution network message, and at least sends the first distribution network message and the second distribution network message to a server after verification is passed, so that: the server at least verifies the first verification identifier and the second verification identifier, and feeds back a third key to the electronic equipment after the verification is passed;
the electronic equipment receives the third secret key fed back by the server.
Optionally, the first distribution network message includes a first ciphertext domain, and the first ciphertext domain is generated by encrypting a first key; the third key has an association with at least the first key, the first authentication identifier and the second authentication identifier.
Optionally, after the electronic device joins the self-generating switch after passing the verification to a specified network, the method further includes:
The electronic equipment receives a third message sent by the self-generating switch;
The electronic equipment acquires current control information and a third sequence identifier in the third message; the current manipulation information includes a key value, the key value characterizing at least one of: the self-generating switch currently receives a controlled key; the key in the self-generating switch is operated by the current received operation; the key value is obtained by decrypting the third message through the third key;
And after the electronic equipment verifies that the third sequence identifier passes, executing a control event corresponding to the current control information.
The application also provides a control system which comprises the self-generating switch and the electronic equipment in the embodiment.
Optionally, the control system further comprises a server capable of communicating with the electronic device, the server being configured to:
Receiving a first distribution network message and a second distribution network message sent by the electronic equipment;
verifying a first verification identifier in the first distribution network message and a second verification identifier in the second distribution network message;
and after the verification is passed, feeding back a third key to the electronic equipment.
Optionally, when the server verifies the first verification identifier in the first distribution network message and the second verification identifier in the second distribution network message, the method includes:
acquiring a switch identifier in the first distribution network message or the second distribution network message;
Verifying whether at least a combination of the switch identification, the first verification identification and the second verification identification matches a historical verification identification stored by the server.
Optionally, the first distribution network message includes a first plaintext domain and a first ciphertext domain, where the first ciphertext domain is generated by encrypting a first key; before verifying the first verification identifier in the first distribution network message and the second verification identifier in the second distribution network message, the server is further configured to:
Decrypting the first sequence identifier carried in the first ciphertext domain by using a second key, and verifying whether the first sequence identifier obtained by decryption is matched with the first sequence identifier carried in the first ciphertext domain; and/or the number of the groups of groups,
Decrypting the CRC calculation value carried in the first ciphertext domain by using a second key, and checking the CRC calculation value;
Wherein the second key matches the first key.
Optionally, the third key is generated by the server at least according to the first key, the first authentication identifier and the second authentication identifier.
Optionally, the control system further comprises a controlled device, wherein the controlled device can communicate with the electronic device;
The self-generating switch is also used for sending a third message outwards; the third message at least comprises current control information of the self-generating switch;
The electronic equipment is also used for receiving the third message and sending a control message to the controlled equipment according to the current control information; the controlled equipment has an association relation with the self-generating switch;
And the controlled equipment receives the control message and executes the control result pointed by the control message.
The technical terms, features, alternative embodiments and technical effects referred to above may be understood with reference to the above description of the respective embodiments, and will not be repeated here.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. A self-generating switch, comprising:
a self-generating generator;
The key can directly or indirectly trigger the self-generating machine to generate electric energy;
The control assembly is electrically connected with the self-generating motor and is used for:
And when receiving the electric energy from the self-generating electric machine, the electric energy is electrified, and the electric energy can support the control assembly to work for a specified time.
2. The self-generating switch of claim 1, wherein at least a portion of the key is configured to generate a displacement in response to an external action, and the self-generating generator is configured to convert mechanical energy to electrical energy at least once in response to the displacement.
3. The self-generating switch of claim 1, wherein the self-generating motor comprises an induction portion and a motion portion; the motion part is a component or a combination of components which can be driven by a key to move, and the sensing part is a component or a combination of components which can act with the motion part to sense and generate electric energy when the motion part moves.
4. A self-generating switch as defined in claim 3, wherein said control assembly includes a communication processing module, an electrical energy storage and conversion module, and a storage module; the communication processing module is electrically connected with the storage module, the induction part of the self-generating machine is electrically connected with the electric energy storage and conversion module, and the electric energy storage and conversion module is electrically connected with the communication processing module and the storage module;
The key is directly or indirectly transmitted to the motion part of the self-generating motor; wherein: the movement part is arranged to be capable of being driven to move in a first direction when the key is pressed; the sensing part is configured to be capable of generating a first sensing voltage in response to the movement of the moving part in the first direction; the electric energy storage and conversion module is used for rectifying and storing the first electric energy corresponding to the first induced voltage; further, the electric energy storage and conversion module is further used for converting the stored electric energy to output required power supply voltage to the communication processing module and the storage module, so that the communication processing module and the storage module are electrified.
5. The self-generating switch of claim 4, further comprising a reset;
The reset piece is arranged to be directly or indirectly driven to the motion part of the self-generating machine, the reset piece is arranged to be capable of responding to the motion of the motion part in the first direction to generate deformation and generate reset acting force overcoming the deformation, and the reset piece is also arranged to be capable of driving the motion part to generate motion in the second direction by using the reset acting force after the acting force enabling the key to be pressed down is removed, and the key is rebounded.
6. The self-generating switch of claim 5, wherein the sensing portion is configured to generate a second induced voltage when the motion portion moves in a second direction.
7. The self-generating switch of claim 6, wherein the electrical energy storage and conversion module is further configured to store and/or convert a second electrical energy corresponding to the second induced voltage to a suitable voltage.
8. The self-generating switch according to claim 1, wherein the self-generating motor is provided with a permanent magnet portion, a magnetically conductive portion, and a coil portion provided in the magnetically conductive portion, and further wherein the coil portion is capable of generating an induced voltage when the permanent magnet portion and the magnetically conductive portion are relatively moved.
9. The self-generating switch of claim 1, further comprising a mode identification module electrically connected to the control component, the mode identification module sending a trigger instruction to the control component in response to a target touch operation, the control component controlling the self-generating switch to enter a distribution mode according to the trigger instruction; otherwise, the control component controls the self-generating switch to enter a control mode.
10. A control system comprising the self-generating switch of any one of claims 1 to 9.
CN202410322951.4A 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system Pending CN118233295A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410322951.4A CN118233295A (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210684870.XA CN115118586B (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system
CN202410322951.4A CN118233295A (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210684870.XA Division CN115118586B (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system

Publications (1)

Publication Number Publication Date
CN118233295A true CN118233295A (en) 2024-06-21

Family

ID=83327488

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210684870.XA Active CN115118586B (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system
CN202410322951.4A Pending CN118233295A (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202210684870.XA Active CN115118586B (en) 2022-06-13 2022-06-13 Self-generating switch, processing method thereof, electronic equipment and control system

Country Status (1)

Country Link
CN (2) CN115118586B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103576633A (en) * 2012-08-09 2014-02-12 海尔集团公司 Method and system for conducting power supply control on intelligent home systems in community micro grid
JP7141202B2 (en) * 2017-07-31 2022-09-22 株式会社Lixil Batteryless remote controller
FR3079654B1 (en) * 2018-04-03 2021-05-07 Schneider Electric Ind Sas WIRELESS CONTROL DEVICE AND ASSEMBLY INCLUDING SUCH A DEVICE, AS WELL AS ANOTHER CONTROL DEVICE SUITABLE TO BE CONNECTED TO AN ELECTRICAL WIRE
CN111083654B (en) * 2019-12-18 2022-09-16 欧普照明股份有限公司 Method for realizing control of wireless passive switch, wireless passive switch and proxy node
CN116631798A (en) * 2021-06-10 2023-08-22 武汉领普科技有限公司 Self-generating switch, control method thereof, distribution network method, processing method and system
CN117560283A (en) * 2021-11-04 2024-02-13 武汉领普科技有限公司 Self-generating switch, distribution network method thereof and processing system
CN114336918A (en) * 2022-01-10 2022-04-12 武汉领普科技有限公司 Self-generating switch and processing method and processing system thereof

Also Published As

Publication number Publication date
CN115118586A (en) 2022-09-27
CN115118586B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
Vilajosana et al. Ietf 6tisch: A tutorial
CN110708688B (en) Intelligent equipment network distribution method and device, controller and medium
EP3322100B1 (en) Electronic device and method of operating the same
US11317348B2 (en) Communication apparatus and communication method for low power event monitoring
CN102638460B (en) Home gateway, Cloud Server and the method communicated between the two
CN103777604A (en) Intelligent equipment cloud platform control method based on SDMP protocol
CN103716129A (en) Internet of Things-used wireless communication method and Internet of Things-used wireless communication apparatus
CN102461288A (en) Advanced commissioning of wireless network systems
CN111083654B (en) Method for realizing control of wireless passive switch, wireless passive switch and proxy node
CN204215241U (en) A kind of soymilk machine
CN113517152B (en) Switch control method, receiving end control method, self-generating switch and receiving end
CN110018642A (en) A kind of quick control method of smart home device, medium and smart home device
CN103841658A (en) Method and device for transmitting and receiving information
CN104767768A (en) Methods for sending and receiving network access configuration information of household appliances, and household appliances
CN115421401A (en) Self-generating switch and control system thereof
CN104917605A (en) Key negotiation method and device during terminal device switching
CN113517951B (en) Self-generating switch and processing method thereof, receiver and processing method thereof
CN105159121A (en) Household appliance, startup and shutdown control method and system thereof and intelligent device
CN114245319A (en) Bluetooth Mesh-based enhanced broadcast concurrent OTA (over the air) firmware upgrading method
CN108632117A (en) A kind of control method, equipment and system
CN115118586B (en) Self-generating switch, processing method thereof, electronic equipment and control system
KR101529471B1 (en) Wireless personal area network
CN106297242A (en) The method and apparatus controlling home appliance
CN112468382B (en) Economical RTU communication method and system based on MODBUS protocol
CN107656455A (en) A kind of implementation method and device of low-power consumption panel-switch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination