CN105518617B - Data cached processing method and processing device - Google Patents
Data cached processing method and processing device Download PDFInfo
- Publication number
- CN105518617B CN105518617B CN201580000253.1A CN201580000253A CN105518617B CN 105518617 B CN105518617 B CN 105518617B CN 201580000253 A CN201580000253 A CN 201580000253A CN 105518617 B CN105518617 B CN 105518617B
- Authority
- CN
- China
- Prior art keywords
- pushup storage
- preset value
- interrupt requests
- data cached
- currently stored
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
Abstract
The present invention is suitable for information technology field, provides data cached processing method and processing device.This method comprises: obtaining currently stored amount data cached in pushup storage when receiving into when dormant instruction;If the currently stored amount is greater than the first preset value and less than the second preset value, continuous Query whether there is the corresponding interrupt requests of the pushup storage, wherein second preset value is less than the maximum storage of the pushup storage;After inquiring the corresponding interrupt requests of the pushup storage, read data cached in the pushup storage.The invention avoids cannot handle the corresponding interrupt requests of pushup storage in time during executing and entering dormant instruction, ensure that in pushup storage it is data cached can be read in time, data cached do not lost to guarantee that pushup storage is corresponding.
Description
Technical field
The invention belongs to field of communication technology more particularly to data cached processing method and processing devices.
Background technique
Wearable intelligent equipment generallys use low power mode of operation, i.e. MCU to improve cruise duration
(Microcontroller Unit, micro-control unit) is in sleep state in no task for a long time as far as possible,
Enter working condition after handled task as quickly as possible, immediately followed by enter sleep state.For example, wearable intelligence
Energy equipment generallys use FIFO (First Input First Output, first in, first out) memory buffer 3-axis acceleration value,
When FIFO memory is filled with, 3-axis acceleration sensor generates interruption, so that MCU is read three axis cached in FIFO memory and adds
Velocity amplitude.
However, the MCU in wearable intelligent equipment will not only handle the interruption of 3-axis acceleration sensor generation, also to locate
Manage serial ports interruption and keys interrupt etc..Therefore, the interruption that MCU can not only be generated in a sleep state by 3-axis acceleration sensor
It wakes up, can also be interrupted by serial ports and/or keys interrupt wakes up.MCU is passed from sleep state by the non-3-axis acceleration such as keys interrupt
After the interruption that sensor generates wakes up and handled interrupt event, it is restored to sleep state, enters sleep state if executed in MCU
Instruction during, FIFO memory is just filled with, then will lead to MCU cannot handle in time 3-axis acceleration sensor generation
Interruption, so that MCU can not read the 3-axis acceleration value in FIFO memory in time after FIFO memory is filled with, cause from
FIFO memory is filled with the 3-axis acceleration value in the period between MCU reading FIFO memory and loses.
To sum up, existing data cached processing mode may cause data cached loss.
Summary of the invention
In consideration of it, the embodiment of the invention provides a kind of data cached processing method and processing device, it is existing slow to solve
The problem of processing mode of deposit data may cause data cached loss.
In a first aspect, the embodiment of the invention provides a kind of data cached processing methods, comprising:
When receiving into dormant instruction, obtain data cached currently stored in pushup storage
Amount;
If the currently stored amount is greater than the first preset value and less than the second preset value, continuous Query is with the presence or absence of described
The corresponding interrupt requests of pushup storage, wherein second preset value is less than the maximum of the pushup storage
Amount of storage;
After inquiring the corresponding interrupt requests of the pushup storage, read in the pushup storage
It is data cached.
Second aspect, the embodiment of the invention provides a kind of data cached processing units, comprising:
Currently stored amount acquiring unit, for when receiving into when dormant instruction, acquisition first in, first out to be stored
Data cached currently stored amount in device;
Interrupt requests query unit, if being greater than the first preset value for the currently stored amount and less than the second preset value,
Then continuous Query whether there is the corresponding interrupt requests of the pushup storage, wherein second preset value is less than institute
State the maximum storage of pushup storage;
Reading unit reads described first to enter for after inquiring the corresponding interrupt requests of the pushup storage
First go out data cached in memory.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention pass through when receive into
When entering dormant instruction, judge whether currently stored amount data cached in pushup storage reaches critical value, if
Data cached currently stored amount has reached critical value in pushup storage, then persistently waits pushup storage corresponding
Interrupt requests, and read in pushup storage immediately after inquiring the corresponding interrupt requests of pushup storage
It is data cached, it thus avoids that pushup storage pair cannot be handled in time during executing and entering dormant instruction
The interrupt requests answered, ensure that in pushup storage it is data cached can be read in time, to guarantee first in, first out
Memory is corresponding data cached not to be lost.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of data cached processing method provided in an embodiment of the present invention;
Fig. 2 be another embodiment of the present invention provides data cached processing method implementation flow chart;
Fig. 3 is the structural block diagram of data cached processing unit provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 shows the implementation flow chart of data cached processing method provided in an embodiment of the present invention, and details are as follows:
In step s101, it when receiving into when dormant instruction, obtains in pushup storage and caches number
According to currently stored amount.
It should be noted that the executing subject of the embodiment of the present invention can be wearable intelligent equipment, or built-in
Device in wearable intelligent equipment can also be other data cached processing units, be not limited thereto.It is data cached
It can be 3-axis acceleration value, be not limited thereto.
When receiving into dormant instruction, obtain data cached currently stored in pushup storage
Amount, and judge whether currently stored amount data cached in pushup storage reaches critical value.Herein, critical value is greater than
First preset value and less than the second preset value.
In step s 102, it if the currently stored amount is greater than the first preset value and less than the second preset value, persistently looks into
It askes and whether there is the corresponding interrupt requests of the pushup storage, wherein second preset value first enters elder generation less than described
The maximum storage of memory out.
In embodiments of the present invention, the second preset value is less than the maximum storage of pushup storage, the first preset value
Less than the second preset value.Assuming that pushup storage can at most store 32 groups it is data cached, i.e., pushup storage is most
Large buffer memory is 32 groups, then the second preset value can be 25 groups, and the first preset value can be 23 groups, is not limited thereto.If the
Two preset values are 25 groups, and the first preset value is 23 groups, then critical value is 24 groups.If data cached in pushup storage work as
Preceding amount of storage reaches critical value, then does not execute into dormant instruction, and continuous Query is stored with the presence or absence of first in, first out
The corresponding interrupt requests of device deposit first in, first out to avoid delaying during executing and entering dormant instruction
The processing of the corresponding interrupt requests of reservoir.
In step s 103, after inquiring the corresponding interrupt requests of the pushup storage, reading is described first to be entered
First go out data cached in memory.
Since continuous Query first enters elder generation after currently stored amount data cached in pushup storage reaches critical value
The corresponding interrupt requests of memory out therefore, can be at the first time after generating the corresponding interrupt requests of pushup storage
It inquires.After inquiring the corresponding interrupt requests of pushup storage, the caching in pushup storage is read immediately
Data, thereby ensure that in pushup storage data cached can be read in time.
Further, after currently stored amount data cached in the acquisition pushup storage, the method
Further include:
If the currently stored amount is less than or equal to first preset value, enter the sleep state.
In embodiments of the present invention, if currently stored amount is less than or equal to the first preset value, enter sleep state, with drop
Low system power dissipation.
Further, the method also includes:
When the currently stored amount is greater than or equal to second preset value, it is corresponding to generate the pushup storage
Interrupt requests.
In embodiments of the present invention, when currently stored amount data cached in pushup storage reaches the second preset value
When, the corresponding interrupt requests of pushup storage are generated, without currently depositing until data cached in pushup storage
Pushup storage corresponding interrupt requests are just generated when reserves reach the maximum storage of pushup storage, are thus kept away
Exempt from the loss of data generated since the corresponding interrupt requests of pushup storage cannot be handled in time.
Fig. 2 shows another embodiment of the present invention provides data cached processing method implementation flow chart, referring to figure
2:
In step s 201, it when receiving into when dormant instruction, obtains in pushup storage and caches number
According to currently stored amount;
In step S202, judge whether currently stored amount is greater than or equal to the second preset value, if so, thening follow the steps
S203;If it is not, thening follow the steps S205;
In step S203, the corresponding interrupt requests of pushup storage are generated;
In step S204, read data cached in pushup storage;
In step S205, judge whether currently stored amount is greater than the first preset value and less than the second preset value, if so,
Execute step S206;If it is not, thening follow the steps S207;
In step S206, continuous Query whether there is the corresponding interrupt requests of pushup storage;
In step S207, into sleep state.
Preferably, the method also includes:
One timer is set;
When the timing duration of the timer is greater than or equal to third preset value, the pushup storage pair is generated
The interrupt requests answered, the third preset value are equal to pushup storage duration needed for from dummy status to full state.
As an embodiment of the present invention, in order to avoid first in, first out also unread after pushup storage is filled with
It is data cached in memory, a timer is set, and the timing length of the timer is equal to pushup storage from dummy status
To duration needed for full state.Herein, it is pre- that the timing duration that the timing length of timer works as timer is greater than or equal to third
If value when, timer generate interrupt requests so that main program read immediately it is data cached in pushup storage.
Further, it is described read data cached in the pushup storage after, the method also includes:
Clear operation is executed to the timer.
In embodiments of the present invention, read pushup storage in it is data cached after, clearing is executed to timer
Operation, to guarantee that timer only just generates interrupt requests when pushup storage is filled with.
It should be understood that in embodiments of the present invention, magnitude of the sequence numbers of the above procedures are not meant to the elder generation of execution sequence
Afterwards, the execution sequence of each process should be determined by its function and internal logic, the implementation process structure without coping with the embodiment of the present invention
At any restriction.
The embodiment of the present invention is by judging to cache in pushup storage when receiving into when dormant instruction
Whether the currently stored amount of data reaches critical value, faces if currently stored amount data cached in pushup storage has reached
Dividing value, then persistently wait the corresponding interrupt requests of pushup storage, and inquire pushup storage it is corresponding in
Breaking, it is data cached in pushup storage to read immediately after requesting, and thus avoids executing into dormant instruction
The corresponding interrupt requests of pushup storage cannot be handled in time in the process, ensure that the caching number in pushup storage
According to can be read in time, data cached do not lost to guarantee that pushup storage is corresponding.
Fig. 3 shows the structural block diagram of data cached processing unit provided in an embodiment of the present invention, which can use
In operation data cached processing method shown in fig. 1 or fig. 2.For ease of description, it illustrates only and phase of the embodiment of the present invention
The part of pass.
Referring to Fig. 3, which includes:
Currently stored amount acquiring unit 31, for when receiving into when dormant instruction, acquisition first in, first out to be deposited
Data cached currently stored amount in reservoir;
Interrupt requests query unit 32, if being greater than the first preset value for the currently stored amount and being preset less than second
Value, then continuous Query whether there is the corresponding interrupt requests of the pushup storage, wherein second preset value is less than
The maximum storage of the pushup storage;
Reading unit 33, for reading the elder generation after inquiring the corresponding interrupt requests of the pushup storage
Enter first go out memory in it is data cached.
Further, described device further include:
Sleep state enters unit 34, if being less than or equal to first preset value for the currently stored amount, into
Enter the sleep state.
Further, described device further include:
First interrupt requests generation unit 35, for being greater than or equal to second preset value when the currently stored amount
When, generate the corresponding interrupt requests of the pushup storage.
Preferably, described device further include:
Timer setting unit 36, for a timer to be arranged;
Second interrupt requests generation unit 37 is greater than or equal to third preset value for the timing duration when the timer
When, the corresponding interrupt requests of the pushup storage are generated, the third preset value is equal to the pushup storage
Duration needed for from dummy status to full state.
Further, described device further include:
Timer resetting unit 38, for executing clear operation to the timer.
The embodiment of the present invention is by judging to cache in pushup storage when receiving into when dormant instruction
Whether the currently stored amount of data reaches critical value, faces if currently stored amount data cached in pushup storage has reached
Dividing value, then persistently wait the corresponding interrupt requests of pushup storage, and inquire pushup storage it is corresponding in
Breaking, it is data cached in pushup storage to read immediately after requesting, and thus avoids executing into dormant instruction
The corresponding interrupt requests of pushup storage cannot be handled in time in the process, ensure that the caching number in pushup storage
According to can be read in time, data cached do not lost to guarantee that pushup storage is corresponding.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of unit can be with
It is electrically mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (6)
1. a kind of data cached processing method characterized by comprising
When receiving into when dormant instruction, currently stored amount data cached in pushup storage is obtained;
If the currently stored amount is greater than the first preset value and less than the second preset value, continuous Query first enters with the presence or absence of described
First go out the corresponding interrupt requests of memory, wherein second preset value is less than the maximum storage of the pushup storage
Amount;
After inquiring the corresponding interrupt requests of the pushup storage, the caching in the pushup storage is read
Data;
If the currently stored amount is less than or equal to first preset value, enter the sleep state;
When the currently stored amount be greater than or equal to second preset value when, generate the pushup storage it is corresponding in
Disconnected request.
2. the method as described in claim 1, which is characterized in that the method also includes:
One timer is set;
When the timing duration of the timer is greater than or equal to third preset value, it is corresponding to generate the pushup storage
Interrupt requests, the third preset value are equal to pushup storage duration needed for from dummy status to full state.
3. method according to claim 2, which is characterized in that in the caching number read in the pushup storage
According to later, the method also includes:
Clear operation is executed to the timer.
4. a kind of data cached processing unit characterized by comprising
Currently stored amount acquiring unit, for obtaining in pushup storage when receiving into when dormant instruction
Data cached currently stored amount;
Interrupt requests query unit is held if being greater than the first preset value for the currently stored amount and less than the second preset value
Continuous inquiry whether there is the corresponding interrupt requests of the pushup storage, wherein second preset value is less than the elder generation
Enter first to go out the maximum storage of memory;
Reading unit, for reading the first in, first out after inquiring the corresponding interrupt requests of the pushup storage
It is data cached in memory;
Sleep state enters unit, if being less than or equal to first preset value for the currently stored amount, enters described
Sleep state;
First interrupt requests generation unit, for generating when the currently stored amount is greater than or equal to second preset value
The corresponding interrupt requests of the pushup storage.
5. device as claimed in claim 4, which is characterized in that described device further include:
Timer setting unit, for a timer to be arranged;
Second interrupt requests generation unit, for giving birth to when the timing duration of the timer is greater than or equal to third preset value
At the corresponding interrupt requests of the pushup storage, the third preset value is equal to the pushup storage from empty shape
Duration needed for state to full state.
6. device as claimed in claim 5, which is characterized in that described device further include:
Timer resetting unit, for executing clear operation to the timer.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2015/086323 WO2017024430A1 (en) | 2015-08-07 | 2015-08-07 | Cached data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105518617A CN105518617A (en) | 2016-04-20 |
CN105518617B true CN105518617B (en) | 2019-08-02 |
Family
ID=55725010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201580000253.1A Active CN105518617B (en) | 2015-08-07 | 2015-08-07 | Data cached processing method and processing device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105518617B (en) |
WO (1) | WO2017024430A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108896099A (en) * | 2018-05-09 | 2018-11-27 | 南京思达捷信息科技有限公司 | A kind of detection big data platform and its method for earth's crust disaster |
CN113553227B (en) * | 2021-07-26 | 2023-09-26 | 长鑫存储技术有限公司 | Detection device and method and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1992015055A1 (en) * | 1991-02-18 | 1992-09-03 | Siemens Aktiengesellschaft | Circuit for connecting a microprocessor system with a communications channel |
CN1561060A (en) * | 2004-03-05 | 2005-01-05 | ����ͨѶ�ɷ�����˾ | Threshold setting method of first-in first-out buffer |
CN101286855A (en) * | 2008-05-26 | 2008-10-15 | 张扬 | Network data transmission server, detecting system constituted thereby and power saving method |
CN101610329A (en) * | 2008-04-01 | 2009-12-23 | 阿尔卑斯电气株式会社 | Data processing method and data processing equipment |
CN101841624A (en) * | 2010-05-17 | 2010-09-22 | 北京思比科微电子技术股份有限公司 | Image sensor data transmission method |
-
2015
- 2015-08-07 CN CN201580000253.1A patent/CN105518617B/en active Active
- 2015-08-07 WO PCT/CN2015/086323 patent/WO2017024430A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1992015055A1 (en) * | 1991-02-18 | 1992-09-03 | Siemens Aktiengesellschaft | Circuit for connecting a microprocessor system with a communications channel |
CN1561060A (en) * | 2004-03-05 | 2005-01-05 | ����ͨѶ�ɷ�����˾ | Threshold setting method of first-in first-out buffer |
CN101610329A (en) * | 2008-04-01 | 2009-12-23 | 阿尔卑斯电气株式会社 | Data processing method and data processing equipment |
CN101286855A (en) * | 2008-05-26 | 2008-10-15 | 张扬 | Network data transmission server, detecting system constituted thereby and power saving method |
CN101841624A (en) * | 2010-05-17 | 2010-09-22 | 北京思比科微电子技术股份有限公司 | Image sensor data transmission method |
Also Published As
Publication number | Publication date |
---|---|
WO2017024430A1 (en) | 2017-02-16 |
CN105518617A (en) | 2016-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3612942B1 (en) | Queue management for direct memory access | |
US10412021B2 (en) | Optimizing placement of virtual machines | |
CN109145020A (en) | Information query method, from server, client and computer readable storage medium | |
CN106547612B (en) | Multitasking method and device | |
EP3830715A1 (en) | Storage aggregator controller with metadata computation control | |
RU2568292C2 (en) | System and method of selecting synchronous or asynchronous interprocess interaction | |
CN106155814B (en) | A kind of reconfigurable arithmetic unit that supporting multiple-working mode and its working method | |
CN103412786A (en) | High performance server architecture system and data processing method thereof | |
CN102307206A (en) | Caching system and caching method for rapidly accessing virtual machine images based on cloud storage | |
CN105187327A (en) | Distributed message queue middleware | |
CN107256180A (en) | Data processing method, device and terminal | |
CN104683408A (en) | Method and system for OpenStack cloud computing management platform to build virtual machine instance | |
CN105095495B (en) | A kind of distributed file system buffer memory management method and system | |
CN107347039A (en) | A kind of management method and device in shared buffer memory space | |
CN109426623A (en) | A kind of method and device reading data | |
CN105518617B (en) | Data cached processing method and processing device | |
CN104346303A (en) | Bus arbitration method and device | |
WO2014056329A1 (en) | Memory data pushing method and device | |
CN110147254A (en) | A kind of data buffer storage processing method, device, equipment and readable storage medium storing program for executing | |
CN110020046A (en) | A kind of data grab method and device | |
CN111510479B (en) | Resource allocation method and device for heterogeneous cache system | |
CN107766268A (en) | Interruption sending method, device, system, equipment and the storage medium of storage device | |
CN110658980B (en) | Data processing method and device and storage system | |
CN110399219A (en) | Memory pool access method, DMC and storage medium | |
CN104731722A (en) | Method and device for management of cache pages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |