Data processing method, computer system and readable medium
By recording the storage address before power failure in the acquisition terminal and determining the storage address range after power is restored, the problem of data disorder after power failure is solved, ensuring the integrity and accuracy of data storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ESWIN COMPUTING TECH CO LTD
- Filing Date
- 2022-12-02
- Publication Date
- 2026-07-14
AI Technical Summary
When the data acquisition terminal is powered on again after a power outage, data corruption can easily occur, leading to the loss of backup data.
By recording the storage address before the power outage in the second memory and determining the storage address range based on the first date information after power is restored, it is ensured that the data is stored in the correct storage area, avoiding overwriting other data.
It solves the problem of data corruption caused by power outages and subsequent power restoration, ensuring the integrity and accuracy of data storage and preventing data loss.
Smart Images

Figure CN115793975B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, a computer system, and a readable medium. Background Technology
[0002] The data acquisition terminal transmits the collected data to one or more remote monitoring centers. The remote monitoring centers then perform unified scheduling and management of the data, such as monitoring the operating parameters of wind and solar power systems distributed in the field, and monitoring the operating status of buried pipelines in the field.
[0003] To prevent data loss, data acquisition terminals typically back up their data. However, when the acquisition terminal is powered off and then powered on again, data corruption can easily occur, leading to the loss of the backed-up data. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a data processing method, a computer system, and a readable medium. The technical solution of this disclosure is as follows:
[0005] According to a first aspect of the present disclosure, a data processing method is provided, comprising:
[0006] In response to power-on on the same day, the first data is collected, and the first date information of the first data collection is obtained;
[0007] Determine the storage address range of the first storage area corresponding to the first date information, wherein the first storage area is one of multiple storage areas contained in the first memory, and each storage area corresponds to a date information;
[0008] Read the storage address before the power failure from the second memory, where the storage address before the power failure is the storage address of the last data stored in the first memory before the power failure;
[0009] Based on the storage address before the power outage and the storage address range, determine the first storage address for storing the first data;
[0010] The first data is stored in the first storage area according to the first storage address.
[0011] Optionally, determining the first storage address for storing the first data based on the storage address before the power outage and the storage address range includes:
[0012] In response to the fact that the storage address before the power failure is within the storage address range, the storage address before the power failure is determined as the first storage address;
[0013] In response to the fact that the storage address before the power outage was not within the storage address range, the starting address within the storage address range is determined as the first storage address, and the starting address is the first address of the first storage area.
[0014] Optionally, it also includes:
[0015] Obtain the current storage area corresponding to the current date information, wherein the current storage area is one of the multiple storage areas contained in the first memory;
[0016] Obtain the storage address of the data stored in the current storage area at each moment;
[0017] The storage address of the data stored in the current storage area at each time moment is used to replace the storage address of the previous time moment stored in the second memory, where the storage address of the previous time moment is the storage address of the data stored in the current storage area at the previous time moment.
[0018] Optionally, it also includes:
[0019] In response to the first power-on on the same day, second data is collected, and the second date information for collecting the second data is obtained;
[0020] Determine the second storage area corresponding to the second date information;
[0021] The starting address of the second storage area is determined as the second storage address for storing the second data;
[0022] The second data is stored in the second storage area according to the second storage address.
[0023] Optionally, it also includes:
[0024] The first data is processed across clock domains to obtain the first data after cross-clock domain processing, and the first data after cross-clock domain processing is used to send to the remote monitoring center.
[0025] The step of storing the first data into the first storage area according to the first storage address further includes:
[0026] The first data processed across clock domains is cached to obtain the first data that satisfies the storage conditions of the first memory;
[0027] According to the first storage address, the first data that meets the storage conditions of the first memory is stored in the first storage area.
[0028] Optionally, it also includes:
[0029] In response to a control command sent by a remote monitoring center, determine the target date information contained in the control command;
[0030] Obtain the target storage area corresponding to the target date information, and read the target data from the target storage area;
[0031] The read target data is sent to the remote monitoring center.
[0032] Optionally, it also includes:
[0033] The data volume of each of the plurality of storage areas is obtained, and the data volume of one of the storage areas is used to determine the amount of data to be read when reading the data in that storage area;
[0034] The data volume of each of the multiple storage areas is stored in the second memory;
[0035] The step of reading target data from the target storage area includes:
[0036] Obtain the target data amount of the target storage area from the second memory;
[0037] Read the target data of the target data volume from the target storage area.
[0038] Optionally, sending the read target data to the remote monitoring center includes:
[0039] The target data read is sent to the remote monitoring center via Ethernet or wireless network.
[0040] Optionally, the collection of the first data includes:
[0041] Collect analog data;
[0042] The analog data is conditioned, and the conditioning includes at least one or more of the following: filtering, amplification, and isolation;
[0043] The conditioned analog data is converted into digital data to obtain the first data.
[0044] According to a second aspect of the present disclosure, a computer system is provided, comprising:
[0045] processor;
[0046] A memory, coupled to a processor, stores computer-executable instructions therein for performing the data processing methods as described in the first aspect when executed by the processor.
[0047] According to a third aspect of the present disclosure, a computer-readable medium is provided, wherein when the program is executed by a processor, it implements the data processing method as described in the first aspect.
[0048] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0049] In this disclosure, the second memory stores the address of the last data stored in the first memory before a power outage. Upon power restoration on the same day, the storage address range of the first storage area corresponding to the first date information of the collected first data can be determined. The storage address before the power outage can be read, and based on the storage address before the power outage and the storage address range, the first storage address for storing the first data can be determined. Then, the first data is stored in the first storage area according to the first storage address. In this way, determining the first storage address avoids erroneously storing the collected first data in other storage addresses, preventing data loss due to overwriting of data originally stored in other storage addresses, and solving the problem of data corruption caused by power outages and subsequent power restoration.
[0050] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0052] Figure 1 This is a flowchart illustrating a data processing method according to an exemplary embodiment;
[0053] Figure 2 This is a schematic diagram illustrating the partitioning of a first memory according to an exemplary embodiment;
[0054] Figure 3 This is a structural diagram of an electronic device performing a data processing method according to an exemplary embodiment;
[0055] Figure 4 This is a flowchart illustrating the storage of data according to an exemplary embodiment;
[0056] Figure 5 This is a schematic diagram of a power supply system according to an exemplary embodiment;
[0057] Figure 6 This is a schematic diagram illustrating a data processing flow according to an exemplary embodiment. Detailed Implementation
[0058] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0059] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0060] FPGA (Field Programmable Gate Array) allows for optimized design of products across multiple fields using specific chip models. FPGA itself constitutes a typical integrated circuit in semi-custom circuitry, containing digital management modules, embedded cells, output cells, and input cells, and has advantages such as abundant wiring resources, reprogrammability, and high integration.
[0061] Real-time clocks (RTCs) provide a precise time reference for electronic systems, and most use high-precision crystal oscillators as the clock source.
[0062] EEPROM (Electrically Erasable Programmable Read-Only Memory) is a type of memory chip that retains data even when power is off, and it is easy to read and write.
[0063] Micro SD cards (Micro Secure Digital Cards) have excellent characteristics such as small size, fast data transfer speed, hot-swappability, and large capacity.
[0064] RTC (Real-Time Clock) provides accurate real-time time, or provides an accurate time base.
[0065] FIFO (First Input First Output) can be used to increase data transfer rates, process large data streams, and match data with different transfer rates, thereby improving system performance. A FIFO buffer is a two-port buffer that operates on a first-in, first-out basis; the first data to enter is the first to be removed. One port is the buffer's input port, and the other is its output port.
[0066] RAM (Random Access Memory) can be read and written at any time (except during refresh), and it is very fast.
[0067] PHY (Physical) is a chip that provides an external signal interface and can send and receive Ethernet data frames.
[0068] Figure 1 This is a flowchart illustrating a data processing method according to an exemplary embodiment, such as... Figure 1 As shown, the data processing method includes steps S11 to S15.
[0069] For ease of description, the data processing method provided in the embodiments of this disclosure will be described as being executed by a data acquisition terminal. It is understood that the data processing method provided in the embodiments of this disclosure can also be executed by electronic devices such as computers, tablets, and wearable devices.
[0070] In step S11, in response to power-on on the same day, first data is collected, and the first date information of the first data collection is obtained.
[0071] "Re-powering on the same day" refers to the data acquisition terminal being powered on for the first time that day, not the first time. After powering on, the terminal can automatically determine whether it is the first power-on of the day. Upon powering on, the terminal will collect initial data, which can be any data type. The terminal can obtain the date information of the initial data collection. This date information can be obtained through the RTC (Real-Time Communication).
[0072] In step S12, the storage address range of the first storage area corresponding to the first date information is determined. The first storage area is one of multiple storage areas contained in the first memory, and each storage area corresponds to a date information.
[0073] After the acquisition terminal is powered on, the first memory is automatically divided into multiple storage areas, each corresponding to a date. One storage area corresponding to one date means that the data stored in that storage area is the data acquired within that date. Therefore, based on the first date information, the first storage area corresponding to that date can be determined; the first storage area is used to store the first data.
[0074] Optionally, the first storage device can be a Micro SD card. For example... Figure 2 As shown, a Micro SD card can include N storage areas, where N can be set according to requirements. The first memory is divided into N equal storage areas, each storing one day's data. After N days, the storage areas are rolled up, starting from the first day and overwriting sequentially. Each storage area contains v sectors, with each sector having a storage depth of 512 bytes. The first memory contains a total of V sectors, with the sector root address being addr0. Therefore, the number of sectors v in each storage area is: v = (V - addr0) ÷ N. The starting storage address of the data collected on day n in the Micro SD card is addr0. n For: addr n = v × (n-1) + addr0. The memory address is incremented by 1 for each sector filled, but the memory address cannot exceed the starting address addr of the data collection on day (n+1). (n+1) : addr(n+1)=v×n+addr0.
[0075] After determining the first storage area based on the first date, the storage address range of the first storage area can be calculated [addr] n ,addr (n+1) ).
[0076] Once each storage area of the first memory has stored the corresponding date information, the storage areas are rolled up, sequentially overwriting the earliest storage area with the corresponding date information in each of the current storage areas of the first memory. For example, if the first memory is divided into 30 storage areas, and the date information corresponding to the first storage area is September 1st, and the other storage areas correspond to September 2nd, September 3rd, ..., September 30th respectively, then by September 30th, each storage area will correspond to a date information. Therefore, on October 1st, the collected data will be stored in the storage area originally corresponding to September 1st. Alternatively, the data originally stored on September 1st can be deleted first, and then the data collected on October 1st can be stored in that storage area.
[0077] In step S13, the storage address before the power failure is read from the second memory. The storage address before the power failure is the storage address of the last data stored in the first memory before the power failure.
[0078] While storing data in the first memory, the current data address in the first memory is also stored in the second memory at a specified location, indexed by time. Each time a data is written, the storage address overwrites the previous storage address, thus updating the storage address. If the terminal loses power, the second memory stores the storage address before the power outage, which is the address of the last data stored in the first memory before the power outage.
[0079] Optionally, the current storage area corresponding to the current date information can be obtained, where the current date information can be any date information, and the current storage area is one of multiple storage areas contained in the first memory. The storage address of the data stored in the current storage area at each moment is obtained, that is, the storage address of the most recently stored data in the current storage area is obtained. The storage address of the most recently stored data in the current storage area is stored in a storage address in the second memory corresponding to the current date. The storage address of the data stored in the current storage area at each moment is used to replace the storage address corresponding to the previous moment stored in the second memory; the storage address corresponding to the previous moment is the storage address of the data stored in the current storage area at the previous moment.
[0080] Because the storage address of the latest data stored in the current storage area is stored in a storage address in the second memory, the storage address stored at each moment will overwrite the storage address stored at the previous moment, since the second memory stores the storage address of the latest data in the current storage area.
[0081] Therefore, after the acquisition terminal is powered off and then powered on again, the storage address obtained from the second memory before the power failure is the storage address where the last data in the first memory was stored before the power failure.
[0082] In step S14, the first storage address for storing the first data is determined based on the storage address before the power outage and the storage address range.
[0083] If the data acquisition terminal is not powered on for the first time that day, some data may have already been stored in the first storage area before the power outage. If the data collected after the power outage is directly stored in the first storage area, it may overwrite the data stored in the first storage area before the power outage, resulting in data overwriting. Therefore, it is necessary to determine the first storage address for storing the first data collected after the power outage based on the storage address before the power outage and the storage address range of the first storage area.
[0084] In step S15, the first data is stored in the first storage area according to the first storage address.
[0085] After determining the first storage address, the collected first data can be stored sequentially into the first storage area, starting from the first storage address.
[0086] Using the technical solution of this disclosure embodiment, the second memory stores the storage address of the last data stored in the first memory before the power outage. After power is restored on the same day, the storage address range of the first storage area corresponding to the first date information can be determined based on the first date information of the collected first data, and the storage address before the power outage can be read. Thus, based on the storage address before the power outage and the storage address range, the first storage address for storing the first data can be determined, and then the first data can be stored in the first storage area according to the first storage address.
[0087] In this way, by determining the first storage address, we can avoid mistakenly storing the collected first data in other storage addresses, which would cause the data originally stored in other storage addresses to be overwritten and thus result in data loss. This solves the problem of data disorder caused by power failure and power restoration.
[0088] Optionally, based on the above technical solution, determining the first storage address for storing the first data according to the storage address before the power outage and the storage address range may include: in response to the storage address before the power outage being within the storage address range, determining the storage address before the power outage as the first storage address; in response to the storage address before the power outage not being within the storage address range, determining the starting address within the storage address range as the first storage address, wherein the starting address is the first address of the first storage area.
[0089] Because the first memory is non-volatile, the data stored in it will not be lost when the acquisition terminal is powered off. However, intermediate data generated during the storage process is not actually stored in the first memory. To ensure data continuation after the acquisition terminal is powered on again, the storage address before the power outage is needed. Therefore, a second memory is introduced to back up the storage address of the main memory before the power outage. Optionally, the second memory can be a non-volatile EEPROM that supports arbitrary byte read / write.
[0090] After the acquisition terminal is powered on again, it first loads the address addedrx from the second memory before the power failure. If the address addedrx is within the address range of the first memory area, then... n ,addr (n+1) If the data acquisition terminal is powered on again, the storage address of the first data acquired is addrx; if the storage address before the power failure is not within the storage address range of the first storage area, addrx will be used. [addr n ,addr (n+1) If the data acquisition terminal is powered on again, then the storage address of the first data acquired is addr. n addr nIt is the starting address within the storage address range of the first storage area, and also the first address of the first storage area.
[0091] If the storage address before the power outage is within the storage address range of the first storage area, it proves that some data has already been stored in the first storage area. Therefore, data storage only needs to continue based on the storage address before the power outage. If the storage address before the power outage is not within the storage address range of the first storage area, it proves that the data has not been stored in the first storage area. Therefore, data storage needs to start from the beginning address of the first storage area.
[0092] In this way, the storage address of the data after power-on can be accurately determined, avoiding the data collected after power-on being stored in other storage addresses that already contain data, which could lead to data loss due to other data being overwritten.
[0093] Optionally, based on the above technical solution, after the data acquisition terminal is powered on, if it is determined that the data acquisition terminal is being powered on for the first time on the day, the second data collected on that day can be directly stored in the corresponding storage area. Specifically: in response to the first power-on of the day, the second data is collected, and the second date information for collecting the second data is obtained; the second storage area corresponding to the second date information is determined; the starting address of the second storage area is determined as the second storage address for storing the second data; and the second data is stored in the second storage area according to the second storage address. The second storage area is one of the multiple storage areas included in the first memory.
[0094] After the data acquisition terminal is powered on, it will collect second data, which can be any data. The data acquisition terminal can obtain the second date information of the collected second data through RTC.
[0095] Since this is the first power-on of the day, the second storage area corresponding to the second date information has not yet started storing the data collected that day. Therefore, we only need to obtain the starting address of the second storage area and use that address as the second storage address for storing the second data. After determining the second storage address, we can then store the collected second data sequentially into the second storage area, starting from the second storage address.
[0096] Correspondingly, when storing the second data, the storage address of the data stored in the second storage area at each moment is also obtained, and the storage address of the data stored in the second storage area at each moment is stored in a storage address of the second memory. This allows for power-off recovery after a power outage and subsequent power restoration, based on the storage address of the data stored in the second storage area stored in the second memory, thus preventing data corruption.
[0097] In this way, upon the first power-on of the day, the storage area corresponding to the collected data can be automatically determined, thereby achieving daily data storage. Daily data storage facilitates the rapid retrieval of data for a specific day.
[0098] Optionally, based on the above technical solution, the collected data will be sent to the remote monitoring center and stored in the first memory as a backup. The backup data may also be read and sent to the remote monitoring center. Considering the different data acquisition and transmission rates, the different data acquisition and storage rates, and the different data reading and transmission rates, cross-clock domain processing can be performed on the data. This cross-clock domain processing can be achieved through FIFO buffering.
[0099] The first data can be processed across clock domains to obtain processed first data. This processed first data can then be sent to a remote monitoring center to resolve the issue of different data acquisition and transmission rates. Alternatively, the processed first data can be stored in a first memory to resolve the issue of different data acquisition and storage rates. Furthermore, cross-clock domain processing can be performed on data read from the first memory, which is intended for transmission to the remote monitoring center. Therefore, cross-clock domain processing of data read from the first memory can resolve the issue of different data acquisition and transmission rates.
[0100] Considering that the first memory may have certain storage limitations—for example, a Micro SD card only supports page-based read / write and can only write or read data in multiples of 512 bytes at a time—the first collected data can be cached to meet the storage limitations of the first memory before being stored in the corresponding storage area. Alternatively, the first data can be cached in RAM to meet the storage limitations of the first memory. It is understandable that the second data collected after the terminal's first power-on of the day can also be cached to meet the storage limitations of the first memory.
[0101] Optionally, the data cached to meet the storage conditions of the local memory can be data that has been processed across clock domains.
[0102] Thus, cross-clock domain processing can solve the problems of different rates between data acquisition and data transmission, different rates between data acquisition and data storage, and different rates between data reading and data transmission. Through caching, the data stored in the first memory can meet the storage conditions of the first memory, so that the data can be successfully stored in the first memory.
[0103] After collecting data, the data acquisition terminal will send the collected data to the remote monitoring center in real time. The remote monitoring center can also proactively retrieve data from a specific historical day.
[0104] In response to a control command sent by a remote monitoring center, the system determines the date information corresponding to the control command; obtains the target storage area corresponding to the date information and reads the data in the target storage area; and sends the read data in the target storage area to the remote monitoring center.
[0105] The remote monitoring center sends a control command containing target date information to the acquisition terminal. Upon receiving the control command, the acquisition terminal can parse it to obtain the target date information. Based on the target date information, the corresponding target storage area can be determined. The target storage area is one of multiple storage areas contained in the first memory. The target data is read from the target storage area and then sent to the remote monitoring center.
[0106] In this way, the remote monitoring center can conveniently and quickly read data for a specific date, solving the problem that the previous data management methods were complicated and made it difficult for the remote monitoring center to read data for a specific date.
[0107] When a data acquisition terminal actively sends the collected data to a remote monitoring center, it can send a small amount of data sequentially. Alternatively, the data acquisition terminal can send the data collected throughout the day sequentially to the remote monitoring center.
[0108] The data acquisition terminal responds to control commands by sending target data to the remote monitoring center, either in bursts or in large batches. A burst sends a large amount of data to the remote monitoring center at once. For example, the acquisition terminal could send a day's worth of data to the remote monitoring center all at once. This burst format significantly reduces data transmission time, preventing disruption to subsequent data acquisition and monitoring.
[0109] Optionally, based on the above technical solution, the second memory can not only be used to store the storage addresses of data in the first memory, but also to store the data volume of each of the multiple storage areas contained in the first memory. The data volume of a storage area is used to determine the amount of data to be read when reading data from that storage area.
[0110] When reading target data from the target storage area, the target data volume of the target storage area can be obtained from the second memory first, and then the target data volume of the target storage area can be read from the target storage area.
[0111] We know that the target data corresponding to the control command is in the target storage area, but we don't know where the data in the target storage area ends. However, by knowing the amount of target data in the target storage area, we can know how much target data should be read.
[0112] This ensures the integrity of the data sent to the remote monitoring center and avoids sending only a portion of the target data to the remote monitoring center.
[0113] Optionally, based on the above technical solution, sending the read target data to the remote monitoring center includes: sending the read target data to the remote monitoring center via Ethernet or a wireless network.
[0114] The data acquisition terminal includes a port physical layer and a serial-to-wireless module. The port physical layer enables data to be sent to the remote monitoring center via Ethernet. The serial-to-wireless module enables data to be sent to the remote monitoring center via a wireless network.
[0115] The data acquisition terminal can receive control commands sent by the remote monitoring center, which can also be achieved through the port physical layer or a serial-to-wireless module.
[0116] This ensures the stability of communication between the data acquisition terminal and the remote monitoring center, avoiding data loss and disruption of data integrity and continuity caused by network interruptions and delays.
[0117] Optionally, based on the above technical solution, when the acquisition terminal acquires the first data, it may perform the following steps: acquire analog data; condition the analog data, wherein the conditionation includes at least one or more of the following: filtering, amplification, and isolation; and convert the conditionated analog data into digital data to obtain the first data. The acquisition of other data is similar to the acquisition of the first data, and can undergo processing such as conditionation and analog-to-digital conversion.
[0118] The acquired data is analog, while the acquisition terminal can only process digital data. Therefore, an analog-to-digital converter (ADC) is needed to convert the analog data into digital data. Conditioning the analog data can reduce interference and obtain higher quality data.
[0119] Figure 3 This is a structural diagram of an electronic device performing a data processing method according to an exemplary embodiment. The electronic device includes a data acquisition section, a storage section, a communication section, and a processing section. The data acquisition section includes a signal conditioning module and an A / D conversion module. The storage section includes a first memory consisting of an RTC chip and a Micro SD card, and a second memory consisting of an EEPROM. The communication section includes a serial port / 4G conversion module and a PHY chip. The processing section is primarily based on an FPGA, which includes a secondary cache module consisting of a FIFO and RAM.
[0120] The data acquisition section collects data and performs data conditioning and analog-to-digital conversion to obtain digital data that the FPGA can process. The FPGA obtains date information from the RTC and uses this date information to frame the acquired data, resulting in data frames that include the date information. The structure of a data frame can be: start frame + system number + control command + data + date + time + end frame. The start and end frames are the header and footer of a data frame, facilitating identification of the data frame by the storage and communication sections. The system number is the acquisition terminal's number, allowing the remote monitoring center to identify a specific acquisition terminal. The control command is the instruction issued by the remote monitoring center to the acquisition terminal, such as start acquisition, stop acquisition, and data retransmission. The data is the acquired data. The date and time are read from the RTC, which not only identify the acquisition time of each data frame but also serve as an index to the specific storage address.
[0121] The framed data is buffered in a FIFO and RAM. The FIFO performs cross-clock domain processing on the data, and the RAM ensures that the data stored on the Micro SD card meets the storage requirements of the Micro SD card. The data, after cross-clock domain processing, is then sent to the remote monitoring center via the communication section. Communication between the remote monitoring center and the acquisition terminal can use either a wireless or wired network, avoiding the network latency and interruptions that can easily occur with a single network, leading to communication failures. Data that meets the storage requirements of the Micro SD card is stored in the corresponding storage area on the Micro SD card.
[0122] Figure 4This is a flowchart illustrating data storage according to an exemplary embodiment. When the acquisition terminal is powered on for the first time on the day, the acquired data is sequentially stored in the corresponding storage area for that day. If the acquisition terminal is not powered on for the first time on the day, but is powered on again after a power outage, the storage address range of the corresponding storage area for that day can be obtained, as well as the storage address of the data stored in the second memory before the power outage. The storage address before the power outage is the storage address of the last data stored in the first memory before the power outage of the acquisition terminal on that day. By determining whether the storage address before the power outage is within the storage address range, the storage address of the acquired data stored after the power outage is determined.
[0123] When a remote monitoring center wants to obtain data for a specific date, it sends a control command containing the date information to the data acquisition terminal. The acquisition terminal parses the control command to obtain the date information and determines the corresponding storage area for the date and time information. It then retrieves the amount of data from that storage area in the second memory, reads that amount of data from the storage area, and sends the data to the remote monitoring center.
[0124] Figure 5 This is a schematic diagram of a power supply system according to an exemplary embodiment. This power supply system powers the aforementioned acquisition terminal. The system uses a 12V lithium battery, which can be charged by a solar panel or charger. The 12V main power supply is divided in stages to drive each unit. Five different voltages—12V, 5V, 3.3V, 2.5V, and 1.2V—constitute the main power network. The serial / 4G conversion module, with a peak power of 10W during data transmission, directly uses 12V to ensure stable transmission. The A / D conversion module uses 5V as its power supply and 3.3V as its control voltage, enabling communication with the FPGA, which uses 3.3V as its main power supply. The FPGA chip's power supply voltages are 3.3V, 2.5V, and 1.2V. In addition, Gigabit Ethernet, RTC, EEPROM, Micro SD, and other units are all powered by 3.3V.
[0125] Figure 6This is a schematic diagram illustrating a data processing flow according to an exemplary embodiment. After the acquisition terminal is powered on, it first initializes the Micro SD card and the RTC real-time clock. Upon receiving a control command from the remote monitoring center, it executes either a data acquisition program or a Micro SD data reading program according to the control command. If no remote command is received, the default is to execute the data acquisition program, simultaneously acquiring data and reading time data from the RTC real-time clock in parallel. The acquired data and time data are arranged into data frames in a certain order, buffered in an asynchronous FIFO and passed across clock domains, and then transmitted to the remote monitoring station via wireless 4G or fiber optic cable and stored in the Micro SD card. When reading data from the Micro SD card, the data read address is indexed according to the time information contained in the control command. The data read from the Micro SD card enters the asynchronous FIFO buffer and passes across clock domains, and is also transmitted to the remote monitoring station via wireless 4G or fiber optic cable.
[0126] The technical solution of this disclosure manages data according to date information, simplifying the data storage and retrieval process; the combination of the first and second memory solves the problem of data storage address disorder after power failure and power restoration; it supports communication between wired and wireless networks, avoiding data loss due to network interruption and delay, and also avoiding the inconvenience of relevant personnel going to the collection site to reread the data from the storage system.
[0127] The various operations of the terminals and systems described above can be performed by any suitable means capable of carrying out the corresponding functions. Such means may include various hardware and / or software components and / or modules, including but not limited to hardware circuits, application-specific integrated circuits (ASICs), or processors.
[0128] The various exemplified logic blocks, modules, and circuits described herein can be implemented or performed using a general-purpose processor, digital signal processor (DSP), ASIC, field-programmable gate array (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor, but alternatively, it can be any commercially available processor, controller, microcontroller, or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, a microprocessor cooperating with a DSP core, or any other such configuration.
[0129] The steps of the methods or algorithms described in this disclosure can be directly embedded in hardware, in a software module executed by a processor, or a combination of both. The software module can reside in any form of tangible storage medium. Some examples of storage media that can be used include random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, etc. The storage medium can be coupled to the processor so that the processor can read information from and write information to the storage medium. Alternatively, the storage medium can be integral with the processor. The software module can be a single instruction or many instructions, and can be distributed across several different code segments, different programs, and across multiple storage media.
[0130] The methods disclosed herein include actions for implementing the described methods. The methods and / or actions may be interchanged without departing from the scope of the claims. In other words, unless a specific order of actions is specified, the order and / or use of specific actions may be modified without departing from the scope of the claims.
[0131] The above functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as instructions on a tangible computer-readable medium. The storage medium can be any available tangible medium that can be accessed by a computer. By way of example and not limitation, such a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital universal disc (DVD), floppy disk, and Blu-ray disc, wherein a disc typically magnetically reproduces data, while a disc optically reproduces data using lasers.
[0132] Therefore, a computer program product can perform the operations given herein. For example, such a computer program product can be a computer-readable tangible medium having instructions tangibly stored (and / or encoded) thereon, which can be executed by a processor to perform the operations described herein. The computer program product may include packaging materials.
[0133] Software or instructions can also be transmitted via a transmission medium. For example, software can be transmitted from a website, server, or other remote source using transmission media such as coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, or microwave.
[0134] Furthermore, modules and / or other suitable means for carrying out the methods and techniques described herein can be downloaded and / or obtained by user terminals and / or base stations as appropriate. For example, such a device can be coupled to a server to facilitate the transmission of means for carrying out the methods described herein. Alternatively, the various methods described herein can be provided via storage components (e.g., RAM, ROM, physical storage media such as CDs or floppy disks) so that user terminals and / or base stations can obtain the various methods when coupled to the device or when storage components are provided to the device. Furthermore, any other suitable techniques for providing the methods and techniques described herein to the device can be utilized.
[0135] Other examples and implementations are within the scope and spirit of this disclosure and the appended claims. For example, due to the nature of software, the functions described above can be implemented using software executed by a processor, hardware, firmware, hardwired, or any combination thereof. Features implementing the functions can also be physically located in various places, including being distributed so that parts of the functions are implemented at different physical locations. Moreover, as used herein, including as used in the claims, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the described examples are preferred or better than other examples.
[0136] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0137] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0138] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0139] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A data processing method, characterized in that, include: While storing data in the first memory, the storage address of the data stored in the first memory at each moment is stored in the second memory; In response to power-on on the same day, the first data is collected, and the first date information of the first data collection is obtained; Determine the storage address range of the first storage area corresponding to the first date information, wherein the first storage area is one of multiple storage areas contained in the first memory, and each storage area corresponds to a date information; Read the storage address before the power failure from the second memory, where the storage address before the power failure is the storage address of the last data stored in the first memory before the power failure; Based on the storage address before the power outage and the storage address range, determine the first storage address for storing the first data; The first data is stored in the first storage area according to the first storage address.
2. The method according to claim 1, characterized in that, Determining the first storage address for storing the first data based on the storage address before the power outage and the storage address range includes: In response to the fact that the storage address before the power failure is within the storage address range, the storage address before the power failure is determined as the first storage address; In response to the fact that the storage address before the power failure is not within the storage address range, the starting address within the storage address range is determined as the first storage address, and the starting address is the first address of the first storage area.
3. The method according to claim 1, characterized in that, Also includes: Obtain the current storage area corresponding to the current date information, wherein the current storage area is one of the multiple storage areas contained in the first memory; Obtain the storage address of the data stored in the current storage area at each moment; The storage address of the data stored in the current storage area at each time moment is used to replace the storage address of the previous time moment stored in the second memory, where the storage address of the previous time moment is the storage address of the data stored in the current storage area at the previous time moment.
4. The method according to claim 1, characterized in that, Also includes: In response to the first power-on on the same day, second data is collected, and the second date information for collecting the second data is obtained; Determine the second storage area corresponding to the second date information; The starting address of the second storage area is determined as the second storage address for storing the second data; The second data is stored in the second storage area according to the second storage address.
5. The method according to claim 1, characterized in that, Also includes: The first data is processed across clock domains to obtain the first data after cross-clock domain processing, and the first data after cross-clock domain processing is used to send to the remote monitoring center. The step of storing the first data into the first storage area according to the first storage address further includes: The first data processed across clock domains is cached to obtain the first data that satisfies the storage conditions of the first memory; According to the first storage address, the first data that meets the storage conditions of the first memory is stored in the first storage area.
6. The method according to claim 1, characterized in that, Also includes: In response to a control command sent by a remote monitoring center, determine the target date information contained in the control command; Obtain the target storage area corresponding to the target date information, and read the target data from the target storage area; The read target data is sent to the remote monitoring center.
7. The method according to claim 6, characterized in that, Also includes: The data volume of each of the plurality of storage areas is obtained, and the data volume of one of the storage areas is used to determine the amount of data to be read when reading the data in that storage area; The data volume of each of the multiple storage areas is stored in the second memory; The step of reading target data from the target storage area includes: Obtain the target data amount of the target storage area from the second memory; Read the target data of the target data volume from the target storage area.
8. The method according to claim 6, characterized in that, Sending the read target data to the remote monitoring center includes: The target data read is sent to the remote monitoring center via Ethernet or wireless network.
9. The method according to claim 1, characterized in that, The first data collection includes: Collect analog data; The analog data is conditioned, and the conditioning includes at least one or more of the following: filtering, amplification, and isolation; The conditioned analog data is converted into digital data to obtain the first data.
10. A computer system, comprising: processor; A memory coupled to a processor and storing computer-executable instructions therein for performing the data processing method as described in any one of claims 1-9 when executed by the processor.
11. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the data processing method as described in any one of claims 1-9.