CN115544532A - Electronic atomizer data reading and writing method and device, medium and electronic atomizer - Google Patents

Electronic atomizer data reading and writing method and device, medium and electronic atomizer Download PDF

Info

Publication number
CN115544532A
CN115544532A CN202110738332.XA CN202110738332A CN115544532A CN 115544532 A CN115544532 A CN 115544532A CN 202110738332 A CN202110738332 A CN 202110738332A CN 115544532 A CN115544532 A CN 115544532A
Authority
CN
China
Prior art keywords
data
atomization device
electronic
electronic atomization
reading
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
CN202110738332.XA
Other languages
Chinese (zh)
Inventor
高煜翔
高严
林盛泓
陈加星
夏智聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Leiyan Technology Co ltd
Original Assignee
Shenzhen Leiyan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Leiyan Technology Co ltd filed Critical Shenzhen Leiyan Technology Co ltd
Priority to CN202110738332.XA priority Critical patent/CN115544532A/en
Publication of CN115544532A publication Critical patent/CN115544532A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention belongs to the technical field of data security, and particularly relates to a data reading and writing method and device for an electronic atomizer, a medium and the electronic atomizer. The data reading and writing method of the electronic atomizer comprises the following steps of: acquiring first random information sent by an electronic atomization device; encrypting the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data; sending a first plain text and first encrypted data to the electronic atomization device; acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data; if the authentication result is authentication failure, sending first prompt information; and if the authentication result is that the authentication is successful, obtaining the permission of reading the data of the electronic atomization device and/or writing the data into the electronic atomization device. The invention also includes apparatus, devices and media for performing the above methods. The invention can improve the safety of data reading and writing of the electronic atomizer.

Description

Electronic atomizer data reading and writing method and device, medium and electronic atomizer
Technical Field
The invention relates to the technical field of data security, in particular to a data reading and writing method and device for an electronic atomizer, a medium and the electronic atomizer.
Background
An electronic atomizer is an electronic product capable of heating and atomizing liquid, and generally comprises an electronic atomizing device for storing the liquid capable of being atomized and a power supply device for supplying heating electric energy for atomization. When in use, the device atomization device is plugged into the power supply device. In order to better control the electronic atomizer for improving the user experience, the power supply device and the electronic atomizer often read or write data to each other, i.e. interact with each other. Because the market is full of a large number of counterfeit power supply devices and electronic atomization devices, the data of the power supply devices or the electronic atomization devices are easily read and written illegally by counterfeit products.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a medium for reading and writing data of an electronic atomizer, so as to solve the technical problem in the prior art that data of an electronic atomizer is easily read and written illegally.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for reading and writing data of an electronic atomizer, where the method includes the following steps:
acquiring first random information sent by an electronic atomization device;
encrypting the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
sending a first plain text and first encrypted data to the electronic atomization device;
acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
if the authentication result is authentication failure, first prompt information is sent;
and if the authentication result is that the authentication is successful, obtaining the permission of reading the data of the electronic atomization device and/or writing the data into the electronic atomization device.
Preferably, the following steps are included after the authority for reading and/or writing the data of the electronic atomization device is obtained if the authentication result is that the authentication is successful:
sending a data writing instruction and data to be written to an electronic atomization device;
and receiving a writing completion signal returned by the electronic atomization device after all the data to be written are written.
Preferably, the following steps are included after the permission for reading and/or writing the data of the electronic atomization device is obtained if the authentication result is that the authentication is successful:
sending a data reading instruction and a storage address of data to be read in the electronic atomization device to the electronic atomization device;
and receiving data sent by the electronic atomization device according to the reading instruction and the storage address of the data to be read in the electronic atomization device.
Preferably, after receiving the data sent by the electronic atomization device according to the reading instruction and the storage address of the data to be read in the electronic atomization device, the method further comprises the following steps:
sending the storage address of the interested data in the electronic atomization device to the electronic atomization device;
receiving a data updating signal sent by the electronic atomization device according to the storage address of the interested data in the electronic atomization device;
sending an update data reading instruction to the electronic atomization device according to the data update signal;
receiving updated data sent by the electronic atomization device according to the updated data instruction;
and according to the data updating signal, covering the corresponding old data with the updated data.
Preferably, the step of obtaining the first encrypted data by encrypting the first plaintext in the first encryption manner according to the first random information further includes the following steps:
acquiring a plugging mode of the electronic atomization device;
selecting a corresponding key from at least two different keys according to the splicing mode to serve as a target key;
and encrypting the first plaintext by using the target secret key and a first encryption mode according to the first random information to obtain first encrypted data.
Preferably, the following steps are further included after obtaining the authority to read and/or write data to the electronic atomization device if the authentication result is that the authentication is successful:
acquiring the airflow flowing through the electronic atomization device and the suction time when a user sucks each time;
obtaining the consumption of the atomized liquid according to the airflow and the suction time;
and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
Preferably, the following steps are further included after obtaining the authority to read and/or write the data to the electronic atomization device if the authentication result is that the authentication is successful:
acquiring the heating power and the heating time of the electronic atomization device during each suction of a user;
obtaining the consumption of the atomized liquid according to the heating power and the heating time;
and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
In a second aspect, the present invention further provides an electronic atomizer data reading/writing device, comprising:
the random information acquisition module is used for acquiring first random information sent by the electronic atomization device;
the encryption processing module is used for carrying out encryption processing on the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
the first sending module is used for sending a first plaintext and first encrypted data to the electronic atomization device;
the authentication result acquisition module is used for acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
the first prompt message sending module is used for sending first prompt messages if the authentication result is authentication failure;
and the permission obtaining module is used for obtaining the permission of reading the data of the electronic atomization device and/or writing the data into the electronic atomization device if the authentication result is that the authentication is successful.
In a third aspect, the present invention also provides an electronic atomizer comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of the first aspect.
In a fourth aspect, the present invention also provides a medium having stored thereon computer program instructions which, when executed by a processor, implement the method of the first aspect.
Has the beneficial effects that: the electronic atomizer data reading and writing method, the device and the medium provided by the invention encrypt the plaintext by using random information randomly generated by the electronic atomization device, and authenticate the legality of the electronic atomization device and the power supply device according to the encrypted data. And the authority for reading and writing the data of the electronic atomization device can be obtained only after the authentication is successful. Therefore, the data of the electronic atomization device is effectively prevented from being illegally read or written, and the data reading and writing safety of the electronic atomization device is obviously improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, without any creative effort, other drawings may be obtained according to the drawings, and these drawings are all within the protection scope of the present invention.
FIG. 1 is a flow chart of a method for reading and writing data of an electronic atomizer according to the present invention;
FIG. 2 is a flowchart of a method for writing data to an electronic atomizer after successful authentication according to the present invention;
fig. 3 is a flowchart of a method for reading data of an electronic atomizer after successful authentication according to the present invention;
FIG. 4 is a flow chart of a method of reading updated data as the data of interest is updated in accordance with the present invention;
FIG. 5 is a flow chart of a method for encrypting according to the plugging mode of the electronic atomization device;
FIG. 6 is a flow chart of a method of locking an authentication system of an electronic atomizer device according to heating power upon inhalation in accordance with the present invention;
FIG. 7 is a schematic view of the electronic atomizer during insertion;
FIG. 8 is a schematic structural view of the electronic atomizer during reverse insertion;
fig. 9 is a schematic structural diagram of a data read-write device of an electronic atomizer according to the present invention;
fig. 10 is a schematic structural view of the electronic atomizer of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" comprises 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element. In case of conflict, the embodiments of the present invention and the various features of the embodiments may be combined with each other within the scope of the present invention.
Example 1
As shown in fig. 1, the present embodiment provides a data reading and writing method for an electronic atomizer, including the following steps:
s1: acquiring first random information sent by an electronic atomization device;
after the electronic atomization device and the power supply device are plugged, communication connection can be formed between electrodes of the electronic atomization device and the power supply device, so that the electronic atomization device and the power supply device can transmit information and data to each other. Therefore, the electronic atomization device and the power supply device can carry out authentication communication with each other so as to authenticate the legality of data reading of the power supply device or the electronic atomization device and determine whether to grant the authority of reading and writing data with each other according to the authentication result.
And S1: the method for acquiring the first random information sent by the electronic atomization device specifically comprises the following steps:
s11: sending a random information acquisition request to an electronic atomization device;
after the authentication is started, the power supply device can send a random information acquisition request to the electronic atomization device, the random information acquisition request is used for enabling the certified electronic atomization device to return at least one piece of random information, the random information is generated by the electronic atomization device randomly, and the random information can be random numbers, random letters, random symbols, random characters and the like.
S12: judging whether first random information which is sent by an electronic atomization device and meets first preset conditions is received within first preset time;
since some counterfeit electronic atomization devices are only the same or close in shape and interface to the genuine product, they do not have the function of generating and returning random numbers. Some counterfeit electronic nebulizers can also feed back information, but the information fed back by the electronic nebulizers may be incorrect, for example, the size of the data fed back does not meet the requirements of authentication. Therefore, the step starts timing after sending the random information acquisition request to the electronic atomization device, and if the information fed back by the electronic atomization device is not received within a certain time, the authentication failure is directly judged, no unlimited waiting is realized, and no subsequent authentication process is carried out. The first preset time may be longer than the time for the genuine electronic atomization device to return the random information after receiving the random information acquisition request, for example, may be in a range of 1 to 4 times of the time required for normally returning the random information, and the specific time may be set according to actual needs. The first preset condition may be that the size of the random number returned by the electronic atomization device satisfies a predetermined size. For example, the returned random number has a size of 4 bytes, and the first preset condition is satisfied. It is to be understood that the size of the random number satisfying the first preset condition is not limited to the foregoing size, and those skilled in the art can set the size of the random number according to practical applications. The first preset condition may also be that the type of the returned random information is a preset type, for example, the type of the returned information is numbers, letters, characters, or any combination of the foregoing. In addition, the first preset condition may be that the size of the returned information and the type of the returned information are the same as the preset size and type at the same time.
S13: if not, the authentication fails;
the step is to check whether the electronic atomization device returns random information meeting the subsequent encryption requirement before encryption processing, and if the random information meeting the subsequent encryption requirement is not returned, the authentication failure is directly judged, the subsequent encryption authentication process is not carried out, and the permission of reading the data of the electronic atomization device is not granted. The operation of reading data is not performed subsequently. Therefore, the electronic atomization device which is partially counterfeited can be screened out quickly, the authentication speed can be obviously improved, and the authentication process is simplified. In the case of the aforementioned authentication failure, first prompt information for prompting the user of the authentication failure may be transmitted.
If random information meeting the requirements is received within the specified time, namely the first preset time, the following steps are carried out:
s2: encrypting the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
in this step, the power supply device first acquires a plaintext, i.e., the first plaintext, and then performs a series of encryption processes on the acquired plaintext to obtain first encrypted data.
The method for obtaining the first encrypted data by encrypting the first plaintext in the first encryption mode according to the first random information comprises the following steps of:
s201: carrying out primary encryption processing on a plaintext according to random information to obtain first intermediate data;
in this step, the plaintext is encrypted by using the random information, for example, the plaintext is scrambled by using a random number or a random pseudo code sequence to obtain encrypted data, i.e., the first intermediate data.
S202: and sequentially encrypting each byte in the first intermediate data in a byte stream mode to obtain first encrypted data.
In this step, the encryption result is further encrypted, and each byte of the intermediate data is sequentially encrypted. Through the encryption in different modes for two times, the reliability and the safety of the authentication can be improved, and the encryption mode is effectively prevented from being cracked. In this step, the Encryption algorithm may adopt AES algorithm (Advanced Encryption Standard) and RC4 (Rivest Cipher 4) algorithm.
S3: sending a first plain text and first encrypted data to the electronic atomization device;
the power supply device sends the first plain text and the first encrypted data obtained through encryption processing to the electronic atomization device.
S4: acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
if the electronic atomization device plugged with the power supply device is a genuine product, the genuine product electronic atomization device encrypts the first plaintext by the first random information in a first encryption mode to obtain second encrypted data. In this step, the genuine power supply device and the genuine electronic atomizer encrypt the same plaintext by using the same random information and the same encryption method, thereby obtaining first encrypted data and second encrypted data, respectively. The electronic atomization device compares the first encrypted data with second encrypted data obtained by self encryption, and if the first encrypted data and the second encrypted data are the same, the electronic atomization device compares the first encrypted data with the second encrypted data; and if the first encrypted data and the second encrypted data are identical, the authentication is successful, otherwise, the authentication is failed. If the power supply device is capable of legally reading data of the electronic atomization device plugged with the power supply device, the first encrypted data and the second encrypted data are completely the same, and therefore the authentication is judged to be successful.
S5: if the authentication result is authentication failure, sending first prompt information;
the first prompt message prompts the user that the authentication fails, and the first prompt message can be in the forms of sound, light, vibration of the electronic atomizer, images and/or characters displayed by the display device and the like. And if the authentication fails, the power supply device cannot acquire the authority for reading and writing the data of the electronic atomization device.
Further, if the electronic atomization device is a counterfeit, the electronic atomization device may not be able to return an authentication result. For this, timing may be started after the first plaintext and the first encrypted data are sent to the electronic atomization device, and then it is determined whether the authentication result sent by the electronic atomization device is received within a second preset time;
if the authentication result fed back by the electronic atomization device is not received within a certain time (second preset time), the first prompt message of authentication failure is sent, and the electronic atomization device does not wait without limitation. The second preset time may be longer than the time for the certified electronic atomizer to return the encrypted data, for example, may be in a range of 1 to 4 times of the aforementioned time, and the specific time may be set according to actual needs.
S6: and if the authentication result is that the authentication is successful, obtaining the permission of reading the data of the electronic atomization device and/or writing the data into the electronic atomization device.
If the authentication is successful, the power supply device can obtain the permission of reading the data of the electronic atomization device, or obtain the permission of writing the data into the electronic atomization device, or obtain the permission of reading the data of the electronic atomization device and writing the data into the electronic atomization device.
As shown in fig. 2, at S6: if the authentication result is that the authentication is successful, the following steps are included after the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device is obtained:
s61: sending a data writing instruction and data to be written to an electronic atomization device;
after obtaining the right to write data to the electronic atomization device, the data may be written to the electronic atomization device. When writing data, the power supply device sends a data writing instruction and data to be written to the electronic atomization device. And the electronic atomization device writes the received data into the corresponding storage position of the memory according to the received data writing instruction.
S62: and receiving a writing completion signal returned by the electronic atomization device after all the data to be written are written.
And after the electronic atomization device writes all the received data to be written into the memory, the electronic atomization device returns a writing completion signal to the power supply device. And the power supply device is in a waiting state after sending the data writing instruction and the data to be written, and performs subsequent other data reading and writing operations after receiving a writing completion signal returned by the power supply device. Therefore, interruption of the data writing process can be avoided, and data is not completely written into the atomization device.
As shown in fig. 3, in the present embodiment, in S6: if the authentication result is that the authentication is successful, the following steps are included after the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device is obtained:
s63: sending a data reading instruction and a storage address of data to be read in the electronic atomization device to the electronic atomization device;
after obtaining the right to read the data of the electronic atomization device, the data of the electronic atomization device can be read. When reading data, the power supply device firstly sends a data reading instruction and a storage address of the data to be read in the electronic atomization device to the electronic atomization device.
S64: and receiving data sent by the electronic atomization device according to the reading instruction and the storage address of the data to be read in the electronic atomization device.
And after receiving the data reading instruction, the electronic atomization device sends corresponding data to the electronic atomization device according to the storage address of the data to be read in the electronic atomization device, so that the data is read.
As shown in fig. 4, as a preferred embodiment, in the present embodiment, in S64: the method further comprises the following steps after receiving the data sent by the electronic atomization device according to the reading instruction and the data to be read in the storage address of the electronic atomization device:
s641: sending the storage address of the interested data in the electronic atomization device to the electronic atomization device;
the data of interest can be set according to the actual use demand, for example, the gas flow that flows through the electronic atomization device when the user smokes for the last time, the power of heater, the negative pressure size of electronic atomization device, the content of remaining atomized liquid etc. data.
S642: receiving a data updating signal sent by the electronic atomization device according to the storage address of the interested data in the electronic atomization device;
although the storage positions of some data are unchanged, the data can be continuously updated along with the use of a user, and for the data, if the updated data can be obtained in time, the accuracy of controlling the electronic atomizer can be improved, so that the user experience is improved. In this case, the updating of the data can be monitored as a function of the storage location of the data. For example, if the data storage location of interest is monitored as being written with or overwritten by new data, indicating that such data of interest has been updated, the electronic nebulizer may send a data update signal indicating that the relevant data has been updated. The information included in the data update signal includes, but is not limited to, the size of the updated data, the storage address of the updated data in the electronic atomization device, the type of the updated data, and the like.
S643: sending an updating data reading instruction to the electronic atomization device according to the data updating signal;
and after receiving the data updating signal sent by the electronic atomization device, the power supply device sends an updating data reading instruction to the electronic atomization device, if the instruction does not contain the storage address of the reading data, the instruction indicates that all the data updated in the data reading updating signal is read, and if the instruction contains the storage address of the reading data, the power supply device reads the data corresponding to the storage address. And after receiving the update data reading instruction, the electronic atomizer sends the updated data to the power supply device.
S644: receiving updated data sent by the electronic atomization device according to the updated data instruction;
s645: and according to the data updating signal, covering the corresponding old data with the updated data.
After the power supply device receives the updated data sent by the electronic atomizer, the old data is replaced by the new data, so that the latest data can be obtained in time, and the consumption of storage resources can be reduced.
Due to the fact that the data updating time is different under the condition that the electronic atomizer is not used, the data reading operation can be carried out only when the interested data are updated, the system resource is not consumed due to frequent data reading, the data can be updated in time, the electronic atomizer can be accurately controlled according to the latest data, and the user experience is better in the using process.
As one way to implement the foregoing method, a main control circuit may be disposed in the power supply, an encryption circuit is disposed in the electronic atomization device, the main control circuit may be configured to send a random information sending request to the encryption circuit, the encryption circuit generates a random number after receiving the random information sending request and sends the random number to the main control circuit, the main control circuit scrambles the plaintext by using the received random number to obtain first intermediate data, and then encrypts the first intermediate data to obtain first encrypted data. The main control circuit sends the plaintext to the encryption circuit after receiving the random number, and the encryption circuit encrypts the plaintext in the same way to obtain second encrypted data. If the power supply device and the electronic atomization device can read and write data legally, the plaintext, the random number and the encryption mode of the encryption circuit and the main control circuit are the same, so that the obtained second encrypted data is completely the same as the first encrypted data, and the second encrypted data can pass through the authentication certificate. The main control Circuit and the encryption Circuit may be a Central Processing Unit (CPU), or other general-purpose Processor, a single-chip microcomputer, an ARM, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc.
Example 2
In the use process of the electronic atomizer, two use modes of lung inhalation and mouth inhalation are frequently adopted, wherein the amount of atomized liquid inhaled by the lung is large, the amount of atomized liquid inhaled by the mouth inhalation is small, therefore, different atomization strategies can be correspondingly adopted corresponding to two using modes of lung inhalation and mouth inhalation, so that the atomized liquid amount is large during lung inhalation, and the atomized liquid amount is small during mouth inhalation. The user may use different plugging manners when using the two manners of lung inhalation and mouth inhalation, for example, the electronic atomization device 200 and the power supply device 100 are plugged at a first relative angular position during lung inhalation, and plugged at another relative angular position during mouth inhalation, that is, different angular positions correspond to different usage manners. The two angular positions can be designed according to actual needs, and as a preferable mode, the two angular positions can be different by 180 degrees, wherein one plugging mode can be called as forward plugging, see fig. 7, and the other plugging mode can be called as reverse plugging, see fig. 8.
In the embodiment, in order to further improve the security of data reading and writing of the electronic atomizer, the two plugging manners are used to further improve the authentication method of the electronic atomizer before data reading and writing. As shown in fig. 5, in this embodiment, the S2: the first encryption method is used for encrypting the first plaintext according to the first random information to obtain first encrypted data, and the method further comprises the following steps:
s21: acquiring a plugging mode of the electronic atomization device;
in this step, the plugging manner of the electronic atomization device currently plugged with the power supply device is obtained, for example, the plugging manner is forward plugging or reverse plugging.
S22: selecting a corresponding key from at least two different keys according to the splicing mode to serve as a target key;
a corresponding key may be assigned to each plugging manner in advance, for example, a first key may be assigned to the forward plugging, and a second key may be assigned to the backward plugging. The first key and the second key are both written into the storage devices corresponding to the power supply device and the electronic atomization device once when the electronic atomization device is shipped, and are not rewritable and readable by an external device. For example, the secret key stored in the electronic atomizer can only be read by the atomizer itself and cannot be read by any device other than the atomizer, and similarly, the secret key stored in the power supply device can only be read by the power supply device and cannot be read by a device other than the power supply device.
If the power supply device acquires that the current plugging mode is the forward plugging mode, the power supply device and the electronic atomization device subsequently encrypt the plaintext by using a first secret key corresponding to the forward plugging mode, and if the power supply device acquires that the current plugging mode is the reverse plugging mode, the power supply device and the electronic atomization device subsequently encrypt the plaintext by using a second secret key corresponding to the reverse plugging mode.
S23: and encrypting the first plaintext by using the target key and a first encryption mode according to the first random information to obtain first encrypted data.
In the step, the plaintext is encrypted by using the key selected in the previous step according to the plug-in mode to obtain final encrypted data, wherein the encrypted data is obtained by encrypting the plaintext by using the power supply device and is the first encrypted data, and the encrypted data is obtained by encrypting the plaintext by using the electronic atomization device and is the second encrypted data. Because the corresponding relation between the plug-in mode and the key is utilized in the encryption process of the step, and the plug-in mode has randomness when in use, even if the key and the encryption algorithm are cracked, if the forged electronic atomizer is not provided with the corresponding relation between the key and the plug-in mode, or the corresponding relation between the key and the plug-in mode is incorrect, the electronic atomizer cannot pass the authentication, and therefore the reliability and the safety of the authentication are further improved.
Example 3
This example is modified from example 1. When the certified electronic atomizer is successfully authenticated, the user can use the electronic atomizer normally. However, a counterfeit or inferior person often recycles the used electronic atomizer, fills the counterfeit or inferior liquid into the used electronic atomizer, and adopts a genuine electronic atomizer, so that the recycled electronic atomizer can be authenticated when being reused. As shown in fig. 6, for this purpose, in S6: if the authentication result is that the authentication is successful, the following steps are included after the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device is obtained:
s74: the heating power and the heating time of the electronic atomization device during each suction of a user are obtained;
in actual use, the larger the heating power output by the atomizing device in the same time length is, the larger the amount of atomized liquid is. And if the heating power is changed along with the time, acquiring the duration corresponding to the non-heating power.
S75: obtaining the consumption of the atomized liquid according to the heating power and the heating time;
in the step, the total energy output by heating the atomized liquid is obtained by integrating the heating power over time, and the actual consumption of the atomized liquid can be obtained by the heating power and the heating time because the total energy output by heating the atomized liquid and the consumption of the atomized liquid have a positive correlation. In the manner, the consumption amount of the atomized liquid can be accurately obtained even if the user sucks different amounts each time.
S76: and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
The first threshold value is the total amount of the stored atomized liquid in the electronic atomization device, and when the consumption of the atomized liquid is larger than the first threshold value, the atomization liquid of the currently used electronic atomization device is used up, and then a mode locking signal is sent to the electronic atomization device. After the electronic atomization device receives the locking signal, the authentication system of the electronic atomization device is locked or destroyed, so that the electronic atomization device cannot perform normal authentication any more, and thus, the used electronic atomization device can be effectively prevented from being filled with counterfeit atomization liquid after being recovered.
Example 4
The embodiment provides another situation for preventing the used electronic atomization device from being filled with counterfeit atomization liquid for reuse after being recycled. In the present embodiment, in S6: if the authentication result is that the authentication is successful, the following steps are also included after the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device is obtained:
s71: acquiring the airflow flowing through the electronic atomization device and the suction time when a user sucks each time;
when the user uses the electronic atomizer, the heated and atomized liquid flows to the user along with the sucked air flow, and the more atomized liquid is sucked by the user, the larger the corresponding flow rate of the sucked air flow is. The time of aspiration refers to the duration of time that the user aspirates the aerosolized liquid. And if the flow rate of the airflow is changed when the user sucks, acquiring the duration corresponding to each flow rate of the unused airflow when sucking.
S72: obtaining the consumption of the atomized liquid according to the airflow and the suction time;
the step integrates the airflow flow in time to obtain the total airflow amount currently sucked by the user, and the total airflow amount sucked and the atomized liquid consumption amount have a positive correlation, so that the atomized liquid consumption amount up to now can be obtained through the airflow flow and the suction time. By adopting the method, the consumption of the atomized liquid can be accurately obtained even if the amount of each suction of the user is different.
S73: and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
The first threshold value is the total amount of the stored atomized liquid in the electronic atomization device, and when the consumption of the atomized liquid is larger than the first threshold value, the atomization liquid of the currently used electronic atomization device is used up, and then a mode locking signal is sent to the electronic atomization device. After receiving the locking signal, the electronic atomization device locks or destroys the authentication system of the electronic atomization device, so that the electronic atomization device can not perform normal authentication any more, and thus, the electronic atomization device which is used can be effectively prevented from being filled with counterfeit atomization liquid after being recovered.
Example 5
Referring to fig. 9, the present embodiment provides a data reading/writing device for an electronic atomizer, the device including:
the random information acquisition module is used for acquiring first random information sent by the electronic atomization device;
the encryption processing module is used for carrying out encryption processing on the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
the first sending module is used for sending a first plain text and first encrypted data to the electronic atomization device;
the authentication result acquisition module is used for acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
the first prompt message sending module is used for sending first prompt messages if the authentication result is authentication failure;
and the authority obtaining module is used for obtaining the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device if the authentication result is that the authentication is successful.
The encryption processing module further comprises:
the plug-in mode acquisition sub-module is used for acquiring the plug-in mode of the electronic atomization device;
the key selection submodule is used for selecting a corresponding key from at least two different keys according to the splicing mode to serve as a target key;
and the target secret key encryption submodule is used for encrypting the first plaintext by using a target secret key and a first encryption mode according to the first random information to obtain first encrypted data.
Example 6
In addition, the data reading and writing method of the electronic atomizer according to the embodiment of the present invention described in conjunction with fig. 10 can be implemented by the electronic atomizer. Fig. 10 is a schematic diagram illustrating a hardware structure of an electronic atomizer according to an embodiment of the present invention.
The electronic atomizer may include a processor 401 and a memory 402 storing computer program instructions.
Specifically, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 402 may include a mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In certain embodiments, memory 402 comprises Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
The processor 401 reads and executes computer program instructions stored in the memory 402 to implement the data addressing method for area random printing in any of the above embodiments.
The electronic nebulizer data can also include a communication interface 403 and a bus 410 in one example. As shown in fig. 10, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
The bus 410 includes hardware, software, or both to couple the components for fractional ink output to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 410 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
Example 7
In addition, in combination with the data reading and writing method of the electronic atomizer in the foregoing embodiment, an embodiment of the present invention may provide a computer-readable storage medium to implement the method. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any one of the methods for reading and writing data of an electronic atomizer in the above embodiments.
The foregoing is a detailed description of a method, an apparatus, a device, and a storage medium for reading and writing data of an electronic atomizer according to an embodiment of the present invention.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments noted in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (10)

1. The data reading and writing method of the electronic atomizer is characterized by comprising the following steps of:
acquiring first random information sent by an electronic atomization device;
encrypting the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
sending a first plain text and first encrypted data to the electronic atomization device;
acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
if the authentication result is authentication failure, first prompt information is sent;
and if the authentication result is that the authentication is successful, obtaining the permission of reading the data of the electronic atomization device and/or writing the data into the electronic atomization device.
2. The method for reading and writing data of the electronic atomizer according to claim 1, wherein after the permission to read and/or write the data to the electronic atomizer is obtained if the authentication result is successful, the method comprises the following steps:
sending a data writing instruction and data to be written to an electronic atomization device;
and receiving a writing completion signal returned by the electronic atomization device after all the data to be written are written.
3. The method for reading and writing data of the electronic atomizer according to claim 1, wherein after the permission to read and/or write the data to the electronic atomizer is obtained if the authentication result is successful, the method comprises the following steps:
sending a data reading instruction and a storage address of data to be read in the electronic atomization device to the electronic atomization device;
and receiving data sent by the electronic atomization device according to the reading instruction and the storage address of the data to be read in the electronic atomization device.
4. The method for reading and writing data of the electronic atomizer according to claim 3, wherein after receiving the data sent by the electronic atomizer according to the reading instruction and the storage address of the data to be read in the electronic atomizer, the method further comprises the following steps:
sending the storage address of the data of interest in the electronic atomization device to the electronic atomization device;
receiving a data updating signal sent by the electronic atomization device according to the storage address of the interested data in the electronic atomization device;
sending an updating data reading instruction to the electronic atomization device according to the data updating signal;
receiving updated data sent by the electronic atomization device according to the updated data instruction;
and according to the data updating signal, covering the corresponding old data with the updated data.
5. The method for reading and writing the data of the electronic atomizer according to any one of claims 1 to 4, wherein the step of encrypting the first plaintext in the first encryption mode according to the first random information to obtain the first encrypted data further comprises the steps of:
acquiring a plugging mode of the electronic atomization device;
selecting a corresponding key from at least two different keys according to the splicing mode to serve as a target key;
and encrypting the first plaintext by using the target key and a first encryption mode according to the first random information to obtain first encrypted data.
6. The method for reading and writing data of the electronic atomizer according to any one of claims 1 to 4, wherein the method further comprises the following steps after the permission to read and/or write the data to the electronic atomizer is obtained if the authentication result is that the authentication is successful:
acquiring the airflow flowing through the electronic atomization device and the suction time when a user sucks each time;
obtaining the consumption of the atomized liquid according to the airflow and the suction time;
and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
7. The method for reading and writing the data of the electronic atomizer according to any one of claims 1 to 4, wherein the method further comprises the following steps after the permission to read and/or write the data to the electronic atomizer is obtained if the authentication result is that the authentication is successful:
the heating power and the heating time of the electronic atomization device during each suction of a user are obtained;
obtaining the consumption of the atomized liquid according to the heating power and the heating time;
and when the consumption of the atomized liquid is greater than a first threshold value, sending a locking signal to the electronic atomization device, wherein the locking signal is used for locking an authentication system of the electronic atomization device.
8. Electronic atomizer data read-write equipment, its characterized in that, the device includes:
the random information acquisition module is used for acquiring first random information sent by the electronic atomization device;
the encryption processing module is used for encrypting the first plaintext in a first encryption mode according to the first random information to obtain first encrypted data;
the first sending module is used for sending a first plaintext and first encrypted data to the electronic atomization device;
the authentication result acquisition module is used for acquiring an authentication result which is determined and sent by the electronic atomization device according to the first plain text and the first encrypted data;
the first prompt message sending module is used for sending first prompt messages if the authentication result is authentication failure;
and the authority obtaining module is used for obtaining the authority for reading the data of the electronic atomization device and/or writing the data into the electronic atomization device if the authentication result is that the authentication is successful.
9. Electronic atomizer, characterized in that includes: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of any one of claims 1-7.
10. A medium having stored thereon computer program instructions, which, when executed by a processor, implement the method of any one of claims 1-7.
CN202110738332.XA 2021-06-30 2021-06-30 Electronic atomizer data reading and writing method and device, medium and electronic atomizer Pending CN115544532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110738332.XA CN115544532A (en) 2021-06-30 2021-06-30 Electronic atomizer data reading and writing method and device, medium and electronic atomizer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110738332.XA CN115544532A (en) 2021-06-30 2021-06-30 Electronic atomizer data reading and writing method and device, medium and electronic atomizer

Publications (1)

Publication Number Publication Date
CN115544532A true CN115544532A (en) 2022-12-30

Family

ID=84717039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110738332.XA Pending CN115544532A (en) 2021-06-30 2021-06-30 Electronic atomizer data reading and writing method and device, medium and electronic atomizer

Country Status (1)

Country Link
CN (1) CN115544532A (en)

Similar Documents

Publication Publication Date Title
US10469256B2 (en) Cryptographic communication system and cryptographic communication method
US9705673B2 (en) Method, device, and system of provisioning cryptographic data to electronic devices
US10454674B1 (en) System, method, and device of authenticated encryption of messages
US8307210B1 (en) Method and apparatus for secure validation of tokens
US9998440B2 (en) System and processing method for electronic authentication client, and system and method for electronic authentication
US20040128500A1 (en) Method and apparatus for strong authentication and proximity-based access retention
WO2004086244A1 (en) Memory device and pass code generator
JP2005038411A (en) Equipment authentication information incorporating system, terminal, equipment authentication information processing method, equipment authentication information processing program, providing server, equipment authentication information providing method, equipment authentication information providing program and storage medium
JP2004326796A (en) Method for securing terminal and application, communication terminal and identification module in method of executing application requiring high degree of security protection function
CN104868998B (en) A kind of system, apparatus and method that encryption data is supplied to electronic equipment
US7503066B2 (en) Deactivation system
CN106548338B (en) Method and system for transferring resource numerical value
US20050246523A1 (en) Management of signing privileges for a cryptographic signing service
KR20170124953A (en) Method and system for automating user authentication with decrypting encrypted OTP using fingerprint in mobile phone
CN115859267A (en) Method for safely starting application program, storage control chip and electronic equipment
CN108092764B (en) Password management method and equipment and device with storage function
JP5183517B2 (en) Information processing apparatus and program
CN1321950A (en) Content sender machine, content receiver machine, authorizing method and system
CN115544532A (en) Electronic atomizer data reading and writing method and device, medium and electronic atomizer
CN111510421B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN108319870B (en) Electronic key equipment without keys
CN115544533A (en) Electronic atomization device verification method, device, equipment and storage medium
US9015476B1 (en) Cryptographic device operable in a challenge-response mode
KR101828685B1 (en) Method for Managing Battery Replacement of OTP Token Device
CN112887099B (en) Data signing method, electronic device and computer readable storage medium

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