[go: up one dir, main page]

CN115421401A - Self-generating switch and control system thereof - Google Patents

Self-generating switch and control system thereof Download PDF

Info

Publication number
CN115421401A
CN115421401A CN202210558557.1A CN202210558557A CN115421401A CN 115421401 A CN115421401 A CN 115421401A CN 202210558557 A CN202210558557 A CN 202210558557A CN 115421401 A CN115421401 A CN 115421401A
Authority
CN
China
Prior art keywords
current
key
processor
self
identification
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
CN202210558557.1A
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 CN202210558557.1A priority Critical patent/CN115421401A/en
Publication of CN115421401A publication Critical patent/CN115421401A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01HELECTRIC SWITCHES; RELAYS; SELECTORS; EMERGENCY PROTECTIVE DEVICES
    • H01H13/00Switches having rectilinearly-movable operating part or parts adapted for pushing or pulling in one direction only, e.g. push-button switch
    • H01H13/02Details
    • H01H13/12Movable parts; Contacts mounted thereon
    • H01H13/14Operating parts, e.g. push-button
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/12Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them characterised by data transport means between the monitoring, controlling or managing units and monitored, controlled or operated electrical equipment
    • Y04S40/126Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them characterised by data transport means between the monitoring, controlling or managing units and monitored, controlled or operated electrical equipment using wireless data transmission

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Input From Keyboards Or The Like (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a self-generating switch, a processing method and a control system thereof, wherein the processing method comprises the following steps: in the continuously-generated one-press control action and one-rebound control action, aiming at least one control action, before, after or at the same time of generating and sending a corresponding current control message to a receiving end through the wireless communication module, the processor also reads a current verification identifier from the memory, updates the current verification identifier, and writes the updated current verification identifier back to the memory before the electric energy stored in the energy storage module is exhausted, wherein the verification identifiers before and after updating are different.

Description

Self-generating switch and control system thereof
Technical Field
The invention relates to the field of self-generating switches, in particular to a self-generating switch and a control system thereof.
Background
A wireless switch may be understood as a switch configured with a wireless communication module, wherein one of the wireless switches is a self-generating switch, in the conventional self-generating switch, the wireless switch is usually communicated with the outside through a radio frequency communication module, for example, the self-generating switch may communicate with various receiving terminals (e.g., lamps, wall switches, etc.) through radio frequency signals.
In the prior art, when the self-generating switch is controlled, a control message is sent out in response to the control of the self-generating switch, however, the content in the control message is relatively simple, and usually only information describing a key and a switch is included, so that the requirement on safety cannot be met.
Disclosure of Invention
The invention provides a self-generating switch and a control system thereof, which aim to solve the problem that the safety requirement cannot be met.
According to a first aspect of the invention, a self-generating switch is provided, which comprises a processor, a memory, a key, a generator, a reset component, a rectifying module, an energy storage module, a voltage output module and a wireless communication module, wherein the wireless communication module is electrically connected with the memory and the processor, an induction part of the generator is electrically connected with the energy storage module through the rectifying module, the energy storage module is electrically connected with the wireless communication module and the processor through the voltage output module, the reset component can be in transmission with a motion part of the generator, and the key can also be in direct or indirect transmission with the motion part of the generator.
According to a second aspect of the present invention, there is provided a control system comprising the self-generating switch, and the receiving terminal.
In the self-generating switch, the processing method thereof and the control system provided by the invention, the current verification identifier is introduced into the control message reported by the self-generating switch, and the current verification identifier (for example, verification based on the current verification identifier and the historical verification identifier) can be used as a verification basis for executing the control event, so that the control event of copying the message is avoided, and the effect of preventing copying attack is realized. Meanwhile, the basis can be provided for filtering the repeated messages through the current verification identification.
The duplicate message can be understood as: an attacker first captures a legal switch message and then sends the message out intact. The invention realizes the updating of the verification identification, and the verification identifications before and after the updating are different, at the moment, the verification identification in the real message is updated, the verification identification in the copy message is usually repeated and unchanged, and further, the copy message can be effectively verified through the verification based on the current verification identification, thereby avoiding the execution of the control event of the copy message and ensuring the safety.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of the construction of a control system in accordance with an embodiment of the present invention;
fig. 2 is a schematic diagram showing a first configuration of a self-generating switch according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a self-generating switch according to an embodiment of the invention;
fig. 4 is a schematic diagram of a third configuration of a self-generating switch according to an embodiment of the present invention;
FIG. 5 is a circuit diagram of a rectifier module according to an embodiment of the invention;
FIG. 6 is a circuit diagram of a polarity identification module according to an embodiment of the present invention;
FIG. 7 is a schematic waveform diagram of a pulse signal output by the sensing portion according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of the connection of the first memory according to an embodiment of the present invention;
FIG. 9 is a first exemplary circuit diagram of the voltage output module according to the present invention;
FIG. 10 is a second schematic circuit diagram of the voltage output module according to an embodiment of the present invention;
FIG. 11 is a first flowchart illustrating a method for handling an auto-power-generating switch according to an embodiment of the present invention;
FIG. 12 is a second schematic flow chart illustrating a method for handling an autonomous switch in accordance with an embodiment of the present invention;
fig. 13 is a schematic flow chart of the operation process of the self-generating switch according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of a packet transceiving operation according to an embodiment of the present invention;
FIG. 15 is a diagram illustrating a data structure of a packet according to an embodiment of the present invention;
fig. 16 is a diagram illustrating a data structure of a packet according to an embodiment of the present invention;
fig. 17 is a first flowchart illustrating a working process of the receiving end according to an embodiment of the present invention;
FIG. 18 is a second flowchart illustrating a working process of the receiving end according to an embodiment of the present invention;
figure 19 is a schematic structural view of a self-generating switch in accordance with an embodiment of the present invention;
FIG. 20 is a schematic view of a portion of an embodiment of a self-generating switch in accordance with the present invention;
FIG. 21 is a schematic structural diagram of a bottom case according to an embodiment of the present invention;
FIG. 22 is a schematic view of the structure of a transmission member according to an embodiment of the present invention;
FIG. 23 is a schematic diagram of a second partial structure of the self-generating switch in accordance with an embodiment of the present invention;
FIG. 24 is a schematic view of the structure of the middle shell in one embodiment of the present invention;
fig. 25 is a schematic view of a waterproof layer according to an embodiment of the present invention;
FIG. 26 is a schematic structural diagram of a key in an embodiment of the present invention;
fig. 27a and 27b are schematic views illustrating the operation principle of key pressing according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or 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 means of the present invention will be described in detail with reference to specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Referring to fig. 1, a control system according to an embodiment of the present invention may include a self-generating switch 1 and a receiving terminal 2, where one self-generating switch and one receiving terminal are illustrated in the figure, in an actual control system, the number of the self-generating switches and the number of the receiving terminals may be multiple, and meanwhile, transmission of a wireless signal may be implemented between the self-generating switch 1 and the receiving terminal 2, where the wireless signal may be, for example, bluetooth, radio frequency, wifi, or the like.
The self-generating switch 1 is used for implementing a processing method mentioned below, and further, the following description of the processing method may be understood as a description of a working process, a function, and a specific implementation manner of software and/or hardware in the self-generating switch.
The receiving end 2 may be any controlled device that can be controlled by a self-generating switch, or a device connected to the controlled device, and in a specific example, the receiving end 2 may be, for example, a wall switch, an electronic doorbell, a lamp, an automatic curtain, a fan, and the like. The controls it accepts may be, for example but not limited to:
controlling the receiving end or a device connected with the receiving end to enter a certain state; such as turning a wall switch on or off, turning a light on or off, ringing a doorbell, controlling a fan to start or stop rotating, automatic window shades to open or close, turning on or off a designated function at a receiving end, etc.;
controlling the receiving end or a device connected with the receiving end to switch between two states; such as the on-off state of a flip (change-over) wall switch, the on-off state of a flip (change-over) light, the on-off state of a flip (change-over) fan, the on-off state of a flip (change-over) automatic curtain, the on-off state of a flip (change-over) receiver-side specified function, and the like;
controlling the receiving end or a device connected with the receiving end to change working parameters; for example, adjusting the brightness of the lamp, adjusting the air volume of the fan, adjusting the opening degree of the curtain, etc.
According to the change of the application field of the self-generating switch 1, the specific content of control and control can be changed at will without departing from the scope of the embodiment of the invention.
Meanwhile, the following description of the control event may also be understood with reference to the above.
In the embodiment of the present invention, referring to fig. 2, the self-generating switch 1 includes a processor 108, a memory 107, a key 101, a generator 103, a reset component 102, a rectifying module 111, an energy storage module 105, a voltage output module 106, and a wireless communication module 109.
The electrical connection referred to hereinafter may include a direct electrical connection and also include an indirect electrical connection.
The power generator 103 is capable of generating power when the button 101 is manipulated (e.g., pressed and/or rebounded), and generating power, which can be used to directly or indirectly power the processor 108, the wireless communication module 109, the memory 107, and the like, wherein the processor 108, the wireless communication module 109, and the memory 107 can be separate or integrated, and further, if integrated, the power generator: the power supply to the processor 108, the wireless communication module 109 and the memory 107 can be realized based on the same power supply terminal.
The generator 103 may include a moving part 1031 and a sensing part 1032.
The moving part 1031 may be understood as a component or a combination of components that can be driven by at least one of a button and a reset component to move, and the sensing part 1032 may be understood as a component or a combination of components that can interact with the moving part 1031 to sense and generate electric energy when the moving part moves.
In a specific example, the generator 103 may include a permanent magnet portion, a magnetic conductive portion, and a coil portion, the coil portion may be disposed on the magnetic conductive portion, and the coil portion may generate an induced voltage when the permanent magnet portion and the magnetic conductive portion move relative to each other. The coil part can be regarded as the above mentioned induction part 1032, and the permanent magnet part or the magnetic conductive part can be regarded as the above mentioned movement part 1031, that is: in some examples, the permanent magnet part moves to directly and indirectly transmit with the key, the reset part and the like, and in other examples, the magnetic conduction part moves to directly and indirectly transmit with the key, the reset part and the like. It can be seen that the sensing part 1032 may or may not move with the moving part 1031.
The wireless communication module 109 and the memory 107 are electrically connected to the processor 108, the sensing portion 1032 of the generator 103 is electrically connected to the energy storage module 105 through the rectifying module 111, the energy storage module 105 is electrically connected to the wireless communication module 109 through the voltage output module 106, the processor 108 and the memory 107 (for example, connected to the wireless communication module 109, the processor 108 and a power supply terminal of the memory 107), the reset component 102 (for example, a torsion spring, a spring plate, a tension spring, etc.) can be in transmission with the movement portion 1031 of the generator 103, and the key 101 can also be in transmission with the movement portion 1031 of the generator directly or indirectly.
In some embodiments, the reset component 102 can be directly driven to the moving portion 1031, or in other embodiments, the reset component 102 can also be driven to a button or other component, so as to be indirectly driven to the moving portion 1031.
Referring to fig. 11, the switch control method includes:
s301: whether the button is pressed down or not is judged;
if so, step S302 may be performed: the reset component deforms and generates a reset acting force for overcoming the deformation, and the moving part of the generator is directly or indirectly driven by the key, so that the generator generates a first induction voltage;
if not, the process returns to step S301 to continuously determine whether the pressing operation has occurred.
In some embodiments, step S302 may be followed by: s303: the rectifying module stores first electric energy corresponding to the first induction voltage in the energy storage module.
Referring to fig. 11, the switch control method may also include:
s304: whether the key has rebounded control action or not;
if so, step S305 may be implemented: the reset component drives a moving part of the generator under the action of the reset action force, so that the generator generates a second induction voltage;
in some embodiments, step S305 may be followed by: s306: and the rectifying module stores second electric energy corresponding to the second induction voltage in the energy storage module.
In a specific example, only the first electrical energy may be stored and/or used, and only the second electrical energy may be stored and/or used.
After step S303 and/or step S306, it may include:
s307: the energy storage module transmits the stored electric energy to the voltage output module, the voltage output module provides required voltage for the processor, the memory and the wireless communication module by using the received electric energy,
powering it up;
s308: after the processor, the memory and the wireless communication module are powered on, the processor generates and sends a corresponding current control message to a receiving end through the wireless communication module;
wherein the current control message records current control information and the current verification identifier, so that: and the receiving terminal verifies whether the relationship between the current verification identification in the current control message and the stored historical verification identification is matched with a preset transformation rule of the current verification identification, and executes a control event corresponding to the current control information when the relationship is matched with the transformation rule, wherein the historical verification identification is determined according to the verification identification recorded in a control message or a pairing message which is sent to the receiving terminal before the self-generating switch.
The current steering information characterizes at least one of: the self-generating switch; the self-generating switch receives the operated key currently; and the self-generating switch controls the current received operation and control action of the keys.
Before, after, or simultaneously with generating and sending the corresponding current control packet to the receiving end through the wireless communication module (i.e. before, after, or simultaneously with implementing step S308), the processor may further include:
s309: in the continuously generated control action of pressing down and the control action of rebounding, aiming at least one control action, reading a current verification identifier from the memory and updating the current verification identifier;
wherein, updating the current verification identifier may specifically include: converting and updating the current verification identifier from the first numerical value to a second numerical value by using a preset conversion rule; the first value is different from the second value.
It can be seen that, since the pressing operation and the rebounding operation are in a pair and continuous manner, rebounding usually occurs after pressing. Furthermore, in the above solution, the current verification identifier may be updated only after the pressed manipulation action occurs, or the current verification identifier may be updated only after the rebounded manipulation action occurs, or the current verification identifier may be updated both after the pressed manipulation action and after the rebounded manipulation action.
Referring to fig. 11, the processing method may further include:
s310: and writing the updated current verification identifier back to the memory before the electric energy stored by the energy storage module is exhausted.
Corresponding to the above steps S301 to S310, the functions of the respective components in the self-generating switch can be understood with reference to the following.
The reset device 102 is configured to: if the button 101 is pressed, then: deformation occurs and a reset acting force overcoming the deformation is generated; if the button 101 generates a rebounding operation, then: the moving part 1031 of the generator 103 is driven by the restoring force.
The generator 103 is configured to: if the button 101 is pressed down, then: the moving part 1031 of the generator 103 is directly or indirectly driven by the key 101 to generate a first induced voltage in the induction part 1032 of the generator 103, and when the key 101 performs a manipulation operation of rebounding, the moving part 1031 of the generator 103 is driven by the reset member 102 to generate a second induced voltage in the generator,
the rectification module 111 is configured to: storing first electric energy corresponding to the first induction voltage and/or second electric energy corresponding to the second induction voltage in the energy storage module;
the energy storage module 105 is configured to: transmitting the stored electrical energy to the voltage output module 106;
the voltage output module 106 is configured to: the received power (first power and/or second power) is used for providing required voltage for the processor 108, the memory 107 and the wireless communication module 109 to power up;
the processor 108 is configured to:
after the processor 108, the memory 107 and the wireless communication module 109 are powered on, generating and sending a corresponding current control message to the receiving end 2 through the wireless communication module 109;
in the continuously generated one-press manipulation action and one-rebound manipulation action, for at least one manipulation action, before, after or while generating and sending a current control message to a receiving end through the wireless communication module, the current verification identifier is read from the memory, the current verification identifier is updated (for example, the current verification identifier is updated from a first numerical value to a second numerical value by a preset conversion rule), and the updated current verification identifier is written back to the memory before the electric energy stored in the energy storage module is exhausted.
Wherein, if from power generation switch is equipped with reset unit, then: the pressing operation can be the operation of pressing a key, and the rebounding operation can be the operation of removing the pressing action force to rebound the key.
In some examples, in a message (e.g., a current control message or a paired message), at least two of the information characterizing the self-generating switch, the information characterizing the key, and the information characterizing the manipulation action may be configured as an integrated piece of information, for example, a predefined character string may be configured corresponding to each manipulation action of each key, so that the character string is used as (or characterizes) the current manipulation information, and further, by reading the character string, the receiving end may learn what manipulation action occurs on which key.
In other examples, corresponding characters or character strings may be respectively configured for the information representing the self-generating switch, the information representing the key and the information representing the manipulation action as the current manipulation information.
The information characterizing the self-generating switch may be information characterizing which self-generating switch it is, or may be information characterizing which type of self-generating switch it is (for example, at least one of a model, a lot, a brand, etc. of the self-generating switch).
In a specific example, the current control information may include a switch identifier, and then the switch identifier may be used to represent the self-generating switch, and the current control information may further include a key value, and then the key value is used to represent the key currently received by the self-generating switch and the control action currently received by the key in the self-generating switch.
In addition, the current operation information can be understood as information that the receiving end can determine the control event according to the current operation information, and further, if the information (or information representing the key and the operation action) representing the self-generating switch is not used for determining the control event, then: even if the message is written in the message, the message may not be regarded as the current manipulation information.
The verification mark can be any character or combination of characters which can be suitable for realizing verification, the current verification mark can be understood as being currently sent by the self-generating switch, and the historical verification mark can be understood as being stored by a receiving end before the self-generating switch sends.
In some examples, the historical verification identifier may be a current verification 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-power switch has performed the last operation, or determined according to the current verification identifier, and in other examples, the historical verification identifier may also be a current verification 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-power switch has performed the last specific operation (for example, the operation of pressing down or the operation of rebounding) or determined according to the current verification identifier.
Since the verification identifier is a specific numerical value, the verification identifier may also be described as a serial number, and further, in the example of the embodiment of the present invention, the description of the serial number may be regarded as the description of the verification identifier.
The wireless communication module 109 may be any circuit module capable of implementing wireless communication, and for example, may include at least one of the following: radio frequency module, bluetooth module, wifi module etc..
Corresponding to the above steps S301 to S310, and the corresponding functions of the components of the self-generating switch, the receiving end may be configured to:
receiving a current control message;
the current control message is sent by the self-generating switch through the switch control method or the self-generating switch;
verifying whether the relationship between the current verification identification and the stored historical verification identification matches the transformation rule;
and when the relation is matched with the transformation rule, executing a control event corresponding to the current control information.
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 packet may be understood as not processing based on the current control packet, for example: and the control event corresponding to the current control message is not executed, and the information such as the historical verification identifier and the like is not updated and changed based on the current control message.
In the scheme, the current verification identifier is introduced in the interaction process of the self-generating switch and the receiving end, the matching verification of the current verification identifier and the historical verification identifier can be used as the basis for executing the control event, the control event of message copying is avoided, and the effect of preventing copying attack is achieved. Meanwhile, through the matching verification that whether the current verification identification and the historical verification identification are matched with the transformation rule or not, a basis can be provided for filtering repeated messages.
The verification identification in the real message is changed, the verification identification in the copied message is usually repeated, and further, the copied message can be effectively verified through verification based on the historical verification identification and the transformation rule (wherein the relation between the verification identification and the historical verification identification is usually not matched with the transformation rule), so that the control action of copying the message is avoided, and the safety is guaranteed.
In addition, when the historical verification identifier is the past current verification identifier, it can be ensured that: the sources of the verification marks are all derived from the self-generating switch, so that the verification accuracy and safety can be effectively guaranteed.
In one embodiment, referring to fig. 3 and 4, the self-generating switch 1 further includes a polarity identification module 110; the polarity identification module 110 electrically connects the generator 103 (e.g., its induction portion 1032) with the processor 108.
Before the processor reads the current verification identifier from the memory and updates the current verification identifier, the method further comprises:
after the processor, the memory and the wireless communication module are powered on, the processor identifies the currently generated control action of the key through the polarity identification module and determines that the currently generated control action is a target control action (namely, the processor 108 is also used for identifying the currently generated control action of the key through the polarity identification module 110 and determining that the currently generated control action is the target control action), and the target control action is selected from a pressed control action and a rebounded control action to be appointed.
As can be seen, in the above scheme, a scheme is implemented in which the transformation of the authentication identity occurs only after one complete press and rebound.
Because there is a possibility of packet loss in wireless communication, if the data packet sent by pressing (i.e., the data packet of the control message sent after pressing) is lost, the data packet sent by rebounding (i.e., the data packet of the control message sent after rebounding) can be used as a remedy, and the receiving end can still perform a response action after receiving the rebounded data packet.
For this, the receiving end may determine whether to execute the control event by combining the verification identifier and the control action represented by the control packet, for example: the receiving end can judge according to the serial number (namely, the verification identifier), if the data packet is pressed (namely, the current control information is the pressing control information), the response is certain, so that the corresponding control event is executed; if the data packet is a rebound data packet (i.e. the current handling information is the rebound handling information), the corresponding control event is executed only in response to the condition that the pressed data packet with the same sequence number (i.e. the verification identifier) is not received before.
It can be seen that if the control events corresponding to the press and the rebound are the same, then: the scheme of 'the conversion of the verification identification only occurs after one complete press and rebound' can help to avoid the data packet loss from influencing the execution of the control event, and ensure that the corresponding control event can be executed effectively.
Meanwhile, after the receiving end is configured reasonably, it can also help to avoid the control message pointing to the same control event from being executed repeatedly, for example: when a lamp (i.e. a receiver is a lamp or a connection lamp) is controlled by using the self-generating switch, if the controlled control event is: the lamp state is reversed, then: if both the press and the rebound will respond, the light is turned on when the press is made and then turned off after the rebound. The reasonable configuration can be, for example: if the self-generating switch changes the current verification identifier on time, then: the receiving end can update and write the current verification identification in the control message as a new historical verification identification when receiving the control message.
When the effects can be realized, even if the control events corresponding to press and rebound in some receiving ends are different, the realization of different control events can be ensured after the receiving ends are reasonably configured. The reasonable configuration can be, for example: if the self-generating switch changes the current verification identifier on time, then: the receiving end can write the verification identification in the control message when receiving the rebounded control message as a new historical verification identification.
Therefore, the same set of updating conditions of the verification identifier (namely, the current verification identifier is changed when the current operation is the target operation and control action) is adopted, so that the requirements of pressing and rebounding the receiving ends corresponding to the same control event can be met, and the requirements of pressing and rebounding the receiving ends corresponding to different control events can also be met. Furthermore, the compatibility of the self-generating switch to various possible control requirements is effectively guaranteed, and the control diversity of the control system is improved.
In addition, the scheme of 'the change of the verification identifier only occurs after one complete press and rebound' can also play a role in saving electric energy. For example: if the sequence number (i.e. the current authentication identity) is updated only at the time of the rebound: when the serial number is pressed down, the serial number (namely the current verification identifier) does not need to be updated, and especially the energy consumption for writing the updated serial number into the memory can be saved.
Moreover, when the sequence numbers (namely the current verification identifiers) corresponding to the pressed control actions and the rebounded control actions are the same, the receiving end can be simpler to perform message deduplication according to the sequence numbers.
In a further example, the target manipulation motion is a rebound manipulation motion, and in other examples, the target manipulation motion may also be a press manipulation motion.
When a user presses a key of the self-generating switch, the user usually wants to immediately obtain feedback of a control effect. Furthermore, if the sequence number is updated only in the case of a rebound (i.e. the target actuation is the actuation of a rebound), all the electrical energy during the depression can be used for other tasks, in particular for signaling, without the expenditure of electrical energy for updating the sequence number.
In one embodiment, please refer to fig. 3, the self-generating switch 1 further includes a key identification module 110, and the key identification module 110 is electrically connected to the processor;
referring to fig. 12, before the processor generates the current control packet, the method further includes:
s311: the processor reads a switch identification characterizing the self-generating switch from the memory;
s312: whether the current control action is a pressing control action or not;
if the determination result in step S312 is yes, step S313 may be implemented: the processor acquires current key information through the key identification module and updates the current key information in the memory;
if the determination result in the step S312 is negative, the step S314 may be implemented: whether the current control action is a rebounding control action or not;
if the determination result in step S314 is yes, step S315 may be implemented: the processor acquires the stored current key information from the memory;
if the determination result in step S314 is no, the process may return to step S312.
And based on the switch identification and the control action information, the current control information is determined based on the switch identification, the control action information and the acquired current key information.
Correspondingly, the processor 108, before generating the current control packet, may be further configured to:
reading a switch identification characterizing the self-generating switch from the memory;
if the current operation is the pressing operation, then: acquiring current key information through the key identification module, and updating the current key information in the memory;
if the current operation is the springback operation, then: obtaining the stored current key information from the memory;
the current control information is determined based on the switch identifier, the currently generated control action, and the obtained current key information, for example, the switch identifier may be written into the current control packet, or a 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 packet.
As a further example, referring to fig. 4, the key identification module 110 may include microswitches 1101, the number of the microswitches 1101 and the keys 101 may be one as shown in fig. 2, or may be multiple as shown in fig. 3 and fig. 4, each of the microswitches 1101 and each of the keys 101 are in one-to-one correspondence, the microswitches 1101 may be activated when a corresponding key is pressed, and further feed back a signal to the processor 108, at this time, the processor 108 may read the fed-back signal to determine key information representing the key, so as to know which key is the key which is pressed currently.
In one embodiment, referring to fig. 4 and 6, the polarity identification module 112 includes a press identification portion 1121 and a rebound identification portion 1122; the press recognition unit 1121 electrically connects the sensing unit 1032 of the generator 103 and the processor 108, respectively, and the springback recognition unit 1122 electrically connects the sensing unit 1032 of the generator 103 and the processor 108, respectively.
The processor identifies the current operation action of the key through the polarity identification module, and the operation action comprises the following steps:
if the processor receives the designated signal sent by the pressing identification part, determining the current control action as the pressing control action; wherein the press identification section transmits the designation signal to the processor only when the generator generates the first induced voltage;
and if the processor receives the designated signal sent by the springback recognition part, determining the current control action as a pressing control action, wherein the springback recognition part sends the designated signal to the processor only when the generator generates the second induction voltage.
Correspondingly, when the processor 108 identifies the current operation action of the key through the polarity identification module, the processor is specifically configured to:
if receiving a designated signal sent by the pressing identification part 1121, determining a currently generated control action as a pressing control action; wherein the pressing identification portion 1121 transmits the designation signal to the processor 108 only when the generator 103 generates the first induced voltage;
when receiving the designation signal from the springback recognition unit 1122, the springback recognition unit 1122 sends the designation signal to the processor 108 only when the generator 103 generates the second induced voltage, and determines the currently generated manipulation motion as the pressing manipulation motion.
The specific signal may be, for example, any one of the following: high level signal, high pulse signal, low level signal, low pulse signal.
The pulse signal emitted from the sensing portion at the time of the next press and the pulse signal emitted from the sensing portion at the time of the rebound can be understood by referring to the waveforms shown in fig. 7. In fig. 7, the abscissa represents time, and the ordinate represents voltage.
For further example, referring to fig. 6, the pressing identification portion 1121 may include: pressing down the identification first diode D21, pressing down the identification second diode D22, pressing down the identification first resistor R21, pressing down the identification second resistor R22, and pressing down the identification capacitor C21;
the positive electrode of the press-down recognition first diode D21 is electrically connected to the first output terminal of the sensing portion, the negative electrode of the press-down recognition first diode D21 is electrically connected to the first terminal of the press-down recognition capacitor C21, the first terminal of the press-down recognition first resistor R21 is pressed down, the second terminal of the press-down recognition capacitor C21 is grounded, the first terminal of the press-down recognition second resistor R22 is pressed down, the negative electrode of the press-down recognition second diode D22 is electrically connected to the first receiving terminal (for example, I/O port) of the processor 108, and the positive electrode of the press-down recognition second diode D22 and the second terminal of the press-down recognition second resistor R22 are grounded.
For further example, referring to fig. 6, the bounce identifier 1122 may include: a springback identification first diode D23, a springback identification second diode D24, a springback identification first resistor R23, a springback identification second resistor R24, and a springback identification capacitor C22;
the positive electrode of the springback identification first diode D23 is electrically connected with the second output end of the induction part, the negative electrode of the springback identification first diode D23 is electrically connected with the first end of the springback identification capacitor C22 and the first end of the springback identification first resistor R23, the second end of the springback identification capacitor C22 is grounded, the first end of the springback identification second resistor R24 and the negative electrode of the springback identification second diode D24 are electrically connected with the second receiving end (such as an I/O port) of the processor 108, and the positive electrode of the springback identification second diode D24 and the second end of the springback identification second resistor R24 are grounded.
When the generator is pressed down or rebounded, the output end can respectively generate a positive pulse. The energy storage capacitor corresponding to the positive pulse (i.e. pressing the identification capacitor C21 or rebounding the identification capacitor C22) is charged, and then a positive pulse is output to the receiving end of the processor. And the capacitor of the negative pulse of the generator cannot be charged, and simultaneously, because of the existence of the diode, the electricity of the capacitor corresponding to the positive pulse cannot flow to the capacitor corresponding to the negative pulse, so that the capacitor corresponding to the negative pulse cannot output a pulse signal or a high-level signal to the processor. The processor can detect the level generated by the voltage division of the resistors so as to perform corresponding actions.
The press-down recognition diode D21 and the rebound recognition diode D23 may be isolated diodes, for example, diodes of type RB551V may be used. The press-down recognition second diode D22 and the rebound recognition second diode D24 may be implemented as a zener diode, for example, a 3.3V zener diode, and specifically, a zener diode with a model of MMSZ5226BS may be selected, the maximum power consumption is 200mW, and the reverse leakage current is 25uA.
According to the selection of the resistance value of the divided voltage, the maximum voltage of the generator needs to reach U =3.5 × 5/2=8.75V to reach the maximum withstand voltage of the IO port, and the generator can usually meet the requirement.
In the embodiment of the invention, only the pressing identification part or the rebounding identification part can be adopted, for example, if the time for transmitting the message from the power generation switch is short, the message is sent out and the electric quantity is exhausted soon after each pressing, the switch can only need one identification part (for example, the pressing identification part or the rebounding identification part). Such as: when only one pressing identification part is pressed, the switch generates a high level when being pressed, and the processor identifies that the pressing is performed. When the switch rebounds, the processor does not detect a high level, which may also be considered a rebound.
However, for part of the self-generating switches (for example, the wireless communication module adopts a self-generating switch of a bluetooth module), because the duration of each transmission is long, when the user releases the switch, the pressed message is not sent yet, and at the moment, the processor is still in a working state, and if no rebound recognition part outputs a high level, the processor cannot know that the switch rebounds. Therefore, two independent identification portions are required to identify the press-down and the rebound, so that when the processor detects that the corresponding IO port has a high level or a positive pulse, the corresponding press-down or rebound is considered to have occurred. Therefore, in the scheme, the IO port identified by the polarity can be detected not only at the power-on moment but also at the rebound moment to judge whether the IO port is pressed down.
In one embodiment, referring to fig. 4, the memory 107 includes a first memory 1071 and a second memory 1072, the current authentication identifier update is stored in the first memory 1071; the first memory 1071 is different from the second memory 1072 storing a program, and the first memory 1071 is a memory in which data is not lost after power failure.
The current verification identifier updated and stored in the first memory 1071 is the same as the current verification identifier recorded in the current control message.
In a further scheme, the first memory 1071 is a memory capable of erasing, writing and reading data in units of one or more bytes, wherein the writing and reading time of a single byte does not exceed 10ms, and the consumed energy does not exceed 300uJ. The first memory 1071 includes, for example, a Flash memory and/or a ferroelectric memory.
In addition, the first memory also stores current key information, and the current key information represents the key which is pressed by the self-generating switch for the last time; and the key represented by the current key information is the same as the key represented by the current control information.
The first memory 1071 may not select the conventional FLASH, because the conventional false sh must be erased (written) in units of sectors, which causes too much power to be written and the generator may not be able to support it. On the contrary, when the memories such as the EEPROM, the ferroelectric memory and the like are selected, the situation that the electric quantity of the generator is difficult to support can be effectively avoided.
In a specific example, the first memory 1071 may be connected to the processor through an IIC bus using 24C 02. Taking fig. 8 as an example, the power supply (VDD-EE) of the first memory 1071 is isolated from the power supply VDD of the processor by the diode D71, so that the processor 108 is in an unpowered state when necessary, such as when burning data into an EEPROM in a production stage, so that the IIC communication between the EEPROM and the burning tool is not affected by the IIC pin of the processing unit.
Wherein, for storing in particular: (1) a current authentication identification; and (2) current key information.
When the switch is pressed down during working, the verification identifier can be read from the first memory, then updating (such as self-increment operation) is carried out, the updated current verification identifier is filled in a message to be sent, then the self-updated current verification identifier is written back to the first memory again, then the electric quantity is exhausted, and the processor and the memory are powered off.
The switch sends current key information (representing which key is pressed and released) when being pressed and/or rebounded, but due to the structural limitation of the self-generating switch, the generator generates power when the switch is released, but a micro switch for detecting key positions is already released, so that which key is in action cannot be identified, therefore, a first memory (namely two memories are adopted), and when the switch is pressed, the current key information at the moment is written into the first memory; during rebound, although the current key information cannot be read from the state of the microswitch, the previous key information can be read from the first memory as the current key information, so that the message during rebound also carries a key value, thereby doubling the probability that a receiving end can receive the message and improving the reliability.
In addition, the SCL terminal of the first memory 1071 may be connected to the VDD-EE of the processor via a resistor R72, and the SDA terminal of the first memory 1071 may be connected to the VDD-EE of the processor via a resistor R71.
In one embodiment, referring to fig. 4 and fig. 5, the rectification module 111 includes a first rectification part 1111 and a second rectification part 1112; the first rectification part 1111 is electrically connected to the induction part 1032 of the generator 103 and the energy storage module 105, and the second rectification part 1112 is electrically connected to the induction part 1032 of the generator 103 and the energy storage module 105.
The rectifier module stores first electric energy corresponding to the first induction voltage and second electric energy corresponding to the second induction voltage in the energy storage module, and the rectifier module comprises:
the first rectifying part is used for rectifying the first induction voltage and storing corresponding first electric energy in the energy storage module;
the second rectifying portion rectifies the second induction voltage and stores corresponding second electric energy in the energy storage module.
Correspondingly, the rectifying module 111 is specifically configured to store the first electric energy corresponding to the first induced voltage and the second electric energy corresponding to the second induced voltage in the energy storage module:
the first rectifying part 1111 rectifies the first induced voltage and stores corresponding first electric energy in the energy storage module;
the second rectifying part 1112 rectifies the second induced voltage and stores corresponding second electric energy in the energy storage module.
In a further example, referring to fig. 5, the first rectifying portion 1111 includes a first rectifying diode D11, a second rectifying diode D12 and a first rectifying resistor R11, and the second rectifying portion 1112 includes a third rectifying diode D13, a fourth rectifying diode D14 and a first rectifying resistor R12.
The cathode of the first rectifier diode D11 and the cathode of the second rectifier diode D12 can be respectively electrically connected to the first output end and the second output end of the induction part, the anode of the first rectifier diode D11 and the anode of the second rectifier diode D12 can be grounded, and can also be connected to the first end of the first rectifier resistor R11, and the second end of the first rectifier resistor R11 is connected to the second output end;
the positive pole of the third rectifier diode D13 and the positive pole of the fourth rectifier diode D14 can be respectively electrically connected to the first output end and the second output end of the induction part, the negative pole of the third rectifier diode D13 and the negative pole of the fourth rectifier diode D14 can be grounded, and can be connected to the first end of the second rectifier resistor R12, and the second end of the second rectifier resistor R12 is connected to the first output end.
In the above solution, the third rectifier diode D13 and the fourth rectifier diode D14 constitute a rectification part of positive pulses, and the first rectifier diode D11 and the second rectifier diode D12 constitute a rectification part of negative pulses. Therefore, when the generator is pressed down and reset, the electric energy can be transmitted to the energy storage module 105 through the rectifying device, and signals can be sent when the wireless switch is pressed down and reset.
In one embodiment, the voltage output module 106 may include: the controller 1061, the energy storage capacitor C61 and the freewheeling unit (for example, including the freewheeling inductor L61);
the input side of the controller 1061 is electrically connected to the energy storage module, meanwhile, the enable end of the controller 1061 may be connected to the energy storage module and a first end of a capacitor C62, a second end of the capacitor C62 may be grounded, the output side of the controller 1061 is electrically connected to a first end of the freewheel unit (e.g., a freewheel inductor L61), a second end of the freewheel unit (e.g., a freewheel inductor L61) is electrically connected to at least one of the processor and the wireless communication module memory directly or indirectly, and the energy storage capacitor C61 is electrically connected between the second end of the freewheel unit (e.g., a freewheel inductor L61) and ground; the controller 1061 is configured to control on and off between an input side and an output side thereof, and adjust a voltage output through the freewheeling unit and the energy-storage capacitor by adjusting a switching frequency of the on/off and a time period of the on/off.
The voltage output module 106 may further include a first feedback resistor R61 and a second feedback resistor R62 for detecting the output voltage and feeding the output voltage back to the controller 1061.
The controller 1061 may be integrated with a PWM generating unit, which adjusts the width or frequency of the output pulse according to the feedback voltage, controls an internal or external switching tube, and intermittently charges the output inductor to achieve the purpose of voltage stabilization.
In some examples, a resistor R63 may be disposed between the output terminal of the energy storage module and the output terminal of the voltage output module (i.e., between the VDD terminal and the VIN terminal), and a capacitor C63 and a zener diode D61 may be disposed between the VIN terminal and ground in parallel.
In one embodiment, the transformation rule includes at least one of:
accumulating a first reference value on the basis of said first value to obtain said second value;
subtracting a second reference value from the first value to obtain a second value;
multiplying a third reference value by the first value to obtain the second value;
dividing the first value by a fourth reference value to obtain the second value.
The accumulation, subtraction, multiplication, division and the like can be calculated by adopting decimal calculation and can also be calculated by adopting binary system or other binary systems. The first, second, third and fourth reference values may be fixed values or variable values, and their signs are usually the same and are not zero, e.g. positive numbers.
Taking the accumulated first reference value as an example, the first reference value used for accumulation may be a positive number that varies within a certain range, and further for example, the accumulated value may vary regularly, for example: if the cycle changes from accumulation 1, accumulation 2, and accumulation 3, then: the k-th conversion is realized by accumulating 1, the k + 1-th conversion is realized by accumulating 2, the k + 2-th conversion is realized by accumulating 3, and the k + 3-th conversion is realized by accumulating 1 again.
Corresponding to the above various cases, there are:
if the transformation rule is: accumulating a first reference value on the basis of said first value to obtain said second value, then: when verifying whether the current verification identification is matched with the historical verification identification, the receiving end can verify whether the current verification identification is larger than the historical verification identification, or: verifying whether the current verification identification is larger than the historical verification identification or not, wherein the difference value of the current verification identification and the historical verification identification is matched with the first reference value;
if the transformation rule is: subtracting a second reference value from said first value to obtain said second value; then: when verifying whether the current verification identification is matched with the historical verification identification, the receiving end can verify whether the current verification identification is smaller than the historical verification identification, or: verifying whether the current verification identification is smaller than the historical verification identification or not, wherein the difference value of the current verification identification and the historical verification identification is matched with the second reference value;
if the transformation rule is: multiplying a third reference value by the first value to obtain the second value; then: when the receiving end verifies whether the current verification identification is matched with the historical verification identification, the receiving end can verify whether the current verification identification is larger than the historical verification identification, or: verifying whether the current verification identification is larger than the historical verification identification or not, wherein the ratio of the current verification identification to the historical verification identification is matched with the third reference value;
if the transformation rule is: dividing said first value by a fourth reference value to obtain said second value; then: when the receiving end verifies whether the current verification identification is matched with the historical verification identification, whether the current verification identification is smaller than the historical verification identification can be verified, or: and verifying whether the current verification identification is smaller than the historical verification identification or not, wherein the ratio of the current verification identification to the historical verification identification is matched with the fourth reference value.
In the above scheme, by comparing the difference value with the first numerical value and the second numerical value and comparing the ratio value with the third numerical value and the fourth numerical value, it can be verified whether the comparison between the current verification identifier and the historical verification identifier is increased or decreased, and the change amplitude can also be verified, so that an attacker can perform exhaustive attack by using the numerical value which is larger (or smaller) than the current numerical value, and the security is further improved.
The difference value is matched with the first reference value and the second reference value, which can be understood as the same value, or the difference value is smaller than a certain threshold value, and the ratio value is matched with the third reference value and the fourth reference value, which can be understood as the same value, or the difference value is smaller than a certain threshold value.
Referring to fig. 13, in an example, the self-generating switch carries a serial number (i.e., a verification identifier), the serial number increases (or decreases) by itself each time the switch is pressed, and the serial number increases by itself only once after a complete press + rebound operation; the message carrying the representation is information of pressing/bouncing (it can be understood that the control information can represent the control action).
Specifically, the self-generating switch rebounds after being pressed down every time, and the generator acts to generate power when being pressed down and rebounded, so that power is supplied to a back-end circuit (such as a processor, a wireless communication module, a memory and the like). The back-end circuit can identify whether the control action is a pressing control action or a rebounding control action through the polarity identification module.
If it is a push manipulation, the serial number (i.e. the stored authentication identifier) is read from the memory, then the serial number is incremented (which may be understood as the transformation), then the key information is read, and a control message is generated (which may correspond to step S308). Then, the serial number and the key information are written back to the memory, and can be used for reading during rebounding, and then the message is sent (which may correspond to steps S310 and S313). Wherein, the order of writing back the memory and sending the message can be interchanged.
If the control is the rebound control, the serial number is directly read from the memory without self-increment (namely, the conversion is not needed to be implemented), and the key information is also directly read from the memory (rather than reading the feedback signal of the microswitch).
In one embodiment, the current control packet further includes signature information, where the signature information is calculated based on a first key, and the signature information changes with a change of the current verification identifier;
the signature information can be verified by the receiving end through a second key, and the first key is matched with the second key.
The key can be fixed or not, and can be refreshed and changed by a certain method, and the self-generating switch and the receiving end are resynchronized after the refreshing and changing. For example: the key can be changed based on the function value with time as an independent variable, and the function relation corresponding to the first key is matched with the function relation corresponding to the second key.
In a specific example, the key may be a string of secret data, wherein the signature information may be calculated by a predetermined algorithm (e.g., AES algorithm) after combining the plaintext and the key. The plaintext may, for example, control at least part of the content of the message, which may contain the authentication identifier but no signature.
For example: at the self-generating switch, the processor can utilize a first secret key to encrypt the contents of the fields except the signature field in the payload part of the current control message to be sent, so as to obtain signature information, at the receiving end, the receiving end can utilize a second secret key to encrypt the contents of the fields except the signature field in the payload part of the received current control message, so as to obtain the signature information, and the receiving end can utilize the calculated signature information to verify the signature information recorded in the current control message.
In addition, the first key and the second key may be the same, and in other examples, the two keys may also be different.
The anti-counterfeiting function can be realized through the signature information, and the safety is guaranteed.
To facilitate the description of the role of signature information and authentication identifiers (e.g., serial numbers), several concepts are first cleaned up as follows:
copy attack:
it can be understood that: an attacker first captures a message of a legal switch and then sends the message out without moving the message. By verifying the use of the identification, it is possible to effectively protect against copying attacks, such as: the receiving end stores the serial number (i.e. the verification identifier) of the last received message, and after receiving a new message, the receiving end continues to check the serial number even if the signature information is verified to be legal: the disallowed sequence number is the sequence number that has been received before the press or rebound, but is a sequence number that is larger than before and falls within a window (all, or a sliding window large enough).
Forgery attack:
it can be understood that: the attacker can operate a real device (such as a self-generating switch) which can issue a control message once, and then actively add 1 to the serial number (if the serial number is plaintext) to reconstruct the message.
Through the signature information, forgery attacks can be effectively prevented, and the signature information is calculated by the key according to the previous message content (if the serial number is plaintext). The self-generating switch is encrypted by using the key, the receiving end calculates the key once, and if the key is obtained, the message of the transmitting end is considered to be legal.
When using the authentication identification (e.g., serial number) and signature information, it may be possible, for example:
in the pairing process, the receiving end and the self-generating switch synchronize serial numbers; the serial number can not be verified in the pairing process, and the signature information can still be verified, namely the pairing process only considers anti-counterfeiting and does not consider anti-copying. Of course, the signature information can be verified;
in normal operation, on the one hand, the signature information is verified, and on the other hand, the serial number is verified, and only the verification is allowed to be larger (or smaller) than the previous serial number. If further strict verification is to be performed, the sequence number is required to be larger than the previous sequence number and to fall within a window (which may be embodied as, for example, the aforementioned first reference value, second reference value, third reference value, fourth reference value). Window-based verification can effectively cope with exhaustive attacks, such as: an attacker can perform an exhaustive attack with a sequence number larger than the current sequence number if no window is required.
In one embodiment, the authentication identifier (e.g., sequence number) itself is also converted before transmission, and an attacker cannot obtain the current sequence number. And further: the current verification identifier recorded in the current control message is a converted current verification identifier, wherein the conversion mode is a first data conversion mode, namely: the current verification identifier recorded in the current control message is the current verification identifier converted by the first data conversion mode;
the current verification identifier verified by the receiving end is obtained by reversely converting the converted current verification identifier, wherein the reverse conversion mode is a second data conversion mode, and the first data conversion mode and the second data conversion mode are opposite data conversion modes, that is: the current verification identification verified by the receiving end is obtained by carrying out reverse conversion on the converted current verification identification in a second data conversion mode.
The first data conversion method and the second data conversion method are opposite conversion methods, and any conversion method is adopted without departing from the scope of the embodiment of the invention.
In a specific example, referring to fig. 17, the receiver may check the duplicate according to the "ID-serial number"; the ID can be understood as the device provider ID (corresponding to the device provider ID in fig. 15 and 16), and for a specific ID, after receiving a message, the serial number of the message is stored. After receiving the message with the same ID next time, comparing the serial number (namely the current verification identifier) with the previous one, and if the serial number is the same as the historical value (namely the historical verification identifier), considering that the message is a repeated message and discarding the repeated message; if the message is newer than the historical value, the message is regarded as a new message, and subsequent processing is carried out.
Specifically, after receiving the message, the basic message validity judgment is firstly made according to the message format. Then, extracting the serial number; comparing the serial number with the historical value (i.e. comparing the current verification identifier with the historical verification identifier for verification); if the sequence number is larger than the historical value, executing a corresponding control action (namely a control event) and writing a new sequence number into the historical value for standby; if not, then the duplicate sequence number is considered and discarded.
In one embodiment, the current control message is sent from the power generation switch through bluetooth, and the wireless communication module is a bluetooth module, and a packet sending and scanning data packet receiving manner in bluetooth communication is described below.
Specifically, for example, the receiving end itself may be awakened and dormant according to the wakeup sleep cycle, and the wakeup sleep cycle includes an alternate wakeup time period and a sleep time period, that is: and the receiving end enters the sleep time interval after the wakeup time interval passes, the sleep time interval enters the wakeup time interval after the sleep time interval passes, the cycle is repeated, and the receiving end receives the data packet only in the wakeup time interval.
In fig. 14, the waveform of the receiving scan is a schematic waveform of the receiving end receiving the scan data packet, wherein the wakeup period can be characterized as Ton, the sleep period can be characterized as Toff, and the waveform of the sending packet is a schematic waveform of the sending packet from the power switch, wherein the convex waveform is the sending period that can be regarded as one data packet.
In step S308, the sending of the corresponding current control packet to the receiving end through the wireless communication module specifically includes:
broadcast N group data packet outwards in proper order through the bluetooth to make: the receiving end captures at least one data packet in an awakening time period, wherein each group of data packets comprises a plurality of data packets, and each data packet comprises the current control message; and the broadcast interval of the adjacent data packets in the N groups of data packets is matched with the awakening sleep period of the receiving end, wherein N is more than or equal to 2.
Correspondingly, when the processor sends the corresponding current control message to the receiving end through the wireless communication module, the processor is specifically configured to:
broadcast N group data packet outwards in proper order through the bluetooth to make: the receiving end captures at least one data packet in an awakening time period, wherein each group of data packets comprises a plurality of data packets, and each data packet comprises the current control message; and the broadcast interval of the adjacent data packets in the N groups of data packets is matched with the awakening sleep period of the receiving end, wherein N is more than or equal to 2.
Correspondingly, the receiving end may specifically be configured to:
capturing at least one data packet in N groups of data packets sent by the self-generating switch in the awakening period through Bluetooth, wherein the N groups of data packets are broadcast to the outside sequentially through the Bluetooth by the self-generating switch, and each data packet contains the current control message; and the total broadcast duration of the N groups of data packets and the broadcast interval of two adjacent data packets are matched with the awakening sleep period of the receiving end, wherein N is more than or equal to 2.
Wherein a broadcast interval is understood to be: the interval between the broadcast start time of two adjacent groups of data packets can also be regarded as the broadcast period of each group of data packets, and each broadcast period only sends one group of data packets.
The duration of the awakening time interval is greater than or equal to the broadcasting interval of two adjacent data packets;
the duration of the sleep period is less than or equal to N-1 times the broadcast interval.
Through the scheme, the data packet receiving and sending method and the data packet receiving device can help to ensure that a receiving end can receive the data packet in the awakening time period no matter when the data packet is sent out from the power generation switch in the data packet receiving and sending process.
In the case that the wake-up period Ton is within the large transmission period, there should be at least 1 packet in the window of the wake-up period Ton, i.e. the wake-up periods Ton cannot all fall within the broadcast interval (e.g. 20 mS), and the wake-up period Ton is greater than or equal to the broadcast interval (e.g. 20 mS).
At the same time, it is ensured that at least one packet falls outside the window of the sleep period Toff, which is guaranteed to be less than or equal to the broadcast interval (N-1), for example less than or equal to 20mS (N-1), taking into account the time (e.g. 1 mS) for which the packet itself is to be used.
In a specific example, the specified packet sending interval duration (i.e. the formed broadcast interval) may be selected to be 20mS;
the wakeup sleep cycle of the receiving end may be 100mS;
the duty cycle may be 20%,
correspondingly, the wake-up period Ton is 20mS and the sleep period Toff is 80mS.
Under the above parameters, if the self-generating switch can send 5 groups of data packets, the receiving end can scan at least 1 group of data packets. If the transmitting end can send 10 groups of data packets, the receiving end can scan at least 2 groups of data packets.
In another specific example, if N =5, the wakeup period Ton may be specifically 25mS, the sleep period Toff may be specifically 75mS, and further, the corresponding duty ratio is 25%, and the receiving end may scan at least 1 group of data packets and leave a certain margin.
In another specific example, the awake sleep cycle may be 125mS, the awake time Ton may be 25mS, the sleep time may be 100mS, and correspondingly, if the packet sending interval is 20mS, then: 20mS (N-1) is greater than or equal to 100mS, and N is greater than or equal to 6 (i.e. at least 6 data packets need to be sent), wherein when N =6, at least one data packet is scanned during the wake-up period.
In a further example, the plurality of data packets in the same group are transmitted via at least two of the following channels:
2.402GHz;2.428GHz;2.480GHz。
wherein, the treater passes through bluetooth module is external broadcast N group data packet in proper order specifically includes:
the processor counts the time of the broadcast interval after starting to send a group of data packets, and sends out another group of corresponding data packets when the counted time reaches the specified packet sending interval time length;
correspondingly, when the processor 108 broadcasts the N groups of packets sequentially to the outside through the bluetooth module, the processor is specifically configured to:
after a group of data packets are started to be sent, the time of the broadcast interval is timed, and when the timed time reaches the specified packet sending interval time, another group of corresponding data packets are sent out.
The above timing function can be realized by adopting a timing module integrated in the processor.
In a specific example, the signals transmitted by the wireless communication module are bluetooth signals, for example, 2.4GHZ can be used as a carrier frequency, and the data packets are transmitted through a designated bluetooth channel. Specifically, the self-generating bluetooth switch transmits data in 40 2-MHz channels using bluetooth low energy technology. Preferably, the data is transmitted in a broadcast channel. The frequency points of the three broadcast frequency channels are respectively: the 37 channel is 2.402GHz; the 38 channel is 2.428GHz; the 39 channel is 2.480GHz.
Wherein more than one packet of signal will be sent at each press, e.g. 3-10 packets of data may be sent. The processor may be integrated with the above mentioned timing module, and the timing module is used for delaying in the transmission interval.
In one example, the packet interval duration may be 20mS, and may specifically fluctuate randomly within a range of 20mS ± 5mS (i.e., the specified packet interval duration may be in an interval range of 15 mS to 25 mS), so as to reduce the probability that transmitted packets of different switches collide over the air.
In one embodiment, taking fig. 15 and fig. 16 as an example, the data structure of the current control packet (the control packet in the embodiment of the present invention may satisfy the data structure) includes:
a header portion (corresponding to "header information" shown in the figure), a PayLoad portion (corresponding to "PayLoad" shown in the figure, which is one AD Structure), and a CRC check portion (corresponding to "CRC" shown in the figure);
the payload section includes:
a key value field (corresponding to "key value" shown in the figure) for recording a key value; the key value is information for representing a key and/or an operation action in the current operation and control information;
a verification identification field (corresponding to "serial number" shown in the figure) for recording the current verification identification.
In a further aspect, the data structure of the current control packet further includes: a physical address part (corresponding to "MAC" shown in the figure);
the physical address part includes:
a switch identification field (corresponding to "MAC L" shown in the figure) for recording a switch identification with 4 bytes; the switch identifier can also be expressed as Source ID, furthermore, in the message, 4 bytes in the physical address part are used for expressing the Source ID of the self-generating switch, the inside of the payload part can also contain the switch identifier, or the switch identifier can not be additionally contained, and if the switch identifier is not contained, the length of the message is reduced as much as possible, and the electric quantity is saved;
the payload section further includes a Frame Header control field (corresponding to "Frame Header" shown in the figure) including:
a switch identification indication field (corresponding to "ID type" shown in the figure) for describing with 1 bit whether or not the payload section describes the switch; for example: taking fig. 15 as an example, if the field is 0, it indicates that the payload portion does not additionally include Source ID (i.e., switch ID); taking fig. 16 as an example, if the field is 1, it indicates that the payload portion additionally includes a Source ID (i.e., a switch identifier) of 4 bytes, and the above design can be used to solve the problem that the upper layer application of the iOS device cannot obtain the MAC of the message.
The payload section further includes:
a signature field (corresponding to "signature" shown in the figure) for recording signature information with 4 bytes; furthermore, the message length is reduced as much as possible under the condition of ensuring the encryption strength.
The frame header control field further includes:
an encryption indication field (corresponding to "encryption type" shown in the figure) for describing whether the signature information is contained in the payload part by 1 bit, for example: if 0, it means that the information is contained, and if 1, it reserves another encryption method.
In addition, the head includes:
a preamble field (corresponding to "preamble" shown in the figure), an Access address field (corresponding to "Access address" shown in the figure), a protocol data unit data Header field (corresponding to "PDU Header" shown in the figure);
the payload section includes:
a length field (corresponding to "length" shown in the figure), a broadcast type field (corresponding to "AD type" shown in the figure), a device maker identification field (corresponding to "device maker ID" shown in the figure), a switch type field (corresponding to "switch type" shown in the figure);
the frame header control field further includes: a version number field (corresponding to "version number" shown in the figure), a number of times of forwarding field (corresponding to "forwarding count" shown in the figure);
the CRC check portion includes a CRC calculation value field.
The following will specifically exemplify a procedure for executing a control event by the receiving end.
In one embodiment, the receiving end may be a wall switch, and the control event includes at least one of the following:
the wall switch is turned off;
the wall switch is turned on;
turning off a designated function of the wall switch;
turning on a designated function of the wall switch;
and sending out a specified signal to the outside.
For other receivers that function similarly to wall switches, the control event can be understood with reference to the above example.
Regardless of the receiving end, the control event therein may include at least one of the following:
switching the on-off state of the receiving end, wherein the on-off state refers to that the receiving end is opened or closed;
and changing the working parameters of the receiving end.
In one embodiment, the process of executing the control event may be, for example:
detecting whether predefined state switching operation and parameter change operation occur or not according to the current operation information, or: detecting whether the state switching operation and the parameter change operation occur according to the current operation information and the previously received operation information;
if the state switching operation occurs, switching the on-off state of the receiving end;
if the parameter change operation occurs, changing the working parameters of the receiving end;
the state switching manipulation is distinct from the parameter change manipulation.
In a further example, the state switching operation is: the pressing duration of the corresponding key is shorter than the specified duration, and the parameter change control is as follows: and the pressing time length of the corresponding key is longer than the specified time length. In other examples, the state switching operation may also be: the pressing time length of the corresponding key is longer than the specified time length, and the parameter change control is as follows: the pressing time length of the corresponding key is shorter than the specified time length.
In the above scheme, if the receiver is a lamp, then: in one example, for a key press, a short press (released immediately after pressing) may implement a basic ON/OFF toggle command, such as turning the light ON and OFF, and a long press may implement dimming (e.g., adjusting the brightness of the light).
In one embodiment, the process of executing the control event may be, for example:
if the current control information is the control information starting to change, starting to change the working parameters of the receiving end;
if the current control information is control information which stops changing, the working parameters of the receiving end are stopped changing;
the start change operation information and the stop change operation information represent different keys and/or operation actions.
In a further example, the start change manipulation information represents a manipulation action of a corresponding key being pressed; the stop change control information represents the control action corresponding to the rebounding of the key. In other examples, the start change manipulation information and the stop change manipulation information may represent manipulation actions of different keys, or may represent manipulation actions of pressing different times.
In one embodiment, for the same key of the same switch, if the corresponding pressing control information and the corresponding rebounding control information correspond to different control events, then:
the historical verification identification stored in the receiving end is determined according to the verification identification recorded in the control message generated by the appointed control action; the appointed control action is used as a control action of pressing down the key or a control action of rebounding the key. For example: the receiving end may only store the current verification identifier therein as the historical verification identifier when receiving the control packet generated by the pressing operation, for example: the receiving end can only store the current verification identifier as the historical verification identifier when receiving the control message generated by the rebounded control action.
The receiving end of the above adjustable operating parameter may be, for example, any one of the following: lamps, fans, automatic curtains. But the invention is not limited to this, and any receiving end with the requirement of adjusting the working parameters can be used as an alternative.
Referring to fig. 18, if the receiving end is a lamp, an example of a scheme for dimming the lamp is as follows: wherein, the dimming is started when the key is pressed down and stopped when the key is rebounded. At this time, the sequence number can be used for the duplication checking of the multi-packet data transmitted at the time of pressing and rebounding.
Specifically, after receiving the control message, firstly, making a basic message validity judgment according to the message format, and then extracting the serial number in the message; comparing the serial number with the historical value (i.e. comparing the current verification identification with the historical verification identification for verification); if not, then the duplicate sequence number is considered and discarded. If the current value is greater than the historical value and the message is a message for pressing the control, dimming is started; if the current value is greater than the historical value and is a message for rebounding control, dimming is stopped; and simultaneously writing the new sequence number into the historical value for standby. This process may correspond to the processing procedure described above for starting change handling information, stopping change handling information.
In another example, for the same key, a short press (released immediately after pressing) implements a basic ON/OFF toggle command, and a long press implements dimming. This process may correspond to the process described above for the state switching manipulation information and the parameter change manipulation information.
An embodiment of the present invention further provides a control system (which can be understood with reference to fig. 1), including a self-generating switch and a receiving terminal.
In some embodiments, the control system may further include a gateway (or a router), and the gateway may be respectively connected to the self-generating switch and the receiving end in a communication manner, for example, the communication manner may be bluetooth, and may not be limited to bluetooth. The gateway may be a device dedicated to network communication, or may be a device with other specific functions (for example, a voice speaker with gateway function).
In order to facilitate understanding of the structure of the self-generating switch 1, an alternative self-generating switch will be described below with reference to fig. 19 to 26, 27a, and 27 b.
Referring to fig. 19 to 26, 27a and 27b, the self-generating switch further includes a bottom case 113 and a middle case 119, the middle case 119 covers the bottom case 113 to form an inner space, the circuit board 114, the switch circuit and the transmission member 117 are all located in the inner space, and the key 101 is located on a side of the middle case 119 away from the inner space. In other embodiments, only the bottom case 113 may be provided without the middle case 119.
Referring to fig. 19 to 26, the moving part 1031 of the generator 103 may be a power generating pick, which may be any structure that can be touched to generate electric energy by using mechanical energy, and may be in the form of a sheet, a rod, a ring, or any other shape.
The moving portion 1031 of the generator 103 is located on a side (for example, the left side in fig. 20) of the generator 103 near the non-pressing end of the key 101, that is: the moving portion 1031 is located on the side of one end of the generator 103, and the micro switch 1101 (i.e., the detection unit) is located on the side of the other end of the generator 103.
The first end of the transmission member 117 is used to be pressed by the key 5 directly or indirectly, for example, it can be pressed by a switch pressing portion 1172, wherein the switch pressing portion 1172 can protrude from the surface of the transmission member 117.
The second end of the transmission member 117 is used to actuate the moving part 1031 when the first end is pressed and/or reset under the driving of the reset acting force, so as to enable the generator 103 to generate electricity.
The moving directions of the first end and the second end of the transmission member 117 may be the same or different, and in any way, as long as the above controlled pressing and triggering of the power generation shifting piece are realized, the description of the present embodiment is not departed from.
The transmission member 117 may be provided with an insertion hole 1175 for inserting the power generating pick (i.e., the movement part 1031).
In one embodiment, a supporting portion 1131 is disposed on the bottom casing 113, the supporting portion 1131 penetrates through the circuit board 114 and extends to a side of the circuit board 114 that is away from the bottom surface of the bottom casing 113, correspondingly, the circuit board 114 may be disposed with a through hole for passing through, and the supporting portion 1131 is supported by the transmission member 117. The transmission member 117 is swingable about the support portion 1131 as a fulcrum, and is changeable between the first position state and the second position state by the swing. The number of the supporting portions 1131 may be two or more, and they may be uniformly distributed on the lower side of the transmission member 117.
Taking fig. 22 as an example, the support portion 1131 may abut against a fulcrum position of the transmission member 117, the fulcrum position may be provided with a structure for realizing abutting, or may not be provided with a structure, the fulcrum position may be a single position, or may be a variable position, and further, as the swing occurs, the contact position of the support portion 1131 and the transmission member 117 may or may not change. The circuit board 114 can be assembled in the inner space formed by the bottom case 113, the generator 103 is connected with the circuit board 114, wherein the generator 103 can be mounted on the bottom case 113 by using the generator mounting buckle 1137; the transmission member 117 is connected to the bottom case 113 through two branch points on two sides, and a rocker structure is formed by connecting lines of the two branch points, wherein one end of the transmission member 117 is connected to a power generation paddle extending from the power generator 103, the reset member 102 is mounted on the bottom case 113 and connected to the other end of the transmission member 117 or a position close to the other end, so that the power generator 103 can be reset through the transmission member 117, and the other end of the transmission member 117 can be provided with a switch pressing portion 1172.
Comparing fig. 27a and fig. 27b, and referring to fig. 19 to fig. 26, after pressing the key 101, the key 101 triggers the transmission component 117 to perform seesaw rotation, that is, the pressing end moves downwards, the other end moves upwards, so as to drive the power generation paddle of the power generator 103 to move, the kinetic energy of the power generator 103 is converted into electric energy to supply power to the circuit board 114, and the pressed key triggers the micro switch in the pressing process, meanwhile, the circuit board 114 has light emitting modules (such as LEDs) with the same number as the keys, and the LEDs flash once when pressing the emission signal every time.
After pressing, the transmission member 117 may return to the initial position under the action of the return member 102, such as a torsion spring, thereby bringing the power generating paddle of the generator 103 back to the initial position. The push button 101 is also returned to the initial position by the actuating member 117.
Referring to fig. 21 and 22, the bottom case 1 is further provided with a movement limiting rib 1132, and the transmission member 117 is provided with a movement limiting boss 1174.
The movement limiting rib 1132 penetrates through the circuit board 114 and extends to one side, away from the bottom surface of the bottom shell 113, of the circuit board 114, correspondingly, the circuit board 114 may be provided with a through hole for the circuit board to pass through, the movement limiting rib 1132 may limit the movement limiting boss 1174 and the transmission part 117 to move along the first reference direction and/or the second reference direction, for example, when moving, the movement limiting rib 1132 may block the movement of the movement limiting boss 1174.
The first reference direction is a direction from a pressing end to a non-pressing end of the key, and the second reference direction is a direction from the non-pressing end to the pressing end of the key.
Through the cooperation of spacing boss and spacing muscle, can less processing degree of difficulty realize spacingly.
Referring to fig. 21, the bottom casing 113 is further provided with an upper limiting buckle 1133, the upper limiting buckle 1133 passes through the circuit board 114 and extends to a side of the circuit board 114, which is away from the bottom surface of the bottom casing 1, and the upper limiting buckle 1133 is used for limiting the transmission component 117 to move in a direction away from the circuit board 114. Correspondingly, the edge of the transmission component can be provided with a limiting snap-fit part 1171, and the upper limiting snap 1133 can block the limiting snap-fit part 1171 when the transmission component swings, so as to limit.
Since the power generating pick is close to the non-pressing end, the upper limiting buckle 1133 can limit the movement of the end of the transmission member 117 close to the non-pressing end away from the circuit board 114.
It can be seen that, by limiting the snap, moving the limiting rib 1132, it is convenient to limit the movement position of the transmission member 117.
The above-mentioned transmission member 117 can be regarded as a rocker, and the solution of swinging by the support portion can have the advantages of easy processing, easy control of the size of the part, and the like.
In a specific implementation process, if the number of the keys 101 is at least two, for example, three as shown in the figure, then: the transmission member 117 interfaces all the keys 101 so that: when any at least one key 101 is pressed, the transmission part 117 can be pushed to change the position state.
In one embodiment, the reset device 102 may be at least one of: torsional spring, shell fragment, spring.
If the reset component 102 is a torsion spring, then: be equipped with torsional spring base 1134 on drain pan 113, torsional spring base 1134 passes circuit board 114 extends to circuit board 114 with the one side that the bottom surface of drain pan 113 deviates from mutually, torsional spring base 1134 is equipped with the torsional spring installation axle, the torsional spring install in the torsional spring installation axle, the torsional spring still is located through the connecting rod contact the torsional spring connecting portion 1173 of transmission part 117, in order to pass through the connecting rod with torsional spring connecting portion 1173 will the effort of reseing acts on transmission part 117. In a specific implementation process, the torsion spring base 1134 may further include a torsion spring limiting portion for limiting a rotation position of the torsion spring.
In one embodiment, referring to fig. 19 and 25 in combination with fig. 27a and 27b, the self-generating switch further includes a waterproof layer 118, and the waterproof layer 118 is disposed between the middle case 119 and the circuit board 114. A side surface of the waterproof layer 118 opposite to the middle shell 119 may be attached to the middle shell 119.
Specifically, the waterproof layer 118 may be provided with a switch key fitting portion 1181, the switch key fitting portion 1181 protrudes from one side of the waterproof layer 118, which is away from the circuit board 114, the middle shell 119 is provided with a key hole 1194, the switch key fitting portion 1181 penetrates through the key hole 1194, the micro switch 1101 extends into the switch key fitting portion 1181, and the switch key fitting portion 1181 is abutted to the key 101 and the micro switch 1101 respectively along a direction in which the key 101 is pressed. When the key 101 is pressed, the switch key fitting portion 1181 can be clicked to the microswitch 1101, so that the microswitch 1101 is triggered.
In addition, the waterproof layer 118 may further include a pairing key matching portion 1183, where the position of the pairing key matching portion 1183 may be matched with the position of a pairing key, and meanwhile, may be matched with a pairing switch device of a pairing circuit on the circuit board 114, and by pressing the pairing key, the pairing switch device passing through the pairing key hole 1193 may be triggered by the pairing key matching portion 1183, where the structural relationship among the pairing switch device, the pairing key hole, the pairing key matching portion, and the pairing key may be understood with reference to the structural relationship among the micro switch 1101, the key hole 1194, the switch key matching portion 1181, and the key 101.
The waterproof layer 118 may further include a press-fitting portion 1184, which is located at a position matching the press-fitting portion receiving structure 1195 of the middle shell 119. The pressing portion accommodating structure 1195 can be understood to be a structure for accommodating the switch pressing portion 1172 when the switch pressing portion 1172 is lifted up.
In a specific implementation process, the waterproof layer 118 may be waterproof silica gel.
In one embodiment, the middle shell 119 is provided with a middle shell light hole 1192, the waterproof layer 118 is provided with a waterproof layer light-transmitting portion 1182, the button 101 is provided with the light-emitting portion, the light guide column penetrates through the middle shell light hole 1192, two ends of the light guide column respectively extend to the light-emitting portion and the waterproof layer light-transmitting portion 1182, and the light guide column, the middle shell light hole 1192, the waterproof layer light-transmitting portion 1182 and the light-emitting portion are matched with the light-emitting module in position, which may be any matching mode with the positions close to each other.
The above structure capable of realizing light transmission and light guiding is not deviated from the description of the embodiment.
In one embodiment, please refer to fig. 23, fig. 24 and fig. 26, the middle case or the bottom case is provided with a first rotation shaft portion 1191, a non-pressing end of the key 101 is provided with a second rotation shaft portion 1011, the first rotation shaft portion 1191 is connected to the second rotation shaft portion 1011 in a matching manner, the key 101 can pivot toward or away from the middle case 119 through the matching of the first rotation shaft portion 1191 and the second rotation shaft portion 1011, one side of the pressing end of the middle case 119 or the bottom case 113 is provided with a first buckle 1196, and the pressing end of the key is provided with a second buckle 1013.
The first buckle 1196 abuts against the second buckle 1013 to limit the pressing end of the key 101 from moving away from the middle shell 119;
in the illustrated example, the first rotation shaft portion 1191 is a rotation shaft, the second rotation shaft portion 1011 is a shaft hole through which the corresponding rotation shaft passes, and in other examples, not illustrated, the first rotation shaft portion is a shaft hole, and the second rotation shaft portion is a rotation shaft passing through the corresponding shaft hole.
The side of the key 101 facing the middle case is further provided with a pressing part 1012, and further, the switch pressing part 1172 of the transmission component 117 can be directly or indirectly pressed by the pressing part 1012. One side of the key 101 facing the middle shell may further be provided with a switch pressing part 1014, and the switch pressing part 1014 is used for pressing corresponding to the micro switch.
In a specific example, the waterproof layer 118 of the silicone rubber is connected to the bottom case 113, and the middle case 119 is connected between the outer side of the waterproof layer 118 and the bottom case 113, so as to compress the waterproof layer 118 (wherein, the waterproof layer 118 of the silicone rubber and the waterproof wall on the bottom case 1 may adopt interference fit in structure), realize that the internal structure is completely sealed and waterproof, and finally assemble the key 101, and the key 101 may be assembled on the bottom case 1 or on the middle case 119. The key 101 has one end as a pivot, which is a fixed end, and the other end capable of pivotally reciprocating (pressing and resetting), i.e. a pressing end of the switch.
In addition, the spontaneous electrical switch that this embodiment is related to both can directly adopt double faced adhesive tape to paste in wall or other places, also can adopt the screw to install in traditional switch end box.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. The utility model provides a from power generation switch, its characterized in that includes treater, memory, button, generator, resetting means, rectifier module, energy storage module, voltage output module to and wireless communication module, wireless communication module with the memory electricity is connected the treater, the induction part of generator passes through energy storage module is connected to the rectifier module electricity, energy storage module passes through voltage output module electricity is connected wireless communication module with the treater, resetting means can with the motion portion transmission of generator, the button also can be directly or indirectly with the motion portion transmission of generator.
2. The self-generating switch according to claim 1,
the self-generating switch also comprises a polarity identification module; the polarity identification module is electrically connected with the generator and the processor;
before the processor reads the current verification identifier from the memory and updates the current verification identifier, the processor is further configured to:
after the processor, the memory and the wireless communication module are powered on, the current control action of the key is identified through the polarity identification module to obtain control action information, and the current control action is determined to be a target control action, wherein the target control action is a designated one of a pressed control action and a rebounded control action.
3. The self-generating switch according to claim 2, wherein the target manipulation action is a rebound manipulation action.
4. The self-generating switch according to claim 2, further comprising a key identification module electrically connected to the processor;
the processor, prior to generating the current control message, is further configured to:
reading a switch identification characterizing the self-generating switch from the memory;
if the current operation is the operation of pressing down: acquiring current key information through the key identification module, and updating the current key information in the memory;
if the current operation is the springback operation, then: obtaining the stored current key information from the memory;
the current manipulation information is determined based on the switch identification, the currently occurring manipulation, and the acquired current key information.
5. The self-generating switch according to claim 2, wherein the polarity recognition module includes a press recognition portion and a rebound recognition portion; the press identification part is electrically connected with the induction part of the generator and the processor respectively, and the rebound identification part is electrically connected with the induction part of the generator and the processor respectively;
when the processor identifies the current operation action of the key through the polarity identification module, the processor is specifically configured to:
if the processor receives the designated signal sent by the pressing identification part, determining the current control action as the pressing control action; wherein the press identification section transmits the designation signal to the processor only when the generator generates the first induced voltage;
and if the processor receives the designated signal sent by the springback recognition part, determining the current control action as a pressing control action, wherein the springback recognition part sends the designated signal to the processor only when the generator generates the second induction voltage.
6. The self-generating switch according to claim 1,
when updating the current verification identifier, the processor is specifically configured to:
and converting the current verification identifier from the first numerical value to a second numerical value by a preset conversion rule to form a new current verification identifier.
7. The self-generating switch according to claim 6, wherein the transformation rules include at least one of:
accumulating a first reference value on the basis of said first value to obtain said second value;
subtracting a second reference value from said first value to obtain said second value;
multiplying a third reference value by the first value to obtain the second value;
dividing the first value by a fourth reference value to obtain the second value.
8. The self-generating switch according to any one of claims 1 to 7, wherein the current control packet further includes signature information, the signature information is calculated based on a first key, and the signature information changes with a change of the current verification identifier;
the signature information can be verified by the receiving end through a second key, and the first key is matched with the second key.
9. A control system characterized by comprising the self-generating switch of any one of claims 1 to 8, and the receiving terminal.
10. The control system of claim 9, wherein the receiving end is any one of: lamp, fan, automatic window curtain, wall switch, doorbell.
CN202210558557.1A 2021-05-16 2021-05-16 Self-generating switch and control system thereof Pending CN115421401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210558557.1A CN115421401A (en) 2021-05-16 2021-05-16 Self-generating switch and control system thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210558557.1A CN115421401A (en) 2021-05-16 2021-05-16 Self-generating switch and control system thereof
CN202110531083.7A CN113410971B (en) 2021-05-16 2021-05-16 Self-generating switch and processing method and control system thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110531083.7A Division CN113410971B (en) 2021-05-16 2021-05-16 Self-generating switch and processing method and control system thereof

Publications (1)

Publication Number Publication Date
CN115421401A true CN115421401A (en) 2022-12-02

Family

ID=77678628

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202210558557.1A Pending CN115421401A (en) 2021-05-16 2021-05-16 Self-generating switch and control system thereof
CN202110531083.7A Active CN113410971B (en) 2021-05-16 2021-05-16 Self-generating switch and processing method and control system thereof
CN202210558559.0A Pending CN115421402A (en) 2021-05-16 2021-05-16 Processing method of self-generating switch and control system thereof

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202110531083.7A Active CN113410971B (en) 2021-05-16 2021-05-16 Self-generating switch and processing method and control system thereof
CN202210558559.0A Pending CN115421402A (en) 2021-05-16 2021-05-16 Processing method of self-generating switch and control system thereof

Country Status (2)

Country Link
CN (3) CN115421401A (en)
WO (1) WO2022242519A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113433841B (en) * 2021-05-16 2022-05-31 武汉领普科技有限公司 Self-generating wireless switch, controlled equipment and control system
CN113517152B (en) * 2021-05-16 2022-08-16 武汉领普科技有限公司 Switch control method, receiving end control method, self-generating switch and receiving end
CN115421401A (en) * 2021-05-16 2022-12-02 武汉领普科技有限公司 Self-generating switch and control system thereof
CN114033261B (en) * 2021-11-22 2022-08-02 中国铁塔股份有限公司 Anti-theft method, device and equipment for rectifier and storage medium
CN115276196A (en) * 2022-01-10 2022-11-01 武汉领普科技有限公司 Self-generating switch and its processing method and processing system
CN118038655A (en) * 2022-06-02 2024-05-14 武汉领普科技有限公司 Wireless switch, wireless switch processing method and control system

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100702068B1 (en) * 2005-04-29 2007-04-02 조성구 Wireless Switch System Based on Local Area Network
JP5530155B2 (en) * 2009-11-11 2014-06-25 ルネサスエレクトロニクス株式会社 Manual operation equipment with power generation function, remote control device with power generation function
CN103532854B (en) * 2013-10-22 2017-05-10 迈普通信技术股份有限公司 Storage and forwarding method and device of message
KR102141390B1 (en) * 2016-03-10 2020-09-14 삼성전자주식회사 Remotely controller
CN113162467A (en) * 2017-04-01 2021-07-23 广东易百珑智能科技有限公司 Passive rebound switch capable of changing number of keys
CN207009333U (en) * 2017-05-27 2018-02-13 红塔烟草(集团)有限责任公司 A kind of fingerprint recognition button switch
CN207133615U (en) * 2017-09-15 2018-03-23 西安奇妙电子科技有限公司 A kind of intelligent switch
CN114167769B (en) * 2018-04-28 2025-03-18 武汉领普科技有限公司 A self-generating passive switch and its working method
CN208767198U (en) * 2018-08-13 2019-04-19 武汉领普科技有限公司 A kind of spontaneous electric switch of more keys
CN110262324A (en) * 2019-06-06 2019-09-20 深圳市易百珑科技有限公司 Self-powered module, wireless control switch and wireless control system and matching method
CN111273579B (en) * 2020-01-18 2021-03-05 武汉领普科技有限公司 Receiver, processing method and system thereof and control assembly based on self-generating switch
CN111180241B (en) * 2020-01-18 2022-03-11 武汉领普科技有限公司 Self-generating switch with light emitting module and processing method thereof
CN212229465U (en) * 2020-07-23 2020-12-25 武汉领普科技有限公司 Wireless switch receiver and equipment control assembly
CN115421401A (en) * 2021-05-16 2022-12-02 武汉领普科技有限公司 Self-generating switch and control system thereof

Also Published As

Publication number Publication date
WO2022242519A1 (en) 2022-11-24
CN113410971B (en) 2022-06-03
CN113410971A (en) 2021-09-17
CN115421402A (en) 2022-12-02

Similar Documents

Publication Publication Date Title
CN113410971B (en) Self-generating switch and processing method and control system thereof
CN113517152B (en) Switch control method, receiving end control method, self-generating switch and receiving end
CN113433841B (en) Self-generating wireless switch, controlled equipment and control system
KR101696443B1 (en) Method for controlling transmissions from a resource-restricted device, and batteryless device
CN113517951B (en) Self-generating switch and processing method thereof, receiver and processing method thereof
WO2017133211A1 (en) Self-powered remote control and application thereof
CN105700396A (en) Intelligent switch module and control method therefor
CN111273579B (en) Receiver, processing method and system thereof and control assembly based on self-generating switch
CN216649662U (en) Self-generating wireless switch
CN113438564B (en) Control system, terminal processing method, wireless switch and processing method thereof
CN113423026B (en) Wireless switch, processing method thereof and control system
CN109861489A (en) Module and passive communication module occur for energy embodied
CN206116227U (en) Spontaneous electric remote controller
CN108776442A (en) A kind of self power generation passive switch and its working method
CN216016509U (en) Control system
CN1185867C (en) Remote controller
CN207557892U (en) A kind of laser page turning pen with hyperlink
CN113691323B (en) Self-generating wireless transmitter, system and control method thereof
CN107422874B (en) Multifunctional key communication method
CN115118586B (en) Self-generating switch, processing method thereof, electronic equipment and control system
CN210091366U (en) Wireless control system and self-powered transmitting device thereof
CN115410356A (en) Wireless switch and control system
CN218939073U (en) Wireless switch and control system
CN114553920B (en) Data processing method, device and storage medium
CN202929838U (en) Learning type remote controller

Legal Events

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