Jelin code-based disinfectant effect testing method and system
1. A disinfectant effect testing method based on Jelin code is characterized by comprising the following steps:
receiving a request instruction for requesting a sterilizer to perform a sterilization operation using a disinfectant, and receiving a first plaintext of the sterilizer and a second plaintext of the disinfectant;
encoding the first plaintext into a first hash value by a javelin code algorithm and encoding the second plaintext into a second hash value by the javelin code algorithm in the same manner, wherein encoding the first plaintext into a first hash value by the javelin code algorithm comprises:
converting the first plaintext into a binary sequence;
setting a positive real number r to 2H(X)-Len/nWherein h (x) represents the normalized information entropy of the binary sequence, Len represents a set digital fingerprint length, and n represents the sequence length of the binary sequence;
for the ith bit symbol x in the binary sequence, according to a coding formula Ri=Ri-1rp (x) and Li=Li-1+Ri-1F (x-1, r) is coded, and L after the coding is finished is codediAs a first hash value, where R0=1,L00, p (x) denotes the normalized probability of the symbol x, F (x-1, r) denotes the non-normalized distribution function of the symbol x-1;
searching a database for hash values respectively matched with the first hash value and the second hash value, wherein the hash values stored in the database are obtained by encoding the set plain texts of the disinfection machine and the disinfectant through the Jielin code algorithm;
and if the hash values respectively matched with the first hash value and the second hash value exist in the database, sending a use instruction to the sterilizing machine, wherein the use instruction is used for driving the sterilizing machine to use the disinfectant to execute a sterilizing operation.
2. A jerine code based disinfectant validation method according to claim 1, further comprising the steps of:
and acquiring the residual using time of the disinfectant, and deleting the hash value corresponding to the disinfectant in the database if the residual using time is set to zero.
3. The jerry code-based sanitizer testing method according to claim 2, wherein said obtaining the remaining use time of the sanitizer comprises the steps of: acquiring the room area of the disinfection machine for executing disinfection operation, searching the working time from the database based on the room area, and acquiring the residual using time of the disinfectant based on the working time and the using time of the disinfectant.
4. A jerine code based disinfectant validation method according to claim 1, wherein the first plaintext and the second plaintext are comprised of any one or more symbols recognizable to a computer.
5. A jerine code based disinfectant validation method according to claim 1, further comprising the steps of:
and if the hash values respectively matched with the first hash value and the second hash value do not exist in the database, sending a use error instruction to the sterilizing machine.
6. A jerry code based disinfectant validation system comprising:
a disinfectant for providing a disinfectant solution;
a sterilizing machine for performing a sterilizing operation using the sterilizing agent;
a database for storing hash values obtained by encoding the sterilizing machine and the plaintext set by the disinfectant by a Jielin code algorithm, wherein the encoding of the plaintext to obtain the hash values comprises:
converting the plaintext into a binary sequence;
setting a positive real number r to 2H(X)-Len/nWherein h (x) represents the normalized information entropy of the binary sequence, Len represents a set digital fingerprint length, and n represents the sequence length of the binary sequence;
for the ith bit symbol x in the binary sequence, according to a coding formula Ri=Ri-1rp (x) and Li=Li-1+Ri-1F (x-1, r) is coded, and L after the coding is finished is codediAs a hash value of the plaintext, wherein R0=1,L00, p (x) denotes the normalized probability of the symbol x, F (x-1, r) denotes the non-normalized distribution function of the symbol x-1;
the control platform is used for receiving a request instruction for requesting the disinfection machine to use a disinfectant to execute disinfection operation, a first plaintext of the disinfection machine and a second plaintext of the disinfectant, respectively encoding the first plaintext and the second plaintext into a first hash value and a second hash value through the Jielin code algorithm, respectively searching the hash values respectively matched with the first hash value and the second hash value in the database, and if hash values respectively matched with the first hash value and the second hash value exist in the database, sending a use instruction to the disinfection machine to drive the disinfection machine to use the disinfectant to execute disinfection operation.
7. The jerine-code-based disinfectant validation system according to claim 6, wherein the control platform includes a central controller and a cloud platform, the central controller is configured to receive a request instruction requesting a disinfecting machine to perform a disinfecting operation using a disinfectant, a first plaintext of the disinfecting machine, and a second plaintext of the disinfectant, and to send the first plaintext and the second plaintext to the cloud platform; the cloud platform is used for respectively encoding the first plaintext and the second plaintext into a first hash value and a second hash value through the Jang code algorithm, searching hash values respectively matched with the first hash value and the second hash value in the database, and if hash values respectively matched with the first hash value and the second hash value exist in the database, feeding back a use instruction to the central controller so that the central controller sends the use instruction to the disinfection machine.
8. The jerry code-based disinfectant validation system according to claim 7, wherein 433MHz wireless transmission is employed between said central controller and said cloud platform.
9. The jerine-code based disinfectant validation system according to claim 6, further comprising a user terminal for obtaining the first plaintext and the second plaintext from the disinfection machine and the disinfectant, respectively, and sending the request instruction, the first plaintext and the second plaintext to the control platform.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the jervine-code-based disinfectant validation method of any of claims 1 to 5.
Background
In the application of the existing disinfection machine, in order to improve the disinfection quality, the disinfection machine often needs to use a genuine disinfectant produced by the original factory of the disinfection machine or produced in a matching way. Because the counterfeit cost is low, a large amount of counterfeit disinfectants exist in the market at present, the solution content and the quality of the counterfeit disinfectants are poor, and if the counterfeit disinfectants are put into a disinfecting machine for use, the disinfecting quality in a room can be reduced, and the service life of the disinfecting machine can also be reduced to a certain extent.
The applicant finds that at present, manufacturers only print two-dimensional codes on the bodies of produced disinfectants when the disinfectants are produced, and users can display production manufacturer information of the disinfectants on apps by scanning the two-dimensional codes through the apps. However, the method still has a space for counterfeiting and cannot radically solve the problem of the prevalence of the fake disinfectant in the market.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a disinfectant effect testing method and system based on Jelin code.
In a first aspect of the invention, there is provided a jerusalem code-based disinfectant validation method comprising the steps of:
receiving a request instruction for requesting a sterilizer to perform a sterilization operation using a disinfectant, and receiving a first plaintext of the sterilizer and a second plaintext of the disinfectant;
encoding the first plaintext into a first hash value by a javelin code algorithm and encoding the second plaintext into a second hash value by the javelin code algorithm in the same manner, wherein encoding the first plaintext into a first hash value by the javelin code algorithm comprises:
converting the first plaintext into a binary sequence;
setting a positive real number r to 2H(X)-Len/nWhere H (X) denotes the normalized information entropy, Len, of the binary sequenceRepresenting a set digital fingerprint length, n representing a sequence length of the binary sequence;
for the ith bit symbol x in the binary sequence, according to a coding formula Ri=Ri-1rp (x) and Li=Li-1+Ri-1F (x-1, r) is coded, and L after the coding is finished is codediAs a first hash value, where R0=1,L00, p (x) denotes the normalized probability of the symbol x, F (x-1, r) denotes the non-normalized distribution function of the symbol x-1;
searching a database for hash values respectively matched with the first hash value and the second hash value, wherein the hash values stored in the database are obtained by encoding the set plain texts of the disinfection machine and the disinfectant through the Jielin code algorithm;
and if the hash values respectively matched with the first hash value and the second hash value exist in the database, sending a use instruction to the sterilizing machine, wherein the use instruction is used for driving the sterilizing machine to use the disinfectant to execute a sterilizing operation.
According to the embodiment of the invention, at least the following technical effects are achieved:
(1) compared with the method on the market, the method can greatly improve the safety of the disinfectant, and the disinfectant can be used only if the hash values of the disinfectant and the disinfecting machine can be completely matched, so that one object is ensured, and the fake goods on the market are prevented from being popular.
(2) The method uses the Jielin code algorithm for encryption, digital fingerprint lengths with different lengths can be selected and set, and the hash values output after the digital fingerprint lengths with different lengths are coded by the Jielin code have different lengths, so that the difficulty of brute force cracking by any third party is increased, and the safety is greatly improved.
In a second aspect of the invention, there is provided a jerincher code-based disinfectant validation system comprising:
a disinfectant for providing a disinfectant solution;
a sterilizing machine for performing a sterilizing operation using the sterilizing agent;
a database for storing hash values obtained by encoding the sterilizing machine and the plaintext set by the disinfectant by a Jielin code algorithm, wherein the encoding of the plaintext to obtain the hash values comprises:
converting the plaintext into a binary sequence;
setting a positive real number r to 2H(x)-Len/nWherein h (x) represents the normalized information entropy of the binary sequence, Len represents a set digital fingerprint length, and n represents the sequence length of the binary sequence;
for the ith bit symbol x in the binary sequence, according to a coding formula Ri=Ri-1rp (x) and Li=Li-1+Ri-1F (x-1, r) is coded, and L after the coding is finished is codediAs a hash value of the plaintext, wherein R0=1,L00, p (x) denotes the normalized probability of the symbol x, F (x-1, r) denotes the non-normalized distribution function of the symbol x-1;
the control platform is used for receiving a request instruction for requesting the disinfection machine to use a disinfectant to execute disinfection operation, a first plaintext of the disinfection machine and a second plaintext of the disinfectant, respectively encoding the first plaintext and the second plaintext into a first hash value and a second hash value through the Jielin code algorithm, respectively searching the hash values respectively matched with the first hash value and the second hash value in the database, and if hash values respectively matched with the first hash value and the second hash value exist in the database, sending a use instruction to the disinfection machine to drive the disinfection machine to use the disinfectant to execute disinfection operation.
According to the embodiment of the invention, at least the following technical effects are achieved:
(1) compared with the method on the market, the system can greatly improve the safety of the disinfectant, and the disinfectant can be used only if the hash values of the disinfectant and the disinfecting machine can be completely matched, so that one object is ensured, and the fake goods on the market are prevented from being popular.
(2) The Jielin code algorithm used in the system is used for encryption, digital fingerprint lengths with different lengths can be selected and set, and the lengths of hash values output after the digital fingerprint lengths with different lengths are coded by the Jielin code are different, so that the difficulty of brute force cracking by any third party is increased, and the safety is greatly improved.
In a third aspect of the invention, there is provided a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform a method of jervine code-based disinfectant validation as described in the first aspect of the invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart of a method for testing disinfectant effectiveness based on Jelin code according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for testing disinfectant effectiveness based on Jelin code according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Jelin code based disinfectant validation system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a Jelin code based disinfectant validation system according to an embodiment of the present invention;
fig. 5 is a business logic diagram of a jersey code-based disinfectant validation system in accordance with an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
Before describing the embodiments of the present application, the jalin code algorithm used in the present application will be described.
Let the discrete random variable x have a fixed normalized probability p (x), and have a positive real number r acting on the normalized probability p (x) at any time, and mark the non-normalized probability of the discrete random variable x asThe following formula is satisfied:
the sum of the probabilities of all variables at any time is then:
k is the number of variables, and when r is 1,and isAssuming that the distribution function of the non-normalized probability model is F (x, r), F (x) is the distribution function of the normalized probability model, and s ∈ {0,1, …, k }, then:
let R0=1,L00; the calculation formula of the ith bit symbol entropy coding is as follows:
Li=Li-1+Ri-1F(x-1,r) (5)
Hi=Li+Ri (6)
according to the information entropy theory, the size of the probability of a symbol determines the size of its self-information volume, i.e. the self-information volume i (x) with a symbol x having a probability p (x) is:
I(x)=logp(x) (7)
the unit of the self-information quantity I (x) is related to the used logarithmic base number, the commonly used logarithmic base number in the information theory is 2, the unit corresponding to the self-information quantity is bit (bit), and therefore the information entropy is:
from the above, the information entropy formula of the normalized probability model of the independent discrete random sequence is as follows:
H(X)=-p(0)log2p(0)-p(1)log2p(1) (10)
where the unit of H (X) is a bit. The information entropy formula of the non-normalized probability model of the random sequence is as follows:
where the unit of H (X, r) is bit, let the length of the digital fingerprint be Len, then we can obtain:
where p (0) + p (1) ═ 1, n is the bit length of the random sequence, and the reduction formula can be obtained:
Len/n=-log2r+H(X) (13)
r=2H(X)-Len/n (14)
obviously, H (X) is obtained by the normalized probability of the symbol 0 or the symbol 1 of the independent discrete random sequence, Len is setThe length of the random sequence after encoding can be obtained by substituting known r, p (0) and p (1) into equations (3) to (6) according to the information entropy theory. A digital fingerprint extracting process for binary sequence in the coding process of Jielin code includes such steps as setting digital fingerprint length Len according to random sequence, converting to positive real number r, setting up a positive real number r to make it satisfy formula (14), coding, and decodingiAs a digital fingerprint, it is also Len in length.
According to the prior art, the applicant finds that at present, a manufacturer only prints a two-dimensional code on the bottle body of a produced disinfectant when the disinfectant is produced, a user can display production manufacturer information of the disinfectant on an app by scanning the two-dimensional code through the app, no data verification and data encryption process exists, no one-object-one-code process exists, a two-dimensional code can be easily forged by a fake producer, and the problem that the prevalence of fake disinfectants in the market cannot be radically solved.
A first embodiment;
in order to solve the above problems, referring to fig. 1 and 2, one embodiment of the present invention provides a jerrin-based disinfectant validation method for a control platform, comprising the steps of:
s100, the control platform receives a request instruction for requesting the disinfection machine to use the disinfectant to execute disinfection operation, and receives a first plaintext of the disinfection machine and a second plaintext of the disinfectant.
The request instruction for requesting the disinfection machine to perform disinfection operation using the disinfectant can be from a mobile phone (for example, the mobile phone opens an app or a WeChat applet) or a disinfection machine (a plurality of function keys are arranged on the disinfection machine), and the embodiment is described by taking the request instruction from the disinfection machine as an example.
The user presses a button 'start' on the sterilizer and inputs the plaintext on the disinfectant bottle (the user can obtain the plaintext by scanning the two-dimensional code on the bottle body or the disinfectant bottle body is provided with an ID number which can be determined according to the situation), and the sterilizer sends the inputted plaintext together with the plaintext to the control platform. The sources of the plaintext are as follows:
after the disinfection machine is produced from the workshop, the producer will set a plaintext (different from the first plaintext in step S100), and after the same disinfectant is produced from the workshop, the producer will also set a plaintext (different from the second plaintext in step S100). Of course, if the producer does not set the unique corresponding plain text for the sterilizing machine and the sterilizing agent after production in the workshop, the unique corresponding plain text can be set at the time of sale.
As an alternative embodiment, the plaintext may be composed of any one or more symbols recognizable by the computer, such as numbers, letters, special symbols, Chinese characters, or even any symbols recognizable by the computer. Take the example of converting Chinese characters into binary system: 3755 primary Chinese characters, 3008 secondary Chinese characters, 682 graphic symbols and 7445 graphic symbols are collected in a character set of a national standard code (national standard information exchange Chinese character code of the people's republic of China, with the code number of GB 2312-80). A Chinese character corresponds to a zone bit code and consists of four digits, wherein the first two digits are zone codes (0-94), and the last two digits are bit codes (0-94). Meanwhile, the Chinese characters of the whole part, the Japanese and the Korean (CJK) are supported at the level of the vocabulary according to ISO/IEC 10646-1 and GB 13000-1, and the total number is 20902 characters. The information of characters, graphics, sound, animation, etc. is changed into binary number coded according to a certain rule. The machine code means that the machine code of Chinese characters in the computer takes up two bytes, which are called the high order and low order of the machine code. Their relationship to the region bit code is as follows: the high-order of the machine code is area code + A0H, and the low-order of the machine code is bit code + A0H. This can improve the extent of setting the plaintext.
For convenience of management, the manufacturer can set corresponding plaintext according to the medicament information (product name, date of manufacture, product number, special number, etc.), such as: the product name is as follows: G. the production date is as follows: 2020.01.01, product number: 06. special number: m, then according to the above information makes up, the plaintext of this product is: G2020010106M. Likewise, the disinfection machine can be provided with a plain text according to the same method, which is not described in detail here.
After the corresponding plaintext is produced and set by the sterilizer and the disinfectant, the sterilizer and the disinfectant are encoded by a Jielin code algorithm to obtain a unique hash value corresponding to the plaintext, and the hash value is stored in a database.
The jilin code algorithm used in this application is introduced here as a process of encoding a plaintext into a uniquely corresponding hash value:
and S101, converting the plaintext into a binary sequence.
S102, setting a positive real number r to 2H(X)-Len/nWhere h (x) represents the normalized information entropy of the binary sequence, Len represents the set digital fingerprint length, and n represents the sequence length of the binary sequence.
S103, for the ith bit symbol x in the binary sequence, according to a coding formula Ri=Ri-1rp (x) and Li=Li-1+Ri-1F (x-1, r) is coded, and L after the coding is finished is codediAs a plain uniquely corresponding hash value, where R0=1,L00, p (x) denotes the normalized probability of the symbol x, and F (x-1, r) denotes the non-normalized distribution function of the symbol x-1.
The process of encoding the binary sequence in step S103 is specifically as follows:
initial setting: i is 0, R0=1,L0=0;
The first step, coding the ith symbol, and entering the second step if the ith symbol is symbol 0; if the ith symbol is symbol 1, entering a third step;
second, substituting the symbol 0 into the coding formula to obtain Ri=Ri-1rp (0), L since F (-1, r) ═ 0i=Li-1And proceeding to the fourth step;
here, the coding equations are equations (4) and (5) described above.
Thirdly, substituting the symbol 1 into a coding formula to obtain Ri=Ri-1rp (1), F (0, r) ═ rp (0), so Li=Li-1+Ri-1rp (0), and proceed to the fourth step;
here, the coding equations are equations (4) and (5) described above.
Step four, if the cyclic variable i is i +1, judging that i is less than or equal to n, and entering the first step; if i>n, ending coding and outputting V, wherein V is L after binary sequence codingiThe output V is also the hash value.
Wherein, the coding formula of the Jielin code algorithm is as followsAnd Li=Li-1+Ri-1F(x-1,r)。
Table 1 below provides a portion of the plaintext of the digital fingerprint (i.e., hash value herein) generated by the above-described encoding method:
TABLE 1
Provided below, the plaintext is the digital fingerprint that sets a different digital fingerprint length (bit) output for G2020010106M:
32bit:6d3f61f0;
64bit:2d9fef7877f6dd85;
128bit:d9e5a02ce5c6c970072ca0bfdb095739;
256bit:7031ff8e3e4a470f849ddc099b6d9bf38aa978b39dec12402c9596045b86ff90;
512bit:4c58ec611e35eba29899b369f4a4fc078f826e7e19dda95af31998db5be495e30750a9cf1f65e5a03d8e485629a0d33c8cfc5f2875281e7c8fbe5a8c630a726e。
s200, the control platform encodes the first plaintext and the second plaintext into a first hash value and a second hash value respectively through a Jielin code algorithm.
As mentioned above, the disinfection machine and the disinfectant are both set as a plain text at the time of production, and are encoded into uniquely corresponding hash values, which are stored in the database.
When the user uses the sterilizer, the user presses a key to start and inputs the plaintext (namely the second plaintext) on the sterilizer body, and the sterilizer sends the input plaintext together with the own plaintext (namely the second plaintext) to the control platform. Since the sterilizer and the disinfectant are produced or sold, the two plaintext received by the control platform are not necessarily the plaintext set in production, because of the possibility of being tampered, for example, the sterilizer is cracked by a third party to tamper information, the two-dimensional code on the disinfectant is tampered, and the like. Here, the encoding steps for encoding the first plaintext into the first hash value and encoding the second plaintext into the second hash value are the same as the above-described procedure, and are not described herein again.
S300, the control platform searches the hash values respectively matched with the first hash value and the second hash value in the database, and if the hash values respectively matched with the first hash value and the second hash value exist in the database, the control platform sends a use instruction to the disinfection machine, and the use instruction is used for driving the disinfection machine to use a disinfectant to execute disinfection operation.
Since the above description has been given, the database stores a plurality of hash values obtained by encoding the plain text set by the sterilizer and the sterilizer at the time of production by the jervine code algorithm. The process is not described in detail here. The technical solution of searching in the database belongs to the prior art, and therefore, the detailed description is omitted.
When the same hash value as the first hash value and the second hash value exists in the database, it means that the data of the disinfection machine and the bottle of disinfectant are not tampered, and the disinfection machine and the bottle of disinfectant belong to genuine products. When the control platform is informed that the product is genuine, the control platform sends a use instruction to the disinfection machine for driving the disinfection machine to use the disinfectant to perform disinfection operation. Otherwise, the product is not used, and a use error instruction is sent to the sterilizing machine for prompting the user that an error occurs and prompting the user to use the genuine product.
In the embodiment of the method, a producer firstly encodes the disinfectant and the unique plaintext of the disinfecting machine into the unique corresponding hash value through the Jelin code algorithm and stores the hash value in the database when the producer goes out of production or sells, and as the length of the hash value in the encoding process of the Jelin code algorithm used in the method is uncertain, the difficulty of brute force cracking is increased, so that the safety is improved. Then when the user uses the sterilizer, the user inputs the plaintext of the sterilizer, and the sterilizer sends the inputted plaintext together with the own plaintext to the control platform. And then after the control platform codes the corresponding hash value, matching the coded hash value with the hash value stored in the database, if the two hash values are consistent, verifying that the data is not falsified, and if the disinfectant in the disinfection machine and the bottle belongs to a genuine product, commanding the disinfection machine to execute disinfection operation, wherein the process is equivalent to performing one-time forced verification on the disinfection machine and the disinfectant to ensure that the disinfection machine and the disinfectant are used after the hash value verification is performed, so that the authenticity verification rate of the disinfectant can reach 100%.
The embodiment of the method has the following beneficial effects:
(1) compared with the method on the market, the method can greatly improve the safety of the disinfectant, and the disinfectant can be used only if the hash values of the disinfectant and the disinfecting machine can be completely matched, so that one object is ensured, and the fake goods on the market are prevented from being popular.
(2) The method uses the Jielin code algorithm for encryption, digital fingerprint lengths with different lengths can be selected and set, and the hash values output after the digital fingerprint lengths with different lengths are coded by the Jielin code have different lengths, so that the difficulty of brute force cracking by any third party is increased, and the safety is greatly improved.
As an optional implementation, the method further comprises the following steps:
s400, the control platform obtains the remaining use time of the disinfectant, and if the remaining use time is set to be zero, the hash value corresponding to the disinfectant in the database is deleted.
When the user uses the disinfectant, the service time of a bottle of disinfectant is calculated, and after the service time is over, the corresponding hash value of the bottle of disinfectant stored in the database can be invalid, so that one object and one code are fundamentally ensured, a counterfeit party can be found without trace, and the problem that the counterfeit party or the user adds the self-made disinfectant again on the original bottle after using the bottle of disinfectant is also avoided.
Wherein, the step of obtaining the residual using time of the disinfectant comprises the following steps:
s401, acquiring the room area of the disinfection machine for executing the disinfection operation, searching the working time from the database based on the room area, and acquiring the residual using time of the disinfectant based on the working time and the using time of the disinfectant.
The room area is input by a user, the database comprises an expert database, and corresponding working time is found in the expert database (a plurality of templates are stored in the expert database) based on the input room area. The remaining time of use of the disinfectant can then be obtained based on the working time and the time the disinfectant can be used (since there are instances where the working time is less than the time the disinfectant can be used). It is emphasized that the present application does not consider the adjustment of the disinfectant spray rate, but defaults to a uniform spray.
A second embodiment;
referring to fig. 3, one embodiment of the present invention provides a jerry code-based disinfectant validation system comprising: disinfectant, sterilizer, database, control platform, wherein:
the disinfectant is used for providing disinfectant.
The sterilizer is used to perform a sterilization operation using a disinfectant.
The database is used for storing the hash value obtained by encoding the plaintext set during the production of the disinfector and the disinfectant through the Jelin code algorithm.
Since the coding of the javelin code algorithm has already been described in the first embodiment, the principle and procedure thereof will not be described herein again.
The control platform is used for receiving a request instruction for requesting the disinfection machine to use the disinfectant to execute disinfection operation, a first plaintext of the disinfection machine and a second plaintext of the disinfectant, respectively encoding the first plaintext and the second plaintext into a first hash value and a second hash value through a Jielin code algorithm, respectively searching the hash values respectively matched with the first hash value and the second hash value in a database, and if the hash values respectively matched with the first hash value and the second hash value exist in the database, sending a use instruction to the disinfection machine to drive the disinfection machine to use the disinfectant to execute the disinfection operation.
The embodiment of the method has the following beneficial effects:
(1) compared with the scheme on the market, the system can greatly improve the safety of the disinfectant, and can be used only if the disinfectant and the hash value of the disinfecting machine can be completely matched, so that one object can be used, and the fake goods on the market can be avoided.
(2) The Jielin code algorithm used in the system is used for encryption, digital fingerprint lengths with different lengths can be selected and set, and the lengths of hash values output after the digital fingerprint lengths with different lengths are coded by the Jielin code are different, so that the difficulty of brute force cracking by any third party is increased, and the safety is greatly improved.
A third embodiment;
referring to fig. 4, in accordance with a second embodiment, one embodiment of the present invention provides a jerry code-based disinfectant validation system, comprising: disinfector, disinfection machine, database (not shown in fig. 4), central controller, cloud platform and hand-held terminal (or computer terminal);
the communication between sterilizer and the central controller adopts 433MHz wireless transmission, can promote the validity and the security of communication.
The following provides a flow of user operation, taking handheld terminal operation as an example (a central controller is not needed at a mobile phone end):
the first step is as follows: when the disinfector and the disinfectant are produced, the ID numbers of the disinfector and the disinfectant are changed into two-dimensional codes and are printed in the corresponding areas of the disinfector and the disinfectant; the cloud platform encodes the ID numbers of the disinfector and the disinfectant into corresponding hash values by a Jelin code algorithm, and stores the hash values in a database. In the embodiment, the ID number is used as a plaintext, and it should be further noted that the process of storing the known content transition into the two-dimensional code is well known to those skilled in the art.
The second step is that: and the user loads the WeChat applet by scanning the two-dimensional code above the sterilizer.
The third step: and the user scans the two-dimensional code below the disinfection machine through the WeChat small program to obtain the ID number of the disinfection machine, or directly inputs the ID number.
The fourth step: and the user scans the two-dimensional code above the disinfectant through the WeChat small program to obtain the ID number of the disinfectant, or directly inputs the ID number.
The fifth step: the user enters the length, width and height of the room to be used on the WeChat applet.
And a sixth step: the WeChat applet sends the sterilizer ID number, the sanitizer ID number, and the room length, width, and height to the cloud platform.
The seventh step: after receiving the ID number of the disinfection machine, the ID number of the disinfection agent and the length, width and height of a room, the cloud platform encodes the ID number of the disinfection machine and the ID number of the disinfection agent by using Jielin codes to obtain hash values of the ID number of the disinfection machine and the ID number of the disinfection agent, searches a database, if records exist in the database, the cloud platform uses legality and continues to carry out the next step, and otherwise, the cloud platform feeds back that 'the disinfection agent is wrong, the normal disinfection agent is bought', and/or 'the disinfection machine is wrong, the normal disinfection machine is bought' to a WeChat small program.
Eighth step: the expert database is searched, the type of the disinfectant is obtained through the disinfectant ID number, the available time is obtained through the length, the width and the height of the room and the type of the disinfectant, the disinfectant proportion is obtained through the type of the disinfectant, an allowable use command is sent to the mobile phone end, and the available time, the disinfectant proportion and the ID number of the disinfection machine are sent to the central controller.
The ninth step: and after receiving the available time, the disinfectant proportion and the ID number of the disinfection machine sent by the cloud platform, the central controller forwards the available time and the usage proportion data to the disinfection machine.
The tenth step: the sterilizing machine performs a sterilizing operation in a room.
The following provides a user operation flow, taking a handheld terminal-free operation as an example (a mobile phone end does not need a central controller):
the first step is as follows: when the disinfector and the disinfectant are produced, the ID numbers of the disinfector and the disinfectant are changed into two-dimensional codes and are printed in the corresponding areas of the disinfector and the disinfectant; the cloud platform encodes the ID numbers of the disinfector and the disinfectant into corresponding hash values by a Jelin code algorithm, and stores the hash values in a database. In the embodiment, the ID number is used as a plaintext, and it should be further noted that the process of storing the known content transition into the two-dimensional code is well known to those skilled in the art.
The second step is that: the user inputs the ID number on the disinfectant into the disinfection machine through the disinfection machine key.
The third step: the user inputs the length, width and height of the room through the keys of the sterilizer.
The fourth step: the sterilizer sends the sterilizer ID number, the sterilizer ID number and the room length, width and height together to the central controller.
The fifth step: the central controller forwards the information to the cloud platform.
And a sixth step: after receiving the ID number of the disinfection machine, the ID number of the disinfection agent and the length, width and height of a room, the cloud platform encodes the ID number of the disinfection machine and the ID number of the disinfection agent by using Jielin codes to obtain hash values of the ID number of the disinfection machine and the ID number of the disinfection agent, searches a database, if records exist in the database, the cloud platform uses legality and continues to carry out the next step, and otherwise, the cloud platform feeds back 'the disinfection agent error, and asks for purchasing the normal disinfection agent', and/or 'the disinfection machine error, asks for purchasing the normal disinfection machine' to the central controller.
The seventh step: the central controller transmits the information to the sterilizing machine.
Eighth step: the expert database is searched, the type of the disinfectant is obtained through the disinfectant ID number, the available time is obtained through the length, the width and the height of the room and the type of the disinfectant, the disinfectant proportion is obtained through the type of the disinfectant, an allowable use command is sent to the mobile phone end, and the available time, the disinfectant proportion and the ID number of the disinfection machine are sent to the central controller.
The ninth step: and after receiving the available time, the disinfectant proportion and the ID number of the disinfection machine sent by the cloud platform, the central controller forwards the available time and the usage proportion data to the disinfection machine.
The tenth step: the sterilizing machine performs a sterilizing operation in a room.
The embodiment of the method has the following beneficial effects:
(1) compared with the scheme on the market, the system can greatly improve the safety of the disinfectant, and can be used only if the disinfectant and the hash value of the disinfecting machine can be completely matched, so that one object can be used, and the fake goods on the market can be avoided.
(2) The Jielin code algorithm used in the system is used for encryption, digital fingerprint lengths with different lengths can be selected and set, and the lengths of hash values output after the digital fingerprint lengths with different lengths are coded by the Jielin code are different, so that the difficulty of brute force cracking by any third party is increased, and the safety is greatly improved.
(3) The system calculates the service time of a bottle of disinfectant, and after the service time of a user is over, the corresponding hash value stored in the database of the bottle of disinfectant can lose efficacy, so that one object and one code are fundamentally ensured, a counterfeiter can search without trace, and the problem that the counterfeiter or the user adds the self-made disinfectant again on the original bottle after using the bottle of disinfectant is also avoided.
It is noted that other functions of the disinfection machine are not described in detail in this application.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform a jervine code-based disinfectant validation method according to a first embodiment of the present invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by software plus a general hardware platform. Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program that can be executed by associated hardware, and the computer program may be stored in a computer readable storage medium, and when executed, may include the processes of the above embodiments of the methods. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种网页刷新方法、网页刷新系统及相关装置