CN113127939A - Equipment serial number reading and writing method, system and medium - Google Patents
Equipment serial number reading and writing method, system and medium Download PDFInfo
- Publication number
- CN113127939A CN113127939A CN202110419216.1A CN202110419216A CN113127939A CN 113127939 A CN113127939 A CN 113127939A CN 202110419216 A CN202110419216 A CN 202110419216A CN 113127939 A CN113127939 A CN 113127939A
- Authority
- CN
- China
- Prior art keywords
- serial number
- self
- storage area
- executing
- service equipment
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/73—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a device serial number reading and writing method, which comprises a writing method and a reading method; setting a length threshold value of a serial number, a password verification mechanism and setting an SN input box; executing serial number writing operation, inputting equipment password and executing a password verification mechanism, and executing input action according to the execution result of the password verification mechanism to obtain a first SN and a second SN; executing a sequence number checking mechanism based on the length threshold value and the first SN and the second SN, and storing the SNs to a data buffer storage area; executing a comparison strategy based on the SN of the data buffer storage area, and storing the SN into the storage area according to the execution result of the comparison strategy; acquiring SN of a storage area of the self-service equipment through a dynamic link library to obtain a return value, and judging whether the SN is successfully read according to the return value; by the mode, the serial number can be written into the self-service equipment, the serial number can be obtained without the serial number sticker pasted on the self-service equipment, and the working efficiency is improved.
Description
Technical Field
The invention relates to the field of self-service equipment, in particular to a method, a system and a medium for reading and writing an equipment serial number.
Background
The SN is a unique identification number of the device, i.e. a device tracking number of each machine, similar to the engine number of a car, and is provided by the device manufacturer with a coding rule and the SN of each machine.
The self-service equipment types and models of the external services of the current bank outlets are very many, if equipment manufacturers require the help of a head office to position each piece of equipment, the name plate labels containing SN information pasted by the equipment manufacturers are manually read by the outlets at present, and are reported to the head office after being manually read out, so that a large amount of labor cost is increased, the name plate labels containing the SN information are easy to lose, and the management difficulty of the bank is caused if the name plate labels containing the SN information are lost.
Disclosure of Invention
The invention mainly solves the problem that the record of the serial number depends on a nameplate label to manage or increase the labor cost.
In order to solve the technical problems, the invention adopts a technical scheme that: the method comprises a writing method and a reading method; the writing method comprises the following steps:
setting a length threshold value of a serial number and a password verification mechanism, and setting an SN input box in the self-service equipment;
performing a sequence number write operation, the sequence number write operation being: inputting a device password and executing a password verification mechanism, and executing an input action according to an execution result of the password verification mechanism to obtain a first SN and a second SN;
executing a serial number checking mechanism based on the length threshold value and the first SN and the second SN, and storing the SN into a data buffer storage area of the self-service equipment;
executing a comparison strategy based on the SN of the data buffer storage area, and storing the SN into a storage area of the self-service equipment according to an execution result of the comparison strategy;
the reading method comprises the following steps:
and setting a dynamic link library, acquiring the SN in the storage area of the self-service equipment through the dynamic link library, obtaining a return value of the SN, and judging whether the SN is successfully read according to the return value.
Preferably, the password verification mechanism is: performing equipment password verification, comparing the password stored in the self-service equipment with the equipment password, and if the password is the same as the equipment password, executing an input action;
and if not, prompting and re-executing the serial number writing operation.
Preferably, the SN input box includes a first SN input box and a second SN input box;
the input action is as follows: and respectively inputting SN into the first SN input box and the second SN input box, and recording the SN as a first SN and a second SN.
Preferably, the step of storing the SN to a data buffer storage area of the self-service device by executing a sequence number check mechanism based on the length threshold and the first SN and the second SN further includes:
detecting lengths of the first SN and the second SN;
if the length of the first SN and the length of the second SN are different from the length threshold, prompting and re-executing the serial number writing operation;
and if the length of the first SN and the length of the second SN are the same as the length threshold value, storing the first SN and the second SN into a data buffer storage area of the self-service equipment.
Preferably, the step of executing an alignment policy based on the SN of the data buffer storage further includes:
and acquiring the first SN and the second SN in the data buffer storage area, and comparing whether the first SN and the second SN are consistent or not.
Preferably, the step of storing the SN in the storage area of the self-service device according to the execution result of the comparison policy further includes:
if the first SN is consistent with the second SN, writing the first SN or the second SN into a storage area of the self-service equipment through a writing function;
and if the first SN is not consistent with the second SN, prompting and re-executing the serial number writing operation.
Preferably, when the write-in function generates a return value, the first SN or the second SN is successfully written into the storage area of the self-service device;
and when the write-in function does not generate a return value, the first SN or the second SN fails to be written into the storage area of the self-service equipment, prompting is carried out, and the serial number write-in operation is executed again.
Preferably, the step of setting a dynamic link library, obtaining the SN of the storage area of the self-service device through the dynamic link library to obtain a return value of the SN, and determining whether the SN is successfully obtained according to the return value further includes:
defining a first interface in the dynamically linked library;
acquiring the SN in the storage area of the self-service equipment through the dynamic link library, the first interface and an operating system function to obtain a return value of the SN;
when the return value is empty, the SN does not exist in the storage area, and prompt is carried out;
and when the return value is not empty, outputting the SN.
The invention also provides a system for reading and writing the serial number of the equipment, which comprises: the device comprises a setting module, an input module, a checking module, a storage module, a comparison module, an acquisition module and a judgment module;
the setting module is used for setting a length threshold of a serial number, setting a password verification mechanism, setting an SN input box in the self-service equipment and setting a dynamic link library;
the input module is used for inputting equipment passwords and inputting SN;
the checking module is used for executing a password checking mechanism and a serial number checking mechanism;
the storage module is used for storing the SN;
the comparison module is used for executing a comparison strategy according to the SN;
the acquisition module is used for acquiring the SN of the storage area of the self-service equipment through the dynamic link library to obtain a return value of the SN;
and the judging module is used for judging whether the SN is read successfully according to the return value.
The invention also provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method for reading and writing the device serial number are realized.
The invention has the beneficial effects that:
1. the equipment serial number reading and writing method can achieve the purpose that the serial number is obtained without manual work through the serial number sticker pasted on the self-service equipment body, improves the working efficiency, carries out secondary input when the serial number is written in, thereby detecting the input SN number, further improving the input accuracy, judging whether the writing is successful or not through the return value after the SN data is written in, ensuring the writing accuracy, avoiding the condition that the self-service equipment does not write in the SN, and ensuring the accuracy of writing in the SN.
2. The equipment serial number reading and writing system can ensure the safety of writing SN and the accuracy of writing SN by executing a comparison strategy, a password verification mechanism and a serial number verification mechanism on the module and the verification module through comparison.
3. The computer-readable storage medium can improve the accuracy of the input SN by judging the length and the consistency of the input SN, can further improve the accuracy of the storage of the SN by judging the storage of the returned value, and ensures that each self-service device can store the serial number corresponding to the threshold.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a method for reading and writing a device serial number according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of an architecture of a device serial number read/write system according to embodiment 2 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that the terms "password checking mechanism", "input action", "serial number checking mechanism", "comparison policy", and "dynamic link library" should be construed broadly unless otherwise explicitly specified and limited. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
It is noted that in the description of the present invention
The interface of GetDeviceSN is the first interface.
SN (Serial number) is a serial number.
Example 1
The embodiment of the invention provides a device serial number reading and writing method, which is applied to self-service equipment, wherein an industrial personal computer is arranged in the self-service equipment, the method is operated in the industrial personal computer, please refer to figure 1,
the equipment serial number writing method comprises the following steps:
s101, setting a length threshold value of a serial number and a password verification mechanism, and setting an SN input box in an industrial personal computer of the self-service equipment;
s102, before the serial number is written in the industrial personal computer, equipment password is input, and a password verification mechanism is executed, wherein the password verification mechanism is as follows: checking the equipment password, comparing the password stored in the industrial personal computer with the equipment password, if the password is the same as the equipment password, entering S200, and if the password is not the same as the equipment password, prompting, and returning to the step of inputting the equipment password again;
s103, writing SN into the SN input frame, executing a verification mechanism according to the length threshold of the serial number, and storing the SN into a data buffer storage area of the industrial personal computer according to the execution result of the verification mechanism;
the method comprises the following specific steps: the SN input box comprises a first SN input box and a second SN input box, SNs are written in the first SN input box and the second SN input box respectively and are recorded as a first SN and a second SN, a checking mechanism is executed according to the length of the serial number, and the checking mechanism is as follows: detecting the lengths of the first SN and the second SN, prompting if the lengths of the first SN and the second SN are different from the length threshold value, and returning to the step of writing the SN in the SN input box,
if the length of the first SN and the length of the second SN are the same as the length threshold value, storing the first SN and the second SN into a data buffer storage area of the industrial personal computer;
s104, executing a comparison strategy based on the first SN and the second SN of the data buffer storage area, wherein the comparison strategy is as follows: comparing whether the first SN and the second SN in the data buffer storage area are consistent or not, and if the first SN and the second SN are consistent, writing the first SN or the second SN into the storage area of the industrial personal computer through a writing function;
when the first SN or the second SN is successfully written into the storage area, the write-in function can generate a return value, and if the return value is read, the first SN or the second SN is successfully written into the storage area;
if the return value is not read, the first SN or the second SN is not written into the storage area, and the step of writing the SN into the SN input frame is returned again.
If the first SN is inconsistent with the second SN, prompting and rewriting the SN in the SN input box;
s200, the method for reading the serial number of the equipment comprises the following steps:
s201, setting a dynamic link library in a storage area of an industrial personal computer, and defining an interface in the dynamic link library as an interface with a function name of GetDeviceSN;
the specific definition code is as follows:
//Description:
// Input: none
I/Output if IsNull-SN is empty, False: non-null, True: air conditioner
pszSN-specific SN variable value
//Return:0->Success;1->Fail
Int GetDeviceSN(Bool IsNull,String out pszSN)
S202, other systems can acquire SN in the storage area of the industrial personal computer through the dynamic link library, the GetDeviceSN and the operating system function, acquire the return value of the SN, and judge the information of the SN through the return value;
if the return value is 0 or null, the SN does not exist in the storage area of the industrial personal computer, the SN is not written into the industrial personal computer, and prompt is performed;
and if the return value is not 0 or not null, acquiring the SN and outputting the SN.
Example 2
An embodiment of the present invention further provides a system for reading and writing a device serial number, please refer to fig. 2, which includes: the device comprises a setting module, an input module, a checking module, a storage module, a comparison module, an acquisition module and a judgment module;
the setting module is used for setting a length threshold of a serial number, setting a password verification mechanism, setting an SN input box in the self-service equipment and setting a dynamic link library;
the input module is used for inputting equipment passwords and inputting SN;
the checking module is used for executing a password checking mechanism and a serial number checking mechanism;
the storage module is used for storing the SN;
the comparison module is used for executing a comparison strategy according to the SN;
the acquisition module is used for acquiring the SN of the storage area of the self-service equipment through the dynamic link library to obtain a return value of the SN;
and the judging module is used for judging whether the SN is read successfully according to the return value.
Example 3
The invention also provides a computer readable storage medium, which stores a computer program for executing the method when being executed by a processor, and realizes the steps of the equipment serial number reading and writing method.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate, all or part of the processes of the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the program of the method of monitoring software may be stored in a computer readable storage medium, and when executed, may include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A device serial number reading and writing method is applied to self-service equipment and is characterized by comprising a writing method and a reading method; the writing method comprises the following steps:
setting a length threshold value of a serial number and a password verification mechanism, and setting an SN input box in the self-service equipment;
performing a sequence number write operation, the sequence number write operation being: inputting a device password and executing a password verification mechanism, and executing an input action according to an execution result of the password verification mechanism to obtain a first SN and a second SN;
executing a serial number checking mechanism based on the length threshold value and the first SN and the second SN, and storing the SN into a data buffer storage area of the self-service equipment;
executing a comparison strategy based on the SN of the data buffer storage area, and storing the SN into a storage area of the self-service equipment according to an execution result of the comparison strategy;
the reading method comprises the following steps:
and setting a dynamic link library, acquiring the SN in the storage area of the self-service equipment through the dynamic link library, obtaining a return value of the SN, and judging whether the SN is successfully read according to the return value.
2. The method according to claim 1, wherein the method comprises: the password verification mechanism is as follows: performing equipment password verification, comparing the password stored in the self-service equipment with the equipment password, and if the password is the same as the equipment password, executing an input action;
and if not, prompting and re-executing the serial number writing operation.
3. The method for reading and writing the serial number of the equipment according to claim 1 or 2, characterized in that:
the SN input box comprises a first SN input box and a second SN input box;
the input action is as follows: and respectively inputting SN into the first SN input box and the second SN input box, and recording the SN as a first SN and a second SN.
4. The method according to claim 3, wherein the method comprises: the step of storing the SN in a data buffer storage area of the self-service device based on the length threshold and the first and second SNs executing a sequence number check mechanism further comprises:
detecting lengths of the first SN and the second SN;
if the length of the first SN and the length of the second SN are different from the length threshold, prompting and re-executing the serial number writing operation;
and if the length of the first SN and the length of the second SN are the same as the length threshold value, storing the first SN and the second SN into a data buffer storage area of the self-service equipment.
5. The method according to claim 4, wherein the device serial number is: the step of executing an alignment policy based on the SN of the data buffer store further comprises:
and acquiring the first SN and the second SN in the data buffer storage area, and comparing whether the first SN and the second SN are consistent or not.
6. The method according to claim 5, wherein the device serial number is: the step of storing the SN in the storage area of the self-service device according to the execution result of the comparison policy further includes:
if the first SN is consistent with the second SN, writing the first SN or the second SN into a storage area of the self-service equipment through a writing function;
and if the first SN is not consistent with the second SN, prompting and re-executing the serial number writing operation.
7. The method according to claim 6, wherein the method comprises:
when the write-in function generates a return value, the first SN or the second SN is successfully written into the storage area of the self-service equipment;
and when the write-in function does not generate a return value, the first SN or the second SN fails to be written into the storage area of the self-service equipment, prompting is carried out, and the serial number write-in operation is executed again.
8. The method according to claim 1, wherein the method comprises: the step of setting a dynamic link library, acquiring the SN in the storage area of the self-service equipment through the dynamic link library to obtain a return value of the SN, and judging whether the SN is successfully acquired according to the return value further comprises the following steps:
defining a first interface in the dynamically linked library;
acquiring the SN in the storage area of the self-service equipment through the dynamic link library, the first interface and an operating system function to obtain a return value of the SN;
when the return value is empty, the SN does not exist in the storage area, and prompt is carried out;
and when the return value is not empty, outputting the SN.
9. An apparatus serial number read-write system, comprising: the device comprises a setting module, an input module, a checking module, a storage module, a comparison module, an acquisition module and a judgment module;
the setting module is used for setting a length threshold of a serial number, setting a password verification mechanism, setting an SN input box in the self-service equipment and setting a dynamic link library;
the input module is used for inputting equipment passwords and inputting SN;
the checking module is used for executing a password checking mechanism and a serial number checking mechanism;
the storage module is used for storing the SN;
the comparison module is used for executing a comparison strategy according to the SN;
the acquisition module is used for acquiring the SN of the storage area of the self-service equipment through the dynamic link library to obtain a return value of the SN;
and the judging module is used for judging whether the SN is read successfully according to the return value.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of a method for reading and writing a device serial number according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110419216.1A CN113127939A (en) | 2021-04-19 | 2021-04-19 | Equipment serial number reading and writing method, system and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110419216.1A CN113127939A (en) | 2021-04-19 | 2021-04-19 | Equipment serial number reading and writing method, system and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113127939A true CN113127939A (en) | 2021-07-16 |
Family
ID=76778119
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110419216.1A Withdrawn CN113127939A (en) | 2021-04-19 | 2021-04-19 | Equipment serial number reading and writing method, system and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113127939A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289729A (en) * | 2011-06-27 | 2011-12-21 | 中国建设银行股份有限公司 | Method and system for managing serial number of self-service equipment and self-service equipment |
CN103186748A (en) * | 2011-12-29 | 2013-07-03 | 鸿富锦精密工业(深圳)有限公司 | Electronic device and password protection method thereof |
CN103227786A (en) * | 2013-04-08 | 2013-07-31 | 优视科技有限公司 | Method and device for filling in website login information |
CN111353181A (en) * | 2020-03-10 | 2020-06-30 | 北京天地和兴科技有限公司 | Hardware serial number storage method |
-
2021
- 2021-04-19 CN CN202110419216.1A patent/CN113127939A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102289729A (en) * | 2011-06-27 | 2011-12-21 | 中国建设银行股份有限公司 | Method and system for managing serial number of self-service equipment and self-service equipment |
CN103186748A (en) * | 2011-12-29 | 2013-07-03 | 鸿富锦精密工业(深圳)有限公司 | Electronic device and password protection method thereof |
CN103227786A (en) * | 2013-04-08 | 2013-07-31 | 优视科技有限公司 | Method and device for filling in website login information |
CN111353181A (en) * | 2020-03-10 | 2020-06-30 | 北京天地和兴科技有限公司 | Hardware serial number storage method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104216791B (en) | A kind of method of verification Flash storages data | |
JPH0793203A (en) | File managing system | |
CN110459259A (en) | Store test method, system and the storage medium of equipment write error error correcting capability | |
CN108664358A (en) | Single-chip microcomputer parameter processing method and system, readable storage medium and terminal equipment | |
JP3154892B2 (en) | IC memory card and inspection method of the IC memory card | |
CN108089971A (en) | Log services method and system based on embedded real time system | |
CN112100184A (en) | Vehicle total mileage data storage method and computer storage medium | |
CN112926296A (en) | Data verification method and device, electronic equipment and storage medium | |
CN116382582A (en) | RAID remapping method, system, equipment and storage medium | |
CN110222035A (en) | A kind of efficient fault-tolerance approach of database page based on exclusive or check and journal recovery | |
CN113127939A (en) | Equipment serial number reading and writing method, system and medium | |
US6722572B2 (en) | Recording medium control method, data management apparatus, and recording medium | |
CN106408790B (en) | Log information writing method and reading method for circulation movement of financial equipment | |
CN206431605U (en) | A kind of device of online read-write network interface card Nonvolatile memory | |
JPS603082A (en) | Ic card | |
CN112463042B (en) | Data volume import data verification method, device, terminal and storage medium | |
CN113050888B (en) | Method, system, device and storage medium for quickly removing unstable Flash blocks | |
CN110348245A (en) | Data completeness protection method, system, device and storage medium based on NVM | |
CN114764596A (en) | Method and device for prolonging hard disk service life, computer equipment and storage medium | |
CN116166344A (en) | Tax control equipment claim method, tax control equipment claim device and tax self-service terminal | |
CN107257281A (en) | NOR FLASH store method, device and the computer-readable recording medium of key data record | |
JP3487873B2 (en) | IC card issuing process management method | |
US20070274302A1 (en) | Data Storage Device, Memory Managing Method, and Program | |
CN114063590B (en) | Method and system for diagnosing power-on startup failure of traction converter heterogeneous control system | |
CN115510411A (en) | Verification method and system for control interface module of plug-in device |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210716 |