CN105279103A - Data management method and apparatus - Google Patents

Data management method and apparatus Download PDF

Info

Publication number
CN105279103A
CN105279103A CN201510632900.2A CN201510632900A CN105279103A CN 105279103 A CN105279103 A CN 105279103A CN 201510632900 A CN201510632900 A CN 201510632900A CN 105279103 A CN105279103 A CN 105279103A
Authority
CN
China
Prior art keywords
target
data
target data
cache district
described target
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.)
Pending
Application number
CN201510632900.2A
Other languages
Chinese (zh)
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.)
Inspur Group Co Ltd
Original Assignee
Inspur Group 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 Inspur Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201510632900.2A priority Critical patent/CN105279103A/en
Publication of CN105279103A publication Critical patent/CN105279103A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a data management method and apparatus. The method comprises: S0: presetting a target buffer region in a memory; S1: determining at least one target datum required to be used for multiple times in a target business; S2: storing the at least one target datum in a storage device into the target buffer region; and S3: when executing the target business, judging whether the target buffer region comprises target data as same as data currently required for the target business or not, and if so, providing the corresponding target data in the target buffer region to the target business. Through the technical scheme provided by the invention, the situation that the same target data are frequently read and written in the storage device can be avoided when the target business is executed, so that the data interaction efficiency is improved.

Description

A kind of data managing method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of data managing method and device.
Background technology
Cloud operating system is a kind of cloud platform total management system of a kind of framework on the resources such as server, storage, network, corresponding, cloud operating system comprises computing module, memory module and mixed-media network modules mixed-media; Data interaction can be carried out to complete corresponding business between each module.
In cloud operating system, completing a business needs to carry out a large amount of data interactions usually, comprise from database acquisition number according to this and each intermodule carry out data interaction; Usually use the form transmission data of message queue in data exchange process, from the database or memory device of correspondence, obtain data by message queue, after the data in message queue are read, then remove corresponding message queue; Data interaction each time, equal correspondence is once to the read-write operation of disk, because each business may need to obtain identical data repeatedly corresponding from cloud operating system database or memory device, simultaneously, same item business also may need data repeatedly identical alternately between each module of cloud operating system, therefore, business may need the read-write repeated on disk frequently identical data, and the efficiency of data interaction is lower.
Summary of the invention
In view of this, the invention provides a kind of data managing method and device, the efficiency of data interaction can be improved.
First aspect, the invention provides a kind of data managing method, comprising:
S0: Offered target buffer area in internal memory in advance, also comprises;
S1: determine to need at least one target data nonexpondable in target service;
S2: at least one target data described in memory device is stored in described target cache district;
S3: when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, is then supplied to described target service by target data corresponding in described target cache district.
Further, after described step S2, also comprise:
The term of validity that in described target cache district, described in each, target data is corresponding is set respectively.
Further, in described step S3, after judging that described target cache district comprises the target data identical with the data of the current needs of described target service, and described target data in described target cache district is supplied to described target service before, comprise further:
Judge the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if so, then continue to perform described target data corresponding in described target cache district is supplied to described target service.
Further, described Offered target buffer area in internal memory in advance, comprises further:
Set the quantity of the target data that described target cache district can store.
Further, taking a step forward of described step S2 comprises:
Judge whether the quantity of the target data in described target cache district is less than the quantity preset, if so, then perform step S2;
Otherwise the term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then perform step S2.
Second aspect, the invention provides a kind of data administrator, comprising:
Internal memory, is provided with target cache district in this internal memory;
Determining unit, needs at least one target data nonexpondable for determining in target service;
Acquiring unit, is stored in described target cache district at least one target data described in just memory device;
Processing unit, for when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, then target data corresponding in described target cache district is supplied to described target service.
Further, also comprise:
Setting unit, for arranging the term of validity that in described target cache district, described in each, target data is corresponding respectively.
Further,
Described processing unit is further used for judging the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if so, then continuation execution is described is supplied to described target service by target data corresponding in described target cache district.
Further,
Described setting unit is further used for the quantity setting the target data that described target cache district can store.
Further, also comprise:
Judging unit, for judging whether the quantity of the target data in described target cache district is less than the quantity preset, if so, then triggers described acquiring unit and is stored in described target cache district by least one target data described in memory device;
Otherwise, the trigger processing unit term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then triggers acquiring unit and at least one target data described in memory device is stored in described target cache district.
The invention provides a kind of data managing method and device, at least one target data nonexpondable is needed according in target service demand determination target service, needs at least one target data nonexpondable is stored in the buffer area be arranged in internal memory, can obtain in buffer area during to make to carry out target service and need nonexpondable target data, target data need not be read from memory device corresponding to target data, namely avoid reading and writing same target data frequently on a storage device, improve the efficiency of data interaction.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of data managing method that one embodiment of the invention provides;
Fig. 2 is the another kind of data managing method that one embodiment of the invention provides;
Fig. 3 is a kind of data administrator that one embodiment of the invention provides.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly; below in conjunction with the accompanying drawing in the embodiment of the present invention; technical scheme in the embodiment of the present invention is clearly and completely described; obviously; described embodiment is the present invention's part embodiment, instead of whole embodiments, based on the embodiment in the present invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of data managing method, the method can comprise the following steps:
S0: Offered target buffer area in internal memory in advance;
S1: determine to need at least one target data nonexpondable in target service;
S2: at least one target data described in memory device is stored in described target cache district;
S3: when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, is then supplied to described target service by target data corresponding in described target cache district.
Embodiments provide a kind of data managing method, at least one target data nonexpondable is needed according in target service demand determination target service, needs at least one target data nonexpondable is stored in the buffer area be arranged in internal memory, can obtain in buffer area during to make to carry out target service and need nonexpondable target data, target data need not be read from memory device corresponding to target data, namely avoid reading and writing same target data frequently on a storage device, improve the efficiency of data interaction.
Further, because the partial target data in memory device exist certain changeability, target data in memory device may be revised by other processes, and then cause the target data in target cache district with the target data in corresponding memory device and inconsistent, in a preferred embodiment of the invention, the term of validity that in described target cache district, described in each, target data is corresponding is set respectively; Be directed to each target data, can in conjunction with the featured configuration term of validity of each target data itself, such as labile data can arrange the shorter term of validity, and even the term of validity time is accurate to millisecond, and not labile data can arrange the longer term of validity; When the target data in target cache district not before the deadline time, then can show that the target data in buffer area may occur inconsistent with the target data in corresponding memory device.
Further, due to target cache district data not before the deadline, namely show that the target data in target cache district may occur inconsistent with the target data corresponded on memory device, and the target data of target service actual demand should be identical with the target data corresponded in memory device, therefore, in order to effective performance objective business, target service is avoided to cause effectively completing target service because obtaining the data of mistake, in a preferred embodiment of the invention, in described step S3, after judging that described target cache district comprises the target data identical with the data of the current needs of described target service, and described target data in described target cache district is supplied to described target service before, comprise further: judge the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if, then continuation execution is described is supplied to described target service by target data corresponding in described target cache district.
Further, because target cache district is arranged in internal memory, take larger memory headroom in order to avoid target cache district and affect the performance of corresponding operating system, in a preferred embodiment of the invention, described Offered target buffer area in internal memory in advance, comprises: the quantity setting the target data that described target cache district can store further.
In one embodiment of the invention, need the quantity of the storable target data of size Offered target buffer area in conjunction with actual memory corresponding to cloud operating system; It should be noted that, for the setting of buffer area, also can by the size of the size Offered target buffer area in conjunction with actual memory corresponding to cloud operating system; As long as ensure the performance that can not affect current operation system in internal memory after Offered target buffer area.
Further, owing to having preset the quantity of storable target data in target cache district, when the quantity of the target data stored in target cache district reaches the quantity preset, may cause continuing other target datas in memory device to be stored in target cache district; Therefore, in a preferred embodiment of the invention, taking a step forward of described step S2 comprises: judge whether the quantity of the target data in described target cache district is less than the quantity preset, and if so, then performs step S2; Otherwise the term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then perform step S2.
Particularly, owing to being provided with the term of validity for each target data in target cache district in advance, the target data exceeding the term of validity is owing to may to occur with the target data in corresponding memory device and inconsistent, the target data exceeding the term of validity can not be applied to corresponding target service, therefore, directly can to remove in target cache district not target data before the deadline, and then make can continue in target cache district to store new target data.
It should be noted that, in the conceived case, when each target data in target cache district all before the deadline time, the target data of closing on valid period most can be known accordingly.
As shown in Figure 2, embodiments provide another kind of data managing method, can be applicable in cloud operating system, the method can comprise the following steps:
Step 201, in advance Offered target buffer area in internal memory, and set the quantity of the target data that described target cache district can store.
It should be noted that, be directed to target cache district, can be used for storing each target data respectively; When target service needs multiple target data simultaneously, can for the cache class of the target cache district design overall situation, with the data structure storage cache object of Map, here, each cache object can comprise multiple target data.
The quantity of the storable target data in target cache district can be arranged in conjunction with the size reasonable of internal memory corresponding to cloud operating system, as long as can not increase the memory pressure of cloud operating system after guaranteeing Offered target buffer area, so that affects the performance of cloud operating system.
Step 202, determines to need nonexpondable target data in target service.
Step 203, arranges the term of validity that each will be stored to the target data difference correspondence in target cache district respectively.
Characteristic according to each target data itself is rationally arranged, and is directed to the target data changed, and can arrange the shorter term of validity, is directed to not labile target data, can arranges the longer term of validity.
Step 204, judges whether the quantity of the target data in target cache district is less than the quantity preset, and if so, then performs 206; Otherwise, perform step 205.
Step 205, the term of validity corresponding respectively according to each target data removes corresponding target data.
When the quantity of the target data in target cache district reaches the quantity preset, not target data before the deadline can be removed in target cache district; When each target data in target cache district all before the deadline time, can first remove the target data of closing on the term of validity most.
Step 206, is stored in target data in described target cache district.
Nonexpondable target data target service is needed to be stored in target cache district, when target service uses target data each time, all can obtain target data from target cache district, repeatedly target data need not be obtained from memory device corresponding to target data, when namely avoiding performance objective business, on disk, read and write identical target data frequently; Internal memory reads and writes data more a lot of soon than the speed read and write data from disk, therefore, corresponding cloud operating system response speed is also just fast a lot, improves the efficiency of data interaction, and then promotes Consumer's Experience.
Step 207, judges whether to comprise in target cache district the target data that the data of needs current with target service are identical, if so, then performs step 208; Otherwise, terminate current process.
Step 208, judges the target data identical with the data of the current needs of target service whether in the term of validity arranged, and if so, then performs step 209; Otherwise, terminate current process.
In the embodiment of the present invention, only target service is provided to need nonexpondable target data to target service, be directed to target service and only need expendable data, due to target service obtain from memory device in data and the embodiment of the present invention target data to be stored in target cache district all corresponding once for the read-write operation of disk, can not save time to improve system response time, expendable data target service are only needed to be stored in the pressure that target cache district increases internal memory on the contrary, therefore, in one embodiment of the invention, when the target data that the data that there are not needs current with target service in target cache district are identical, target service obtains from the memory device of correspondence by Query Database or by the communication mode of message.
Step 209, is supplied to target service by target data identical for the data of needs current with target service in target cache district.
By above-mentioned steps, when can realize performance objective business, improve the response speed of cloud operating system, the efficiency of data interaction under raising cloud operating system, and then promote Consumer's Experience.
As shown in Figure 3, embodiments provide a kind of data administrator, comprising:
Internal memory 301, is provided with target cache district in this internal memory 301;
Determining unit 302, needs at least one target data nonexpondable for determining in target service;
Acquiring unit 303, for being stored in described target cache district by least one target data described in memory device;
Processing unit 304, for when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, then target data corresponding in described target cache district is supplied to described target service.
Further, the target data stored on a storage device due to part possesses certain changeability, in order to avoid target service causes effectively completing corresponding target service because obtaining the target data of mistake, in a preferred embodiment of the invention, also comprise: setting unit, for arranging the term of validity that in described target cache district, described in each, target data is corresponding respectively; When the target in target cache district belong to not before the deadline time, then show that corresponding target data is possible inconsistent with the target data in corresponding memory device.
Particularly, in order to avoid target service causes effectively completing corresponding target service because obtaining the target data of mistake, in one mode in the cards, described processing unit 304 is further used for judging the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if so, then continuation execution is described is supplied to described target service by target data corresponding in described target cache district.
Further, in order to Appropriate application memory headroom, avoid because target data too much takies larger memory headroom, increase memory pressure and affect the performance of corresponding operating system, in one mode in the cards, described setting unit is further used for the quantity setting the target data that described target cache district can store.
Further, cause partial target data cannot continue to be stored to target cache district in order to avoid the quantity because being provided with the storable target data in target cache district, in one mode in the cards, also comprise: judging unit, for judging whether the quantity of the target data in described target cache district is less than the quantity preset, if so, then triggering acquiring unit 303 is stored in described target cache district by least one target data described in memory device;
Otherwise, trigger processing unit 304 term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then triggers described acquiring unit 303 and at least one target data described in memory device is stored in described target cache district.
The content such as information interaction, implementation between each unit in said apparatus, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
The embodiment of the present invention at least tool has the following advantages:
1, at least one target data nonexpondable is needed according in target service demand determination target service, needs at least one target data nonexpondable is stored in the buffer area be arranged in internal memory, can obtain in buffer area during to make to carry out target service and need nonexpondable target data, target data need not be read from memory device corresponding to target data, namely the read-write repeated frequently on disk same target data is avoided, improve the response speed of corresponding operating system, improve the efficiency of data interaction, and then promote Consumer's Experience.
2, according to the term of validity of each target data in the characteristic difference Offered target buffer area of each target data, then showing that corresponding target data may occur inconsistent with the target data in corresponding memory device when time in the no longer valid phase of the data in target cache district, avoiding target service to cause effectively to complete target service because employing the target data of mistake.
It should be noted that, in this article, the relational terms of such as with the second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element " being comprised " limited by statement, and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a data managing method, is characterized in that, comprising: Offered target buffer area in internal memory in advance, also comprises:
S1: determine to need at least one target data nonexpondable in target service;
S2: at least one target data described in memory device is stored in described target cache district;
S3: when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, is then supplied to described target service by target data corresponding in described target cache district.
2. method according to claim 1, is characterized in that, after described step S2, also comprises:
The term of validity that in described target cache district, described in each, target data is corresponding is set respectively.
3. method according to claim 2, it is characterized in that, in described step S3, after judging that described target cache district comprises the target data identical with the data of the current needs of described target service, and described target data in described target cache district is supplied to described target service before, comprise further:
Judge the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if so, then continue to perform described target data corresponding in described target cache district is supplied to described target service.
4. method according to claim 3, is characterized in that, described Offered target buffer area in internal memory in advance, comprises further:
Set the quantity of the target data that described target cache district can store.
5. method according to claim 4, is characterized in that, taking a step forward of described step S2 comprises:
Judge whether the quantity of the target data in described target cache district is less than the quantity preset, if so, then perform step S2;
Otherwise the term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then perform step S2.
6. a data administrator, is characterized in that, comprising:
Internal memory, is provided with target cache district in this internal memory;
Determining unit, needs at least one target data nonexpondable for determining in target service;
Acquiring unit, is stored in described target cache district at least one target data described in just memory device;
Processing unit, for when performing described target service, judge whether comprise the target data identical with the data of the current needs of described target service in described target cache district, if so, then target data corresponding in described target cache district is supplied to described target service.
7. device according to claim 6, is characterized in that, also comprises:
Setting unit, for arranging the term of validity that in described target cache district, described in each, target data is corresponding respectively.
8. device according to claim 7, is characterized in that,
Described processing unit is further used for judging the target data identical with the data of the current needs of described target service whether in the term of validity arranged, if so, then continuation execution is described is supplied to described target service by target data corresponding in described target cache district.
9. device according to claim 7, is characterized in that,
Described setting unit is further used for the quantity setting the target data that described target cache district can store.
10. device according to claim 9, is characterized in that, also comprises:
Judging unit, for judging whether the quantity of the target data in described target cache district is less than the quantity preset, if so, then triggers described acquiring unit and is stored in described target cache district by least one target data described in memory device;
Otherwise, the trigger processing unit term of validity that target data is corresponding respectively according to each in described target cache district removes corresponding target data, then triggers acquiring unit and at least one target data described in memory device is stored in described target cache district.
CN201510632900.2A 2015-09-29 2015-09-29 Data management method and apparatus Pending CN105279103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510632900.2A CN105279103A (en) 2015-09-29 2015-09-29 Data management method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510632900.2A CN105279103A (en) 2015-09-29 2015-09-29 Data management method and apparatus

Publications (1)

Publication Number Publication Date
CN105279103A true CN105279103A (en) 2016-01-27

Family

ID=55148144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510632900.2A Pending CN105279103A (en) 2015-09-29 2015-09-29 Data management method and apparatus

Country Status (1)

Country Link
CN (1) CN105279103A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255417A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Data access method, electronic device and readable storage medium storing program for executing
CN108388424A (en) * 2018-03-09 2018-08-10 北京奇艺世纪科技有限公司 A kind of method, apparatus and electronic equipment of calling interface data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130145076A1 (en) * 2011-12-05 2013-06-06 Industrial Technology Research Institute System and method for memory storage
CN103365790A (en) * 2012-03-29 2013-10-23 群联电子股份有限公司 Storage controller, storing device and data writing method
CN103838682A (en) * 2014-03-10 2014-06-04 华为技术有限公司 File directory reading method and equipment
CN103885901A (en) * 2012-12-21 2014-06-25 联想(北京)有限公司 File reading method, memory device and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130145076A1 (en) * 2011-12-05 2013-06-06 Industrial Technology Research Institute System and method for memory storage
CN103365790A (en) * 2012-03-29 2013-10-23 群联电子股份有限公司 Storage controller, storing device and data writing method
CN103885901A (en) * 2012-12-21 2014-06-25 联想(北京)有限公司 File reading method, memory device and electronic device
CN103838682A (en) * 2014-03-10 2014-06-04 华为技术有限公司 File directory reading method and equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255417A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Data access method, electronic device and readable storage medium storing program for executing
CN108255417B (en) * 2017-11-30 2020-11-24 平安科技(深圳)有限公司 Data access method, electronic device and readable storage medium
CN108388424A (en) * 2018-03-09 2018-08-10 北京奇艺世纪科技有限公司 A kind of method, apparatus and electronic equipment of calling interface data

Similar Documents

Publication Publication Date Title
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN102158349B (en) A kind of log management apparatus and method
CN104156380A (en) Distributed memory Hash indexing method and system
CN103064797B (en) Data processing method and virtual machine management platform
CN102184229B (en) Memory data storage method of huge RFID (Radio Frequency Identification Device) label information
EP2763055B1 (en) A telecommunication method and mobile telecommunication device for providing data to a mobile application
CN101916290B (en) Managing method of internal memory database and device
CN109189756A (en) Electronic device, the method for Data Migration and storage medium
CN103370691A (en) Managing buffer overflow conditions
CN103500089A (en) Small file storage system suitable for Mapreduce calculation model
CN103064792A (en) Method and device for writing data
CN202472635U (en) Flash memory wear leveling device
CN105630934A (en) Data statistic method and system
CN103136215A (en) Data read-write method and device of storage system
CN107665219A (en) A kind of blog management method and device
CN105137227A (en) Testing device and method for power-down protection of intelligent card
CN108304142B (en) Data management method and device
CN104077082A (en) Network voting data storage method and device
CN106874343B (en) Data deletion method and system for time sequence database
US10713162B1 (en) System and method for computer data garbage collection acceleration using peer to peer data transfers
CN103605833A (en) Method and device for simulating performance of storage array system
CN105279103A (en) Data management method and apparatus
CN102467523A (en) Method for establishing index files and method for querying data blocks by using index files
KR101666440B1 (en) Data processing method in In-memory Database System based on Circle-Queue
CN108959497A (en) distributed file system log processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160127

WD01 Invention patent application deemed withdrawn after publication