CN107102813B - Sensor data acquisition method for classified storage - Google Patents

Sensor data acquisition method for classified storage Download PDF

Info

Publication number
CN107102813B
CN107102813B CN201610093526.8A CN201610093526A CN107102813B CN 107102813 B CN107102813 B CN 107102813B CN 201610093526 A CN201610093526 A CN 201610093526A CN 107102813 B CN107102813 B CN 107102813B
Authority
CN
China
Prior art keywords
unit
data
sensor
fifo
ram
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.)
Active
Application number
CN201610093526.8A
Other languages
Chinese (zh)
Other versions
CN107102813A (en
Inventor
李华耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Ingenic Technology Co ltd
Original Assignee
Hefei Ingenic Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hefei Ingenic Technology Co ltd filed Critical Hefei Ingenic Technology Co ltd
Priority to CN201610093526.8A priority Critical patent/CN107102813B/en
Publication of CN107102813A publication Critical patent/CN107102813A/en
Application granted granted Critical
Publication of CN107102813B publication Critical patent/CN107102813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3275Power saving in memory, e.g. RAM, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0625Power saving in storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Power Sources (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a sensor data acquisition method with hierarchical storage, which comprises the following steps: performing functional configuration on the sensor according to preset parameters; acquiring external measurement data by using a sensor, and storing the data into an FIFO (first in first out) unit in the sensor; checking whether the FIFO unit is full, if so, carrying the data in the FIFO unit to a RAM storage unit in the sensor by the MCU; if not, returning to the step 2; checking whether a RAM storage unit in the sensor is full; if the RAM memory unit is full, the CPU moves the data in the RAM memory unit to the DDR memory unit through the CPU unit. The invention adopts a mode of storing data in a grading way, so that the MCU only transports the data to the RAM when the FIFO unit is full, and after the RAM is full, the CPU transports the data to the DDR, thereby reducing the scheduling times of the CPU and achieving the purpose of reducing the power consumption.

Description

Sensor data acquisition method for classified storage
Technical Field
The invention relates to a method for acquiring data by using a sensor, in particular to a method for acquiring data by hierarchically storing the sensor.
Background
The Sensor is a detecting device which can sense the measured information and convert the sensed information into electric signals or other required forms of information output according to a certain rule so as to meet the requirements of information transmission, processing, storage, display, record, control and the like. The method is the first link for realizing automatic detection and automatic control. For example, G-sensor: and a Gravity-sensor (G-sensor) which can sense the change of the acceleration force, convert the change into an electric signal and then send the electric signal to a microprocessor for calculation and analysis.
The importance of data collection is quite significant today in the widespread use of computers. It is a bridge connecting a computer with the outside physical world. The sensor has various structures, and the sensor in the invention is particularly integrated with an FIFO (first in first out) or a data acquisition module with an MCU (microprogrammed control unit). The smart device in the present invention refers to a device that carries an SOC and runs an operating system. In the prior art, after the sensor collects Data, the G-sensor equipped intelligent device, such as an Android platform equipped intelligent device, directly sends the Data to a DDR (Double Data Rate Double Data synchronous dynamic random access memory) for user query. As shown in fig. 1, in an actual situation, a user does not always inquire the information, for example, when a person runs, the user uses the sensor to collect the number of steps, and generally, the user can inquire how many steps he runs after the running is finished, so that it is not necessary to refresh the data collected by the sensor into the DDR in real time, which increases power consumption and causes waste of electric energy.
The invention aims to solve the defects mentioned above, and the data is stored in a grading way, and when the user inquires or collects the data to reach the storage space of the grade, the data is pushed step by step, so that the CPU scheduling times are reduced, the purpose of reducing the power consumption is achieved, and the user experience is not reduced.
Disclosure of Invention
One of the objectives of the present invention is to provide a sensor data acquisition method with hierarchical storage to overcome the above-mentioned drawbacks, the method comprising the following steps:
step 1, configuring the functions of the sensor according to preset parameters, wherein the sensor comprises an FIFO unit and an MCU processor unit, and the MCU processor unit comprises an RAM storage unit;
step 2, collecting external measurement data by using the sensor, and storing the measurement data into the FIFO unit;
step 3, checking whether the FIFO unit is full; if yes, the MCU processor unit carries the data in the FIFO unit to the RAM storage unit; if not, returning to the step 2;
step 4, checking whether the RAM storage unit is full; if yes, the CPU processor unit communicates with the MCU processor unit, and data in the RAM storage unit is transported to the DDR memory unit through the CPU processor unit; if not, returning to the step 3;
and 5, the data in the DDR storage unit is provided for a user to inquire in real time.
Preferably, the hierarchically stored sensor data acquisition runs in an Android system or a windows system.
Preferably, the checking whether said FIFO element is full is performed by polling the amount of data stored in said FIFO element according to a predetermined time cycle.
Preferably, the checking whether the FIFO cells are full is performed by means of an interrupt signal, and a data full overflow signal is set as the interrupt signal.
Preferably, the checking whether the RAM storage unit is full is performed by using a timing method to query the data amount stored in the RAM storage unit according to a predetermined time cycle.
Preferably, the checking whether the RAM memory cell is full is performed by using an interrupt signal, and a data full overflow signal is set as the interrupt signal.
Preferably, the MCU processor unit and the CPU processor unit transmit data by using I2C or SPI protocol.
Preferably, the configuring the function of the sensor according to the predetermined parameter includes: configuring the size of the FIFO element and configuring the size of the RAM storage element.
Preferably, the capacity of the DDR memory unit is greater than that of the RAM memory unit, and the storage capacity of the RAM memory unit is greater than that of the FIFO unit.
Preferably, the sensor is one of an infrared sensor, a pressure sensor, a position sensor and a gravity sensor.
The sensor data acquisition method of the hierarchical storage adopts the multilevel storage, and does not directly store the acquired data to the DDR storage unit in real time, so that the read-write frequency of the DDR storage unit is reduced, the power consumption of a system is saved, and the endurance time of equipment is prolonged.
Drawings
FIG. 1 is a block diagram of the technical solution of the present invention.
Fig. 2 is a flow chart of a specific implementation of the method of the present invention.
Detailed Description
In order to make those skilled in the art understand the present invention, the following description specifically describes the preferred embodiments of the present invention, and the accompanying drawings illustrate the components and technical effects of the present invention.
The Android system is a system used by a typical intelligent sensor, and the sensor is generally collocated in an intelligent device, and in order to describe the invention in detail, the intelligent device carrying the intelligent sensor is taken as an example, and a structural diagram for realizing the technical scheme is given.
As shown in fig. 1, the sensor data collecting system of the present invention with hierarchical storage is a preferred embodiment of the present invention, wherein the sensor unit is one of an infrared sensor, a pressure sensor, a position sensor, a gravity sensor, etc., and may be other types of sensors. The sensor unit includes a measuring unit (not shown in the figure), a FIFO (first in first out memory unit), hereinafter referred to as FIFO unit, and a microcontroller MCU; the measuring unit is connected with the FIFO unit, and the data collected by the measuring unit is firstly stored in the FIFO unit. And the size of the FIFO cells may be set before the measurement starts.
In a preferred embodiment of the present invention, the MCU unit includes an internal memory RAM, and the FIFO unit is connected to the internal memory RAM. The data collected by the sensor unit is not directly sent to the RAM of the internal memory, but is sent to the FIFO unit first, and when the data stored in the FIFO unit is judged to be full or reach a certain threshold value, the data stored in the FIFO unit is transferred to the RAM of the internal memory in the MCU through the MCU control right. Preferably, the storage unit storage capacity of the FIFO is smaller than the capacity of the internal memory RAM.
In a preferred embodiment of the present invention, the hierarchical storage sensor data acquisition system further includes a CPU processor connected to the sensor unit, the CPU is further connected to a DDR memory unit, and the processor unit may be a single-core or dual-core processor; and in the data acquisition process, the data amount stored in the RAM of the internal memory is judged by the CPU, and when the data stored in the RAM is full and is about to overflow, the data in the RAM is transported to the DDR for a user to inquire and use. If the data stored in the RAM is not full, the state of the RAM is continuously detected without carrying the data.
Referring to FIG. 2, a flow chart of the present invention, in a preferred embodiment, first configures the function settings of the sensor. The measured data is not directly transmitted to the RAM, but is firstly transmitted to the FIFO unit, and the storage state of the FIFO unit is continuously detected by setting the storage threshold parameter of the FIFO unit, so as to judge whether the FIFO unit is full. The whole system is scheduled by a CPU (Central processing Unit), the CPU is communicated with an MCU (microprogrammed control Unit) in the Sensor through I2C or SPI (Serial peripheral interface), and data collected by the Sensor are carried to the DDR (double data rate); it should be noted that the main feature of the present invention is not the flow of data transmission, but the timing of data transportation, and the purpose of reducing power consumption by using the method. In the prior art, when the Sensor acquires data, the data is immediately carried into the RAM storage unit and then carried into the DDR unit by the CPU, the process is real-time, and the carrying process can be carried out as long as the Sensor acquires the data; the data are put into the FIFO unit when the Sensor collects the data, but the data are not immediately transported into the RAM but temporarily stored in the FIFO unit at the moment, the data in the FIFO unit are completely transported into the RAM until the FIFO unit is full and overflows, and then whether the data in the RAM are full or not is judged, wherein the processes are finished by the MCU in the Sensor; when the RAM data is judged to be full and about to overflow, the data in the RAM are completely transported to the DDR for a user to inquire in real time; the transporting operation is completed by the CPU, so the CPU is scheduled only once at this time, and the CPU is frequently scheduled in the traditional method.
Through the process, the invention adopts a mode of storing data in a grading way, the MCU only carries the data to the RAM when the FIFO unit is full by configuring the Sensor, and after the RAM is full, the CPU is informed through I2C or SPI to carry the data to the DDR by the CPU. The number of times of dispatching of the CPU is reduced, and the purpose of reducing power consumption is achieved.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.

Claims (1)

1. A sensor data acquisition method with hierarchical storage is characterized by comprising the following steps:
step 1, configuring the functions of the sensor according to preset parameters, wherein the sensor comprises an FIFO unit and an MCU processor unit, and the MCU processor unit comprises an RAM storage unit;
step 2, collecting external measurement data by using the sensor, and storing the measurement data into the FIFO unit;
step 3, checking whether the FIFO unit is full; if yes, the MCU processor unit carries the data in the FIFO unit to the RAM storage unit; if not, returning to the step 2;
step 4, checking whether the RAM storage unit is full; if yes, the CPU processor unit communicates with the MCU processor unit, and data in the RAM storage unit is transported to the DDR memory unit through the CPU processor unit; if not, returning to the step 3;
step 5, the data in the DDR memory unit is used for a user to inquire in real time;
the sensor data collection stored in a grading way is operated in an Android system or a windows system;
checking whether the FIFO unit is full or not by adopting a timing method, and circularly inquiring the data amount stored in the FIFO unit according to a preset time;
checking whether the RAM storage unit is full or not by adopting a timing method, and circularly inquiring the data amount stored in the RAM storage unit according to preset time;
data are transmitted between the MCU processor unit and the CPU processor unit by adopting an I2C or SPI protocol;
configuring the functions of the sensors according to predetermined parameters includes: configuring the size of the FIFO unit and configuring the size of the RAM storage unit;
the capacity of the DDR memory unit is larger than that of the RAM memory unit, and the storage capacity of the RAM memory unit is larger than that of the FIFO unit;
the sensor is one of an infrared sensor, a pressure sensor, a position sensor and a gravity sensor.
CN201610093526.8A 2016-02-19 2016-02-19 Sensor data acquisition method for classified storage Active CN107102813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610093526.8A CN107102813B (en) 2016-02-19 2016-02-19 Sensor data acquisition method for classified storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610093526.8A CN107102813B (en) 2016-02-19 2016-02-19 Sensor data acquisition method for classified storage

Publications (2)

Publication Number Publication Date
CN107102813A CN107102813A (en) 2017-08-29
CN107102813B true CN107102813B (en) 2020-08-18

Family

ID=59658320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610093526.8A Active CN107102813B (en) 2016-02-19 2016-02-19 Sensor data acquisition method for classified storage

Country Status (1)

Country Link
CN (1) CN107102813B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103489301A (en) * 2013-09-25 2014-01-01 东风汽车公司 Vehicle running information acquisition system and method using dual-processor architecture
CN103927265A (en) * 2013-01-04 2014-07-16 深圳市龙视传媒有限公司 Content hierarchical storage device, content acquisition method and content acquisition device
CN104133798A (en) * 2014-08-01 2014-11-05 西安电子科技大学 Big data high-speed storage system and implementation method
CN104461971A (en) * 2014-11-26 2015-03-25 深圳市开立科技有限公司 Data collecting control system and method
CN104965799A (en) * 2015-07-13 2015-10-07 福州瑞芯微电子有限公司 Data caching device and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927265A (en) * 2013-01-04 2014-07-16 深圳市龙视传媒有限公司 Content hierarchical storage device, content acquisition method and content acquisition device
CN103489301A (en) * 2013-09-25 2014-01-01 东风汽车公司 Vehicle running information acquisition system and method using dual-processor architecture
CN104133798A (en) * 2014-08-01 2014-11-05 西安电子科技大学 Big data high-speed storage system and implementation method
CN104461971A (en) * 2014-11-26 2015-03-25 深圳市开立科技有限公司 Data collecting control system and method
CN104965799A (en) * 2015-07-13 2015-10-07 福州瑞芯微电子有限公司 Data caching device and method

Also Published As

Publication number Publication date
CN107102813A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN103914992B (en) A kind of intelligent parking detecting system based on wireless sensor network
CN103581443A (en) Intelligent terminal automatic awakening method and system based on sensors
CN107065706B (en) A kind of distributed telemetry station working-condition monitoring system
CN104503565A (en) Power consumption management method and device for mobile device and mobile device
WO2013142977A1 (en) Method for transmitting an indication of a path followed by a bicycle
US11614790B2 (en) Electronic pen, method and device for controlling electronic pen, and computer-readable storage medium
CN107680399A (en) Wireless method for detecting parking stalls and parking space detector
CN103257624A (en) Multichannel high-speed data acquisition system of internet of things
CN104698824A (en) Intelligent wearable device capable of calculating steps with low power consumption
CN107102813B (en) Sensor data acquisition method for classified storage
CN104678919A (en) Intelligent monitoring system of packing box
CN203014862U (en) Vehicle managing system
CN202582594U (en) Sensor system based on RFID technology
CN108510721A (en) Trigger sensor data are from the method for wireless device transmissions, network node and system
CN109358547B (en) Data acquisition method of implanted control system
CN112634489B (en) Vehicle state determination method, device and system based on mobile terminal
CN202661610U (en) Remote controller and battery capacity detection device thereof
CN202720477U (en) ARM-Linux based fiber temperature measuring controller and temperature measuring apparatus
CN202004482U (en) Lithium battery management system for electric vehicle based on MuC/OS-II operating system
CN203414978U (en) Active wireless temperature and humidity label
CN212776858U (en) Oil pipeline safety real-time on-line monitoring system
CN210466103U (en) Load and positioning information comprehensive monitoring system for vehicle
CN216748509U (en) Integrated vibration detection equipment and system
CN213067822U (en) NB-IoT-based solution liquid level detection device and system
CN216978195U (en) Wisdom building sensor

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
GR01 Patent grant
GR01 Patent grant