AES encryption-based NB instrument inspection method, system and equipment
Technical Field
The invention relates to the field of intelligent meters, in particular to an NB meter inspection method, system and equipment based on AES encryption.
Background
Industrial automation is a trend of widely adopting automatic control and automatic adjustment devices in industrial production to replace manual operation machines and machine systems for processing production. Under the precondition of industrial production automation conditions and continuous development of NB technology, the NB technology is widely applied to control and inspection of intelligent meters.
In the prior art, data at a table end is remotely read through an NB network, and verification is performed according to the read data.
However, in the above process, if the data at the meter end is tampered with during the remote transmission process, the prior art cannot check and prevent the tampering, thereby reducing the reliability of the meter check.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides an NB instrument checking method, system and equipment based on AES encryption. The technical scheme is as follows:
in one aspect, an AES encryption-based NB instrument inspection method is provided, the method is applied to a table end in which at least two-dimensional codes are externally set, the two-dimensional codes at least point to AES encryption information, and the method includes:
scanning the two-dimensional code, acquiring the AES encryption information, decrypting the AES encryption information to obtain registration information, and sending the registration information to an NB platform server, wherein the NB platform server performs matching and registration according to the registration information; the registration information comprises a table number, a module number, an ID and platform information of the table end;
acquiring a first table end parameter after AES encryption through a near field communication module of the table end, decrypting the first table end parameter after AES encryption to obtain a first table end parameter, wherein the first table end parameter at least comprises a currently measured table end module number, a SIM card number, a signal parameter, a module version number and a software version number; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
obtaining a second table end parameter after AES encryption through the NB communication module of the table end, decrypting the second table end parameter after AES encryption to obtain the second table end parameter, wherein the second table end parameter at least comprises a table end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table end reporting period and a frozen data mode;
obtaining and decrypting a second table end parameter after AES encryption returned by the NB platform server to obtain the second table end parameter;
and comparing the first table end parameter with the second table end parameter to check whether the table end is in a standard range or not and whether the table end meets a check standard or not.
Optionally, comparing the first table end parameter with the second table end parameter to check whether the table end is within a standard range, and whether the table end meets a check standard includes:
performing data comparison on the first table end parameter and the second table end parameter to obtain a comparison result;
analyzing parameter reading and behavior recording of the table terminal according to the comparison result;
and judging whether the parameter standard read by the parameter is valid or not, and judging whether the behavior record accords with parameter setting or not, so as to realize the step of checking whether the table end is in a standard range or not and whether the table end accords with the checking standard or not.
Optionally, the NB platform server performing matching and registration according to the registration information includes:
and the NB platform server performs matching and equipment registration on the telecom, unicom and mobile platform servers according to the registration information, and synchronizes the registration information into the NB platform server.
Optionally, the method further comprises:
and the NB platform server dynamically updates the AES key according to a preset time period and synchronizes the updated key to all relevant devices.
In another aspect, an AES encryption-based NB instrument inspection system is provided, the system being applied to detect a table end on which at least two-dimensional codes are externally set, the two-dimensional codes pointing to at least AES encryption information, the system comprising:
the registration device is used for scanning the two-dimensional code, acquiring the AES encryption information, decrypting the AES encryption information to obtain registration information, and sending the registration information to an NB platform server, wherein the NB platform server performs matching and registration according to the registration information; the registration information comprises a table number, a module number, an ID and platform information of the table end;
the near field communication device is used for obtaining a first table end parameter after AES encryption through a near field communication module of the table end, decrypting the first table end parameter after AES encryption to obtain a first table end parameter, wherein the first table end parameter at least comprises a currently measured table end module number, a SIM card number, a signal parameter, a module version number and a software version number; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
the NB communication device is used for acquiring a second table-end parameter after AES encryption through the NB communication module of the table-end, decrypting the second table-end parameter after AES encryption to acquire a second table-end parameter, wherein the second table-end parameter at least comprises a table-end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table-end reporting period and a frozen data mode;
the decryption device is used for acquiring and decrypting the AES encrypted second table-end parameters returned by the NB platform server to obtain the second table-end parameters;
and the analysis device is used for comparing the first table end parameter with the second table end parameter so as to check whether the table end is in a standard range or not and whether the table end meets a check standard or not.
Optionally, the analysis device is specifically configured to:
performing data comparison on the first table end parameter and the second table end parameter to obtain a comparison result;
analyzing parameter reading and behavior recording of the table terminal according to the comparison result;
and judging whether the parameter standard read by the parameter is valid or not, and judging whether the behavior record accords with parameter setting or not, so as to realize the step of checking whether the table end is in a standard range or not and whether the table end accords with the checking standard or not.
Optionally, the registering device is specifically configured to:
and the NB platform server performs matching and equipment registration on the telecom, unicom and mobile platform servers according to the registration information, and synchronizes the registration information into the NB platform server.
Optionally, the NB platform server is further configured to dynamically update the AES key according to a preset period of time, and synchronize the updated key to all relevant devices.
On the other hand, there is provided an AES encryption-based NB instrument inspection apparatus, characterized in that the apparatus is applied to detect a table end on which at least two-dimensional codes are externally set, the two-dimensional codes being directed at least to AES encryption information, the apparatus comprising:
the registration module is used for scanning the two-dimensional code, acquiring the AES encryption information, decrypting the AES encryption information to obtain registration information, and sending the registration information to an NB platform server, wherein the NB platform server performs matching and registration according to the registration information; the registration information comprises a table number, a module number, an ID and platform information of the table end;
the near field communication module is used for obtaining a first table end parameter after AES encryption through the near field communication module of the table end, decrypting the first table end parameter after AES encryption to obtain a first table end parameter, wherein the first table end parameter at least comprises a currently measured table end module number, a SIM card number, a signal parameter, a module version number and a software version number; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
the NB communication module is used for obtaining a second table-end parameter after AES encryption through the NB communication module of the table-end, decrypting the second table-end parameter after AES encryption to obtain a second table-end parameter, wherein the second table-end parameter at least comprises a table-end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table-end reporting period and a frozen data mode;
the decryption module is used for acquiring and decrypting the AES encrypted second table-end parameters returned by the NB platform server to obtain the second table-end parameters;
and the analysis module is used for comparing the first table end parameter with the second table end parameter so as to check whether the table end is in a standard range or not and whether the table end meets a check standard or not.
In another aspect, there is provided an AES encryption-based NB meter verification apparatus, the apparatus comprising a processor and a memory, wherein the memory is for storing a set of program code, the processor invoking the program code stored in the memory for implementing the method of any of the first aspects.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
1. the AES encrypts the table-end parameters and the registration information, so that the waiting time is further ensured to be short on the basis of ensuring the safety, and the reliability and the efficiency are improved.
2. Reading of the first table end parameter is achieved through near field communication, physical connection is avoided, and therefore the method is simple and easy to use, and low in implementation cost.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an NB instrument inspection method based on AES encryption provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of an NB instrument inspection system based on AES encryption according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an NB instrument inspection device based on AES encryption according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In a first embodiment, an AES encryption-based NB instrument inspection method is provided, and referring to fig. 1, the method is applied to an external table end at least provided with a two-dimensional code, where the two-dimensional code at least points to AES encryption information, and the method includes:
101. scanning the two-dimensional code, acquiring AES encryption information, decrypting the AES encryption information to obtain registration information, and sending the registration information to the NB platform server, wherein the NB platform server performs matching and registration according to the registration information.
The registration information comprises a table number, a module number, an ID and platform information of a table end;
102. and acquiring the first table end parameter after AES encryption through a near field communication module of the table end, and decrypting the first table end parameter after AES encryption to acquire the first table end parameter.
The first table end parameters at least comprise a currently measured table end module number, a SIM card number, signal parameters, a module version number and a software version number; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
103. and obtaining the second table end parameter after AES encryption through the NB communication module of the table end, and decrypting the second table end parameter after AES encryption to obtain the second table end parameter.
The second table end parameters at least comprise a table end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table end reporting period and a data freezing mode;
104. obtaining and decrypting a second table end parameter after AES encryption returned by the NB platform server to obtain the second table end parameter;
105. and comparing the first table end parameter with the second table end parameter to check whether the table end is in the standard range or not and whether the table end meets the check standard or not.
Optionally, comparing the first table end parameter with the second table end parameter to check whether the table end is within the standard range, and whether the table end meets the check standard includes:
performing data comparison on the first table end parameter and the second table end parameter to obtain a comparison result;
according to the comparison result, analyzing parameter reading and behavior recording of the table end;
and judging whether the parameter standard read by the parameters is valid or not, judging whether the behavior record accords with the parameter setting or not, and realizing the step of checking whether the table end is in the standard range or not and whether the behavior record accords with the checking standard or not.
Optionally, the NB platform server performing matching and registration according to the registration information includes:
and the NB platform server performs matching and equipment registration on the telecom, unicom and mobile platform servers according to the registration information, and synchronizes the registration information into the NB platform server.
Optionally, the method further comprises:
and the NB platform server dynamically updates the AES key according to a preset time period and synchronizes the updated key to all relevant devices.
In a second embodiment, an AES encryption-based NB instrument inspection system is provided, the system is applied to detect a table end with at least two-dimensional codes set outside, the two-dimensional codes at least point to AES encryption information, and the system includes:
the registration device is used for scanning the two-dimension code, acquiring AES encryption information, decrypting the AES encryption information, obtaining registration information, sending the registration information to the NB platform server, and matching and registering the registration information by the NB platform server; the registration information comprises a table number, a module number, an ID and platform information of a table end;
the near field communication device is used for obtaining a first surface end parameter after AES encryption through a near field communication module of the surface end, decrypting the first surface end parameter after AES encryption to obtain a first surface end parameter, wherein the first surface end parameter at least comprises a surface end module number, a SIM card number, a signal parameter, a module version number and a software version number which are currently measured; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
the NB communication device is used for obtaining the second table end parameter after AES encryption through the NB communication module of the table end, decrypting the second table end parameter after AES encryption to obtain the second table end parameter, wherein the second table end parameter at least comprises a table end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table end reporting period and a frozen data mode;
the decryption device is used for acquiring and decrypting the AES encrypted second table-end parameters returned by the NB platform server to obtain the second table-end parameters;
and the analysis device is used for comparing the first table end parameter with the second table end parameter so as to check whether the table end is in a standard range or not and whether the table end accords with a check standard or not.
Optionally, the analysis device is specifically configured to:
performing data comparison on the first table end parameter and the second table end parameter to obtain a comparison result;
according to the comparison result, analyzing parameter reading and behavior recording of the table end;
and judging whether the parameter standard read by the parameters is valid or not, judging whether the behavior record accords with the parameter setting or not, and realizing the step of checking whether the table end is in the standard range or not and whether the behavior record accords with the checking standard or not.
Optionally, the registration device is specifically configured to:
and the NB platform server performs matching and equipment registration on the telecom, unicom and mobile platform servers according to the registration information, and synchronizes the registration information into the NB platform server.
Optionally, the NB platform server is further configured to dynamically update the AES key according to a preset period of time, and synchronize the updated key to all relevant devices.
An embodiment three provides an NB instrument inspection device based on AES encryption, which is characterized in that the device is applied to detect a table end with at least two-dimensional codes set outside, the two-dimensional codes at least point to AES encryption information, and the device includes:
the registration module is used for scanning the two-dimension code, acquiring AES encryption information, decrypting the AES encryption information, obtaining registration information, sending the registration information to the NB platform server, and matching and registering the registration information by the NB platform server; the registration information comprises a table number, a module number, an ID and platform information of a table end;
the near field communication module is used for obtaining a first surface end parameter after AES encryption through a near field communication module of the surface end, decrypting the first surface end parameter after AES encryption to obtain a first surface end parameter, wherein the first surface end parameter at least comprises a surface end module number, a SIM card number, a signal parameter, a module version number and a software version number which are currently measured; the near field communication module comprises an infrared communication module or a Bluetooth communication module;
the NB communication module is used for obtaining the second table end parameter after AES encryption through the NB communication module of the table end, decrypting the second table end parameter after AES encryption to obtain the second table end parameter, wherein the second table end parameter at least comprises a table end module number, a SIM card number, a signal parameter, a module version number, a software version number, a table end reporting period and a frozen data mode;
the decryption module is used for acquiring and decrypting the AES encrypted second table-end parameters returned by the NB platform server to obtain the second table-end parameters;
and the analysis module is used for comparing the first table end parameter with the second table end parameter so as to check whether the table end is in a standard range or not and whether the table end accords with a check standard or not.
An embodiment four provides an AES encryption-based NB meter inspection apparatus, characterized in that the apparatus includes a processor and a memory, wherein the memory is configured to store a set of program codes, and the processor invokes the program codes stored in the memory to implement the method of any one of the embodiments.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present invention, which is not described herein.
It should be noted that: in the AES encryption-based NB meter inspection system and apparatus provided in the foregoing embodiments, when the AES encryption-based NB meter inspection method is performed, only the division of the foregoing functional modules is used as an example, in practical applications, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structures of the system and apparatus are divided into different functional modules, so as to perform all or part of the functions described above. In addition, the NB instrument inspection method, system and device embodiments based on AES encryption provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and are not repeated here.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.