Instrument with near field wireless communication interface and independent data storage and storage method
By using dual-interface EEPROM chip and wireless antenna in electronic instruments, data is read through NFC terminals without disassembling the instrument, solving the problem of inability to read settlement values when electronic instruments fail, reducing costs and complexity , extends the number of write operations for data storage.
Patent Information
- Application Number
- CN202411567432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-07
AI Technical Summary
When existing electronic instruments fail in battery or electronic components, they cannot read the settlement value without disassembly, making it difficult for both supply and demand parties to determine the settlement value, which is prone to disputes, and the existing technology increases equipment cost and complexity.
Design an instrument with a near-field wireless communication interface and independent data storage, adopts a dual-interface EEPROM chip, and read and write data through the serial interface of the main control system and the EEPROM chip, and communicate with the NFC function terminal through the wireless antenna to realize Real-time interaction and storage of data.
When the main control system is damaged, the internal data of the EEPROM chip is wirelessly read through the NFC function terminal, avoiding the disassembly of the device, extending the number of write operations of data storage, and reducing cost and complexity.
Smart Images

Figure CN119276301A_ABST
Abstract
Description
Technical Field The present invention belongs to the technical field of electronic instruments, and in particular relates to an instrument with a near-field wireless communication interface and independent data storage, and a storage method. Background Art With the development of society and technology, more and more electronic measuring instruments are used for trade settlement between supply and demand parties in production and life. When the internal batteries, electronic components, etc. fail, the electronic instruments cannot display the settlement value normally. Without disassembling the electronic instruments, it is impossible to read the settlement value before the failure, making it impossible for supply and demand parties to determine the settlement value, which is easy to cause disputes. Among the near-field communication methods of electronic instruments, infrared, Bluetooth, WIFI and other communication methods have high power consumption and will consume the battery power of the instrument during communication. Wired communication methods affect the sealing of the instrument. In the prior art, there is a patent with application number "202111208521.2", publication number: 114064354A; and the name is "Dual-interface independent backup data storage module and electronic instrument analysis and processing method". It is a low-cost and passive dual-interface independent backup data storage module used to record process data for trade settlement of intelligent electronic metering instruments. When the LCD of the intelligent electronic metering instrument has no display, the NFC radio magnetic field of the smart terminal can be used to power the dual-interface independent backup data storage module to obtain the backup key data.
[0010] S1, the electronic meter is connected to a dual-interface independent backup data storage module, the electronic meter stores metering data according to the agreed format, the dual-interface independent backup data storage module has a built-in CPU for scheduling and managing the read-write control and data storage of the EEPROM memory, the electronic meter transmits the metering data in the specified format to the dual-interface independent backup data storage module, and the dual-interface independent backup data storage module autonomously performs storage address management and storage space arrangement through the CPU;
[0011] S2, if the electronic meter cannot display the metering data, the dual-interface independent backup data storage module is wirelessly powered by a smart terminal with an NFC function to read and display the metering data. Combined with the contents of the above two paragraphs, this patent application requires setting up a passive independent storage module outside the electronic instrument to back up data, and then obtaining the backup data of the passive independent storage module through devices such as NFC mobile phones. This patent requires additional equipment to increase costs, the structure becomes more complicated, and it is more inconvenient to use. Summary of the invention In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide an instrument with a near-field wireless communication interface and independent data storage, so that the data stored in the dual-interface EEPROM chip can be read through a terminal with NFC function without disassembling the instrument. In order to solve the above technical problems, the present invention adopts the following technical solutions: an instrument with a near-field wireless communication interface and independent data storage, comprising a main control system, a dual-interface EEPROM chip and a wireless antenna; the main control system is connected to the dual-interface EEPROM chip, and the dual-interface EEPROM chip is connected to the wireless antenna; The dual-interface EEPROM chip has two communication interfaces, including a first interface and a second interface. The main control system connects to the dual-interface EEPROM chip through the first interface to read and write its internal data. The terminal with NFC function can communicate with the dual-interface EEPROM chip through the wireless antenna and the second interface to read its internal data. Therefore, when the main control system is damaged and does not work, the data stored in the dual-interface EEPROM chip can be read through the terminal with NFC function without disassembling the instrument. The dual-interface EEPROM chip is an independent data storage chip, and the stored data will not be lost after power failure. The first interface is a serial communication interface connected to the main control system; the second interface is a wireless communication interface connected to the wireless antenna. The terminal with NFC function can supply power to the dual-interface EEPROM chip through the wireless antenna and the second interface to make it work. The dual-interface EEPROM chip has a label mode and a channel mode. By changing the chip configuration word of the dual-interface EEPROM chip, the label mode and the channel mode can be switched. When in tag mode, the dual-interface EEPROM chip can be regarded as a built-in EEPROM, data can be read and written through the first interface, and data can be read through the second interface; When in channel mode, the dual-interface EEPROM chip can be regarded as a built-in FIFO buffer, providing a data transmission channel for communication between the first interface and the second interface; with the help of this data transmission channel, the terminal with NFC function can perform real-time interactive data transmission with the main control system, that is, near-field communication. A storage method for an instrument having a near field wireless communication interface and independent data storage, used for the instrument, comprises the following steps; Step 1: The main control system determines that the operation time of the storage record has expired; Step 2: The main control system reads the current date and time and calculates the storage address index; Step 3: The main control system writes a record to the storage address index of the dual-interface EEPROM chip and ensures that the writing is correct. The key to the storage method of the instrument with a near-field wireless communication interface and independent data storage is that: the method for the main control system to determine whether the operation time of the storage record has arrived in the step one includes reading whether the current time is a multiple of Tm or a timing time with a cycle of the Tm timer or a timing time with a cycle of the Tm alarm clock. If so, the main control system determines that the operation time of the storage record has arrived; if not, the main control system determines that the operation time of the storage record has not arrived. The key to the storage method of the instrument with a near-field wireless communication interface and independent data storage is that: in the step 1, the instrument periodically writes a storage record into the dual-interface EEPROM chip at an interval of Tm minutes, and the storage record includes the current time, settlement value, and status information. Because the dual-interface EEPROM chip has a maximum write operation number Wemax limit (generally, Wemax is equal to 1 million times), in order to extend the write operation times, a block cycle write method is used to manage and store data; The storage capacity of the dual-interface EEPROM chip is Ce bytes; one storage record is Ns bytes; the maximum number of storage records Nsmax = Ce / Ns; the maximum number of storage times Wsmax = Wemax × Nsmax; Number of storage times Ws = instrument life time / Tm, Ws<Wsmax. The key to the storage method of the instrument with a near-field wireless communication interface and independent data storage is that in step 2, the main control system reads the current date and time, and calculates the storage address index including: The storage address index is calculated cyclically according to time; Suppose the time is 20yy year mm month dd day hh hour nn minute, and the calculated value is the yday day of this year (starting from January 1), then if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: Among them, % represents the modulo operation, that is, the remainder operation. Significant effect: The present invention provides an instrument with a near-field wireless communication interface and independent data storage and a storage method. The dual-interface EEPROM chip provided therein has two communication interfaces. The first interface is connected to the main control system. The terminal with NFC function can communicate with the dual-interface EEPROM chip through the wireless antenna and the second interface to read out its internal data. Therefore, when the main control system is damaged and does not work, the data stored in the dual-interface EEPROM chip can be read through the terminal with NFC function without disassembling the instrument. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 It is a schematic diagram of the instrument structure of the present invention; Figure 2 The present invention is a flow chart of the method. DETAILED DESCRIPTION The present invention will be further described in detail below in conjunction with the accompanying drawings. like Figure 1 As shown, the present invention relates to an instrument with a near-field wireless communication interface and independent data storage, including a main control system, a dual-interface EEPROM chip, and a wireless antenna; the main control system is connected to the dual-interface EEPROM chip, and the dual-interface EEPROM chip is connected to the wireless antenna. Among them, the specific circuit diagrams of the main control system, dual-interface EEPROM chip, and wireless antenna are omitted; users can choose specific usage scenarios. The dual-interface EEPROM chip has two communication interfaces; the first interface is a serial communication interface, which is connected to the main control system; the second interface is a wireless communication interface, which is connected to the wireless antenna; the terminal with NFC function can power the dual-interface EEPROM chip and communicate with it through the wireless antenna and the second interface, and read and write its internal data; therefore, when the main control system is damaged and does not work, the data stored in the dual-interface EEPROM chip can be read without disassembling the instrument. The terminal with NFC function can supply power to the dual-interface EEPROM chip through the wireless antenna and the second interface to make it work. The dual-interface EEPROM chip is an independent data storage chip, and the stored data will not be lost after power failure. The dual-interface EEPROM chip has a label mode and a channel mode, and can be switched between the label mode and the channel mode by changing the chip configuration word. The tag mode can be regarded as a built-in EEPROM, and data can be read and written through the first interface or the second interface; in order to prevent external tampering of storage records, it is designed that the first interface can read and write data, and the second interface can only read data. The channel mode can be regarded as a built-in FIFO buffer, which provides a data transmission channel for communication between the first interface and the second interface; with the help of this channel, the terminal with NFC function can perform real-time interactive data transmission with the main control system, that is, near field communication. The NFC-enabled terminal may be a smartphone. Preferably, the instrument is provided with a shell, and a partition is provided in the shell, the partition divides the shell into a first chamber and a second chamber, the main control system is provided in the first chamber, and the dual-interface EEPROM chip and the wireless antenna are provided in the second chamber. Through the effect of the partition, the shell strength can be increased, and the dual-interface EEPROM chip is protected from collateral damage caused by damage to the main control system, such as short circuit, excessive temperature rise, etc. The main control system and the dual-interface EEPROM chip are connected via a wire passing through the partition, and a voltage regulator diode is connected in parallel at the power supply end of the dual-interface EEPROM chip, and the voltage regulator diode protects the dual-interface EEPROM chip from overvoltage damage; the shell can be metal or plastic, and the metal shell is provided with a plastic or glass window at the antenna position; Figure omitted. like Figure 2 As shown, a data storage method comprises the following steps: Step 1: The main control system determines that the operation time of the storage record has expired; Step 2: The main control system reads the current date and time and calculates the storage address index; Step 3: The main control system writes a record to the storage address index of the dual-interface EEPROM chip and ensures that the writing is correct. The above method can be used to extend the number of write operations. The meter periodically writes a storage record (including current time, settlement value, status and other information) into the dual-interface EEPROM chip at an interval of Tm minutes. Since the dual-interface EEPROM chip has a maximum write operation number Wemax limit (generally, Wemax is equal to 1 million times), in order to extend the write operation times, a block cyclic write method is used to manage and store data. The dual-interface EEPROM chip has a storage capacity of Ce bytes; a storage record is Ns bytes; the chip storage capacity is divided into blocks as follows: The maximum number of storage records Nsmax = Ce / Ns; the maximum number of storage times Wsmax = Wemax×Nsmax; the number of storage times Ws = instrument life time / Tm, and it is necessary to ensure that Ws is less than Wsmax and leave enough margin. The storage address index is calculated cyclically based on time. Compared with calculation based on address pointer, it does not need to update the address pointer every time, which prolongs the number of write operations. Suppose the time is 20yy year mm month dd day hh hour nn minute, and the calculated value is the yday day of this year (starting from January 1), then if The following calculation method is recommended: if The following calculation method is recommended: if The following calculation method is recommended: if The following calculation method is recommended: if The following calculation method is recommended: Among them, % represents the modulo operation, that is, the remainder operation. The above are only preferred implementations of the present invention. It should be pointed out that a number of modifications and improved technical solutions made by those skilled in the art without departing from the technical solution should also be deemed to fall within the scope of protection required by the claims.
Claims
1. A meter with a near field wireless communication interface and independent data storage, characterized in that: It includes a main control system, a dual-interface EEPROM chip and a wireless antenna; the main control system is connected to the dual-interface EEPROM chip, and the dual-interface EEPROM chip is connected to the wireless antenna; The dual-interface EEPROM chip has two communication interfaces, including a first interface and a second interface. The main control system connects to the dual-interface EEPROM chip through the first interface to read and write its internal data. The terminal with NFC function can communicate with the dual-interface EEPROM chip through the wireless antenna and the second interface to read its internal data.
2. The instrument with a near field wireless communication interface and independent data storage according to claim 1, characterized in that: The first interface is a serial communication interface connected to the main control system; the second interface is a wireless communication interface connected to the wireless antenna.
3. The instrument with a near field wireless communication interface and independent data storage according to claim 1, characterized in that: The terminal with NFC function can supply power to the dual-interface EEPROM chip through the wireless antenna and the second interface to make it work.
4. The instrument with a near field wireless communication interface and independent data storage according to claim 1, characterized in that: The dual-interface EEPROM chip has a label mode and a channel mode. By changing the chip configuration word of the dual-interface EEPROM chip, the label mode and the channel mode can be switched.
5. The meter with a near field wireless communication interface and independent data storage according to claim 4, characterized in that: When in tag mode, the dual-interface EEPROM chip can be regarded as a built-in EEPROM, data can be read and written through the first interface, and data can be read through the second interface; When in channel mode, the dual-interface EEPROM chip can be regarded as a built-in FIFO buffer, providing a data transmission channel for communication between the first interface and the second interface; with the help of this data transmission channel, the terminal with NFC function can perform real-time interactive data transmission with the main control system, that is, near-field communication.
6. A storage method for an instrument with a near field wireless communication interface and independent data storage, used for the instrument according to any one of claims 1 to 5, characterized in that: The method comprises the following steps: Step 1: The main control system determines that the operation time of the storage record has expired; Step 2: The main control system reads the current date and time and calculates the storage address index; Step 3: The main control system writes a record to the storage address index of the dual-interface EEPROM chip and ensures that the writing is correct.
7. A storage method for an instrument with a near field wireless communication interface and independent data storage according to claim 6, characterized in that: The method for the main control system to determine whether the operation time of the storage record has arrived in the step 1 includes reading whether the current time is a multiple of Tm or a timing time with a cycle of the Tm timer or a timing time with a cycle of the Tm alarm clock. If so, the main control system determines that the operation time of the storage record has arrived; if not, the main control system determines that the operation time of the storage record has not arrived.
8. The storage method of the instrument with near field wireless communication interface and independent data storage according to claim 7, characterized in that: In the step 1, the meter periodically writes a storage record into the dual-interface EEPROM chip at an interval of Tm minutes. The storage record includes the current time, settlement value, and status information. Since the dual-interface EEPROM chip has a maximum number of write operations Wemax (generally, Wemax is equal to 1 million times), in order to extend the write operation times, a block cycle writing method is used to manage and store data; The storage capacity of the dual-interface EEPROM chip is Ce bytes; A storage record is Ns bytes; the maximum number of storage records Nsmax = Ce / Ns; the maximum number of storage times Wsmax = Wemax × Nsmax; Number of storage times Ws = instrument life time / Tm, Ws<Wsmax.
9. A storage method for an instrument with a near field wireless communication interface and independent data storage according to claim 8, characterized in that: In step 2, the main control system reads the current date and time, and calculates the storage address index including: The storage address index is calculated cyclically according to time; Suppose the time is 20yy year mm month dd day hh hour nn minute, and the calculated value is the yday day of this year (starting from January 1), then if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: if The calculation method is as follows: Among them, % represents the modulo operation, that is, the remainder operation.
Citation Information
Patent Citations
Dual-interface independent backup data storage module and electronic instrument analysis processing method
CN114064354A