CN106649544A - Electricity information data retrieving method and device - Google Patents

Electricity information data retrieving method and device Download PDF

Info

Publication number
CN106649544A
CN106649544A CN201610957950.2A CN201610957950A CN106649544A CN 106649544 A CN106649544 A CN 106649544A CN 201610957950 A CN201610957950 A CN 201610957950A CN 106649544 A CN106649544 A CN 106649544A
Authority
CN
China
Prior art keywords
power information
information data
module
retrieval
caching
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
CN201610957950.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.)
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Information and Telecommunication 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 State Grid Corp of China SGCC, State Grid Information and Telecommunication Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201610957950.2A priority Critical patent/CN106649544A/en
Publication of CN106649544A publication Critical patent/CN106649544A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an electricity information data retrieving method and device, and relates to the field of power. The electricity information data retrieving method and device are used for improving the speed of electricity information data retrieving. The electricity information data retrieving method comprises the steps of using multiple electricity information data to construct an electricity information database with large capacity; conducting statistics on accumulated retrieving times of the electricity information data, and utilizing the electricity information data of which accumulated retrieving times meet an accumulated retrieving threshold value to construct a cache; searching the cache for the electricity information data which corresponds to the retrieving request according to a retrieving request; searching the electricity information database with large capacity for the electricity information data which corresponds to the retrieving request according to the retrieving request if the electricity information data which corresponds to the retrieving request is not searched in the cache. The electricity information data retrieving device comprises the electricity information data retrieving method. The electricity information data retrieving method is used for improving the speed of electricity information data retrieving.

Description

A kind of power information data retrieval method and device
Technical field
The present invention relates to power domain, more particularly to a kind of power information data retrieval method and device.
Background technology
Intelligent electric meter as the important component part of power information acquisition system, accumulate over a long period can produce magnanimity use telecommunications Breath data.In order to realize power monitoring, the purpose such as load prediction and using electricity wisely cost is finally reached, needs to enter power information Row quick search and research and analyse, with the failure such as help quick detection to have a power failure, realize coordinating family and enterprise's electricity during peak of power consumption The management of power uses such as power distribution.
Statistics shows that, for the access of magnanimity power information data, the access request for having 71% concentrates on 15%- In 28% data, but, existing big data search method is not in view of this of power information data generally existing Data access features, directly using existing big data search method, can restrict the speed of power information data retrieval.
The content of the invention
It is an object of the invention to provide a kind of power information data retrieval method and device, in retrieval magnanimity electricity consumption During information data, the speed of power information data retrieval is lifted.
To achieve these goals, the present invention provides following technical scheme:
A kind of power information data retrieval method, including:
Step S1:Magnanimity power information database is built using a plurality of power information data;Statistics power information data Accumulative retrieval number of times, the power information data for meeting accumulative retrieval threshold using accumulative retrieval number of times build caching;
Step S2:According to retrieval request, the power information data corresponding with retrieval request are searched in the buffer;
Step S3:If not finding the power information data corresponding with retrieval request in the buffer, please according to retrieval Ask, the power information data corresponding with retrieval request are searched in magnanimity power information database.
Compared with prior art, the power information data retrieval method that the present invention is provided has the advantages that:
The power information data retrieval method that the present invention is provided, by the accumulative retrieval number of times for counting power information data, The power information data for meeting accumulative retrieval threshold using accumulative retrieval number of times build caching, so can will retrieve number of times more Power information data be stored in caching so that according to retrieval request retrieve power information data when, can retrieve in the buffer The probability increase of the power information data corresponding with retrieval request, can so be greatly enhanced the retrieval of power information data Speed;In addition, because the power information data stored in caching are to utilize Principle of Statistics, the retrieval number of times for filtering out is more Power information data, so the power information data capacity stored in caching will be much smaller than the use in magnanimity power information database Power information data capacity, searches the power information data corresponding with retrieval request so in the less caching of range of search When, retrieval number of times can be reduced, so as to further improve the retrieval rate of power information data.And, even if in the buffer not Find the power information data corresponding with retrieval request, it is also possible to which searching in magnanimity power information database please with retrieval Seek corresponding power information data;Therefore, the power information data retrieval method that the present invention is provided can be avoided directly in inspection The power information data corresponding with retrieval request are searched in the larger magnanimity power information database of rope scope, is greatly lifted The retrieval rate of power information data.
The present invention provides a kind of power information data searcher, including:
Access module, cache module, the first retrieval module, the second retrieval module and control module;The output of access module The input with the second retrieval module is held to be connected, the output end of cache module is connected with the input of the first retrieval module, controls The output end of module is connected respectively with the input of the first retrieval module and the input of the second retrieval module;
Access module is used to build magnanimity power information database using a plurality of power information data;
Cache module is used to count the accumulative retrieval number of times of power information data, and using accumulative retrieval number of times accumulative inspection is met The power information data of rope threshold value build caching;
Control module is used to send the first control instruction;
First retrieval module is used under the control of the first control instruction, according to retrieval request, searches in the buffer and inspection Rope asks corresponding power information data;
When control module is additionally operable to not find in the buffer the power information data corresponding with retrieval request, is sent Two control instructions;
Second retrieval module is used under the control of the second control instruction, according to retrieval request, in magnanimity power information number According to the power information data corresponding with retrieval request of lookup in storehouse.
Compared with prior art, the beneficial effect of the power information data searcher that the present invention is provided and above-mentioned technical side The beneficial effect of the power information data retrieval method that case is provided is identical, will not be described here.
Description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the present invention, this Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the flow chart one of the power information data retrieval method that the embodiment of the present invention one is provided;
Fig. 2 is the flowchart 2 of the power information data retrieval method that the embodiment of the present invention one is provided;
Fig. 3 is the power information data that will be retrieved from magnanimity power information database that the embodiment of the present invention one is provided The method flow diagram of write caching;
Fig. 4 is the method flow diagram by power information data write caching is prefetched that the embodiment of the present invention one is provided;
Fig. 5 is the structural representation one of the power information data searcher for providing the embodiment of the present invention two;
Fig. 6 is the structural representation two of the power information data searcher for providing the embodiment of the present invention two;
Fig. 7 is the structural representation three of the power information data searcher for providing the embodiment of the present invention two;
Fig. 8 is the structural representation four of the power information data searcher for providing the embodiment of the present invention two.
Reference:
100- access modules, 200- cache modules;
300- first retrieves module, the retrieval modules of 400- second;
500- control modules, 600- indexes set up module;
210- caches writing module, 220- counting modules;
230- cachings build module, 211- spaces judge module;
212- adds module, 213- user's importance degree judge module;
214- mark modules, 215- marker for judgment modules;
216- replacement modules, 700- prefetches module.
Specific embodiment
In order to further illustrate power information search method provided in an embodiment of the present invention and device, with reference to specification Accompanying drawing is described in detail.
Embodiment one
Fig. 1 is referred to, the embodiment of the present invention one provides a kind of power information data retrieval method, including:
Step S1:Magnanimity power information database is built using a plurality of power information data;Statistics power information data Accumulative retrieval number of times, the power information data for meeting accumulative retrieval threshold using accumulative retrieval number of times build caching;
Step S2:According to retrieval request, the power information data corresponding with retrieval request are searched in the buffer;
Step S3:If not finding the power information data corresponding with retrieval request in the buffer, please according to retrieval Ask, the power information data corresponding with retrieval request are searched in magnanimity power information database.
The power information data retrieval provided by above-mentioned power information data retrieval method, the embodiment of the present invention one Method, by the accumulative retrieval number of times for counting power information data, using accumulative retrieval number of times the use of accumulative retrieval threshold is met Power information data build caching, so can will retrieve the more power information data of number of times and be stored in caching so that according to retrieval During request retrieval power information data, the probability of the power information data corresponding with retrieval request can be in the buffer retrieved Increase, can so be greatly enhanced the retrieval rate of power information data;In addition, because the power information number stored in caching According to being to utilize Principle of Statistics, what is filtered out retrieves the more power information data of number of times, so what is stored in caching uses telecommunications Breath data capacity will be much smaller than the power information data capacity in magnanimity power information database, so less in range of search When searching the power information data corresponding with retrieval request in caching, retrieval number of times can be reduced, so as to further improve use The retrieval rate of power information data.And, even if not finding the power information data corresponding with retrieval request in the buffer, Also the power information data corresponding with retrieval request can be searched in magnanimity power information database;Therefore, the present invention is real Applying the power information data retrieval method of the offer of example one can avoid directly in the larger magnanimity power information data of range of search The power information data corresponding with retrieval request are searched in storehouse, the retrieval rate of power information data is greatly improved.
It should be noted that in the step of above-described embodiment S1, magnanimity can be built first with a plurality of power information data Power information database, then counts the accumulative retrieval number of times of power information data, and using accumulative retrieval number of times accumulative inspection is met The power information data of rope threshold value build caching, it is also possible to first count the accumulative retrieval number of times of power information data, using accumulative Retrieval number of times meets the power information data of accumulative retrieval threshold and builds caching, it is also possible that using a plurality of power information data While building magnanimity power information database, the accumulative retrieval number of times of power information data is counted, using accumulative retrieval number of times The power information data for meeting accumulative retrieval threshold build caching, and the sequencing of the two processes is not limited thereto.
It is understood that because the species for building the power information data owning user of power information database is various more Sample, in order to make a distinction to different types of user, by considering credit rating, the electricity consumption of user in the embodiment of the present invention one The indexs such as amount, set up user's importance degree appraisement system, are weighed by importance degree score K in user's importance degree appraisement system The importance degree of user, wherein, the size of K values represents the importance degree degree of user, and K values are bigger, and user's importance degree is higher, and K values are got over Little, user's importance degree is lower, also, in concrete application, can arrange pre-set user importance degree threshold k 1 according to actual conditions, If user's importance degree score K meets pre-set user importance degree threshold k 1, i.e. during K >=K1, then this user is judged as responsible consumer, if User's importance degree score K is unsatisfactory for pre-set user importance degree threshold k 1, i.e. K < K1, then judge this user as domestic consumer.
Specifically, while building magnanimity power information database using a plurality of power information data in step sl, press According to the size of user's importance degree score K value, to a plurality of power information data for building magnanimity power information database user is increased Importance degree label.
It should be noted that the step of above-described embodiment S2 also includes:It is important according to user by way of aggregat ion pheromones User's importance degree of degree tag representation, a plurality of power information data in magnanimity power information database set up database rope Draw, then, in step s 2, according to retrieval request, searched in the buffer by database index corresponding with retrieval request Power information data, in step s3, if not finding the power information data corresponding with retrieval request, root in the buffer According to retrieval request, the power information corresponding with retrieval request is searched in magnanimity power information database by database index Data.The embodiment of the present invention one by way of aggregat ion pheromones, according to user's importance degree of user's importance degree tag representation, according to A plurality of power information data in magnanimity power information database set up database index, are so being cached according to retrieval request During with searching the power information data corresponding with retrieval request in magnanimity power information database, can just pass through the data set up Storehouse index quickly finds the power information data corresponding with retrieval request, further improves recall precision.
Preferably, as shown in Fig. 2 in step s3, searched in magnanimity power information database by database index After the power information data corresponding with retrieval request, also include:
Step S4:By the power information data retrieved from magnanimity power information database write cache, and according to The difference of power information data, the power information data to retrieving from magnanimity power information database are counted, and are tired out Meter retrieval number of times, the power information data that thus can be upgraded in time in caching, it is ensured that during later retrieval, search in the buffer Probability to the power information data corresponding with retrieval request is bigger, so as to improve the retrieval rate of power information data.
Specifically, as shown in figure 3, the power information data retrieved from magnanimity power information database write is cached Method include:
Step S410:Judge whether there is free free space in caching, if it is, proceeding to step S420;If not, proceeding to step S430;
Step S420:The power information data retrieved from magnanimity power information database write is cached;
Step S430:Judge the importance degree for adding up the minimum power information data owning user of retrieval number of times in caching, be It is no to meet pre-set user importance degree threshold value;If it is, proceeding to step S440;If not, proceeding to step S460;
Step S440:Whether marked add up the minimum power information data of retrieval number of times in judging to cache, if it is, Proceed to step S460;If not, proceeding to step S450;
Step S450:Terminate retrieval, and add up the minimum power information data of retrieval number of times in tag cache;
Step S460:Using the power information data retrieved from magnanimity power information database, replace in caching and tire out The minimum power information data of meter retrieval number of times.
By above-mentioned specific implementation process, the embodiment of the present invention one will retrieved from magnanimity power information database To power information data write caching in when, it is necessary first to judge whether there is free free space in caching, if free in caching Free space, then directly by the power information data retrieved from magnanimity power information database write caching, if there is slow Deposit the situation of insufficient space, it is necessary to remove the minimum power information data of current accumulative retrieval number of times in caching, be arranged such It is because in power information data retrieval, the probability that the power information data for retrieving before are retrieved again is big, so this Inventive embodiments one are counted by the power information data to write caching, are often retrieved once, the power information number According to counting add one, so in inadequate buffer space, replace slow with the data that retrieve from magnanimity power information database Add up the minimum power information data of retrieval number of times in depositing, this ensures that there that store in caching is to retrieve the more use of number of times Power information data, and then when power information data are retrieved according to retrieval request, retrieve in the buffer relative with retrieval request The probability increase of the power information data answered, so as to further improve the retrieval rate of power information data;In addition, because caching The power information data of middle storage are to utilize Principle of Statistics, the more power information data of the retrieval number of times for filtering out, so The power information data capacity stored in caching will be much smaller than the power information data capacity in magnanimity power information database, this When sample searches the power information data corresponding with retrieval request in the less caching of range of search, retrieval time can be reduced Number, so as to further improve the retrieval rate of power information data.
Preferably, in order to further improve the retrieval rate of the power information data of responsible consumer, the embodiment of the present invention one In the power information data write caching that will be retrieved from magnanimity power information database, if inadequate buffer space, need Before removing the power information data for adding up retrieval number of times minimum in caching, also need to judge to add up retrieval number of times minimum in caching Whether the importance degree of data owning user meets pre-set user importance degree threshold value, that is, judge that the minimum data of accumulative retrieval number of times are It is no to belong to responsible consumer, if being not belonging to responsible consumer, directly proceed to step S460;If belonging to responsible consumer, in addition it is also necessary to sentence Whether marked add up the minimum power information data of retrieval number of times in the disconnected caching, if marked, directly proceed to step Rapid S460;If not marked, just directly terminate retrieval, and add up the minimum power information number of retrieval number of times in tag cache According to that is, the power information data in holding caching are constant, it is only necessary to the power information minimum to adding up retrieval number of times in current cache Data make marks, that is to say, that if inadequate buffer space needs to remove adds up the minimum electricity consumption of retrieval number of times in caching During information data, if the minimum power information data of accumulative retrieval number of times belong to responsible consumer, then remove the power information number According to needing through secondary-confirmation process, judge the power information data of the responsible consumer to add up retrieval in caching when first time During the data of number of times minimum, wouldn't remove, only it be marked, when the power information data for judging the responsible consumer again To add up to retrieve in caching during the data of number of times minimum, then execution step S460, i.e. using from magnanimity power information database The power information data for retrieving, replace and add up the minimum power information data of retrieval number of times in caching, are so updating caching In power information data when, ensuring that the power information data of responsible consumer can retain in the buffer longer time, The retrieval rate of the power information data of responsible consumer further can be improved in follow-up retrieval.
It should be noted that as shown in Fig. 2 the power information search method that the embodiment of the present invention one is provided also includes:
Step S5:Whether the importance degree of the power information data owning user that judgement is retrieved meets pre-set user importance degree Threshold value;If it is, proceeding to step S6;If not, terminating retrieval;
Step S6:According to database index, choose and the power information being retrieved is located in magnanimity power information database Power information data after data, obtain prefetching power information data;And will prefetch power information data write caching.
Because the power information data retrieval method that the embodiment of the present invention one is provided is by way of aggregat ion pheromones, according to User's importance degree of user's importance degree tag representation, a plurality of power information data in magnanimity power information database are set up Database index, so, in magnanimity power information database power information data put in order and index put in order Unanimously, i.e. in magnanimity power information database power information data be also according to the tactic of user's importance degree, so, If it is judged that the power information data for currently retrieving from magnanimity power information database belong to responsible consumer, then come The importance degree of the power information data behind the power information data is also higher, in order to ensure responsible consumer next time retrieval when Speed, the embodiment of the present invention one is chosen in magnanimity power information database, although not currently being retrieved, positioned at being retrieved The power information data behind power information data for arriving, obtain prefetching power information data, then this are prefetched into power information Data write caching, which adds the quantity of the power information data of the responsible consumer stored in caching, so as to follow-up During retrieval, it is ensured that the power information data retrieval speed of responsible consumer.
Specifically, as shown in figure 4, the method for prefetching power information data write caching is included:
Step S610:Judge whether there is free free space in caching, if it is, proceeding to step S620;If not, proceeding to step S630;
Step S620:Power information data write caching will be prefetched;
Step S630:Judge the importance degree for adding up the minimum power information data owning user of retrieval number of times in caching, be It is no to meet pre-set user importance degree threshold value, if it is, proceeding to step S640;If not, proceeding to step S660;
Step S640:Whether marked add up the minimum power information data of retrieval number of times in judging to cache, if it is, Proceed to step S660;If not, proceeding to step S650;
Step S650:Terminate retrieval, and add up the minimum power information data of retrieval number of times in tag cache;
Step S660:Add up the minimum power information number of retrieval number of times in caching using prefetching power information data and replacing According to.
By above-mentioned specific implementation process, the embodiment of the present invention one will be in it will prefetch power information data write caching When, it is necessary first to judge whether there is free free space in caching, if being free free space in caching, will directly prefetch power information Data write caching, if there is the situation of inadequate buffer space, will retrieve with above-mentioned from magnanimity power information database The process of power information data write caching be similar to, it is necessary to clear out of and add up the minimum power information of retrieval number of times in caching Data, are arranged such the quantity of the power information data that increased the responsible consumer stored in caching, so as in later retrieval, Ensure that the power information data retrieval speed of responsible consumer.
Preferably, in order to further improve the retrieval rate of the power information data of responsible consumer, the embodiment of the present invention one Will prefetch power information data write caching when, if inadequate buffer space, with it is above-mentioned will be from magnanimity power information database In the process of power information data write caching that retrieves be similar to, also need to judge to add up the minimum data of retrieval number of times in caching Whether the importance degree of owning user meets pre-set user importance degree threshold value, that is, judge to add up the minimum data of retrieval number of times in caching Whether belong to responsible consumer, if being not belonging to responsible consumer, directly proceed to step S660;If belonging to responsible consumer, in addition it is also necessary to Judge whether the power information data for adding up retrieval number of times minimum in the caching are marked, if marked, directly proceed to Step S660;If not marked, just directly terminate retrieval, and add up the minimum power information of retrieval number of times in tag cache Data, that is, keep the power information data in caching constant, it is only necessary to the power information number minimum to adding up retrieval number of times in caching According to making marks, that is to say, that if inadequate buffer space need to remove add up in caching retrieval number of times it is minimum use telecommunications During breath data, if adding up the minimum power information data of retrieval number of times in caching belongs to responsible consumer, then remove this and use telecommunications Breath data are needed through secondary-confirmation process, judge the power information data of the responsible consumer to add up in caching in first time During the data of retrieval number of times minimum, wouldn't remove, only it be marked, when the power information for judging the responsible consumer again When data are to add up the data of retrieval number of times minimum in caching, then execution step S660, i.e. replaced using power information data are prefetched Change in caching and add up the minimum power information data of retrieval number of times.So in the power information data in updating caching, just protect Having demonstrate,proved the power information data of responsible consumer can retain in the buffer longer time, and then can carry in follow-up retrieval The retrieval rate of the power information data of high responsible consumer.
Embodiment two
Refer to Fig. 5, the power information data searcher that the embodiment of the present invention two is provided, including it is access module 100, slow Retrieval module 300, the second retrieval module 400 of storing module 200, first and control module 500;The output end of access module 100 with The input of the second retrieval module 400 is connected, and the output end of cache module 200 is connected with the input of the first retrieval module 300, Input and the input phase of the second retrieval module 400 that the output end of control module 500 retrieves module 300 with first respectively Even;
Access module 100 is used to build magnanimity power information database using a plurality of power information data;
Cache module 200 is used to count the accumulative retrieval number of times of power information data, meets tired using accumulative retrieval number of times The power information data of meter retrieval threshold build caching;
Control module 500 is used to send the first control instruction;
First retrieval module 300 is used under the control of the first control instruction, according to retrieval request, search in the buffer with The corresponding power information data of retrieval request;
When control module 500 is additionally operable to not find in the buffer the power information data corresponding with retrieval request, send out Go out the second control instruction;
Second retrieval module 400 is used under the control of the second control instruction, according to retrieval request, in magnanimity power information The power information data corresponding with retrieval request are searched in database.
When being embodied as, refer to Fig. 5, using the embodiment of the present invention two provide power information data searcher to Power information data enter line retrieval.
Magnanimity power information database is built by a plurality of power information data using access module 100, and using slow Storing module 200 counts the accumulative retrieval number of times of power information data, and using accumulative retrieval number of times the use of accumulative retrieval threshold is met Power information data build caching;Then, the first control instruction is sent using control module 500, and according to retrieval request, utilizes the One retrieval module 300 searches the power information number corresponding with retrieval request under the control of the first control instruction, in the buffer According to when not finding the power information data corresponding with retrieval request in the buffer, using control module 500 the second control being sent System instruction, and according to retrieval request, using the second retrieval module 400 under the control of the second control instruction, in magnanimity telecommunications The power information data corresponding with retrieval request are searched in breath database.
Compared with prior art, the embodiment of the present invention two provide power information data searcher beneficial effect with it is upper The beneficial effect for stating the power information data retrieval method of the offer of embodiment one is identical, will not be described here.
Specifically, as shown in figure 5, the power information data searcher that the embodiment of the present invention two is provided also is built including index Formwork erection block 600;The input that the output end of access module 100 sets up module 600 with index is connected, and index sets up module 600 Output end is connected respectively with the input of the first retrieval module 300 and the input of the second retrieval module 400;
Module 600 is set up using index, by way of aggregat ion pheromones, according to user's weight of user's importance degree tag representation Spend, a plurality of power information data in magnanimity power information database set up database index;So according to retrieval Request, when searching the power information data corresponding with retrieval request in the buffer using the first retrieval module 300, just can pass through The database index of foundation quickly finds the power information data corresponding with retrieval request, further improves retrieval effect Rate;Or, if not finding the power information data corresponding with retrieval request in the buffer, also dependent on retrieval request, It is corresponding with retrieval request by database index lookup in magnanimity power information database using the second retrieval module 400 Power information data when, now also can pass through set up database index quickly find the use corresponding with retrieval request Power information data, so as to further improve recall precision.
It is understood that as shown in fig. 6, the cache module 200 in the embodiment of the present invention two includes caching writing module 210th, counting module 220 and caching build module 230, wherein the output end of the second retrieval module 400 and caching writing module 210 Input be connected, cache writing module 210 output end respectively with caching build module 230 input and counting module 220 input is connected, and caching builds the output end of module 230 and is connected with the input of the first retrieval module 300;
When being embodied as, searched in magnanimity power information database by database index corresponding with retrieval request After power information data, using caching writing module 210, the power information number that will be retrieved from magnanimity power information database According to write caching;
Power information data of the module 230 by retrieving from magnanimity power information database are built using caching to build Caching;
According to the difference of power information data, using counting module, 220 pairs retrieve from magnanimity power information database Power information data counted, obtain accumulative retrieval number of times.So in inadequate buffer space, will can add up in caching The minimum power information data of retrieval number of times are removed from the cache, and then write the new retrieval from magnanimity power information database The power information data for arriving, so as to be updated to caching in time, so, the power information data in caching will always The more power information data of retrieval number of times, so as to ensure that the power information corresponding with retrieval request is retrieved in the buffer The probability increase of data, and then improve the retrieval rate of power information data.
Specifically, Fig. 7 is referred to, caching writing module 210 includes space judge module 211, adds module 212, user Importance degree judge module 213, mark module 214, marker for judgment module 215 and replacement module 216;Wherein, the second retrieval module 400 output end is connected with the input of space judge module 211, the output end of space judge module 211 respectively with add mould The input of block 212 is connected with the input of user's importance degree judge module 213, the output of user's importance degree judge module 213 End be connected with the input of marker for judgment module 215 and the input of replacement module 216 respectively, marker for judgment module 215 it is defeated Go out end to be connected with the input and mark module 214 of replacement module 216 respectively, the output end of replacement module 216 respectively with caching Build module 230 input be connected with the input of counting module 220, addition module 212 output end respectively with count module The input that the input of block 220 builds module 230 with caching is connected, and the output end of counting module 220 is important with user respectively The input of degree judge module 213 is connected with the input of replacement module 216;
In the specific implementation, utilization space judge module 211 judges whether there is free free space in caching;
When being free free space in judging caching, the power information data being retrieved are write using module 212 is added Enter caching;
When there is no free space in judging caching, judge to add up in caching using user's importance degree judge module 213 Whether the importance degree of the minimum data owning user of retrieval number of times meets pre-set user importance degree threshold value;
Without free space in caching is judged, and add up the weight of the minimum data owning user of retrieval number of times in caching Spend when meeting pre-set user importance degree threshold value, judge to add up in caching retrieval number of times using marker for judgment module 215 minimum Whether power information data are marked;
Without free space in caching is judged, add up to be used belonging to the minimum power information data of retrieval number of times in caching The importance degree at family meets pre-set user importance degree threshold value, and the minimum power information data of accumulative retrieval number of times are not marked in caching When recording a demerit, retained using mark module 214 and add up the minimum power information data of retrieval number of times in caching, and tired out in tag cache The minimum power information data of meter retrieval number of times;
Add up belonging to the minimum power information data of retrieval number of times without free space and in caching in judging to cache When the importance degree of user is unsatisfactory for pre-set user importance degree threshold value, using replacement module 216 with from magnanimity power information database In the power information data that retrieve, replace and add up the minimum power information data of retrieval number of times in caching, so in time more On the premise of power information data in new caching, the power information data that also ensure that responsible consumer retain in the buffer longer Time;
Or, without free space in caching is judged, the minimum power information data of retrieval number of times are added up in caching The importance degree of owning user meets pre-set user importance degree threshold value, and adds up the minimum power information data of retrieval number of times in caching When affiliated power information data are marked, it is also possible to retrieved with from magnanimity power information database using replacement module 216 The power information data for arriving, replace and add up the minimum power information data of retrieval number of times in caching, so in the caching that upgrades in time In power information data on the premise of, when also ensure that the power information data of responsible consumer retain in the buffer longer Between.
It should be noted that as shown in figure 8, the power information data searcher that the embodiment of the present invention two is provided also includes Prefetch module 700;Wherein, the output end of the second retrieval module 400 is connected with the input for prefetching module 700, prefetches module 700 Output end be connected with the input of space judge module 211;
In the specific implementation, will examined from magnanimity power information database using replacement module 216 or addition module 212 After the power information write cache module that rope is arrived, judged from magnanimity power information data using user's importance degree judge module 213 Whether the power information data retrieved in storehouse meet pre-set user importance degree threshold value;Using user's importance degree judge module 213 when judging that the power information data retrieved from magnanimity power information database meet pre-set user importance degree threshold value, Using module 700 is prefetched according to database index, choose and the power information being retrieved is located in magnanimity power information database Power information data after data, obtain prefetching power information data;Then, continue with space judge module 211 to judge Whether there is space in caching;
When being free free space in judging caching, power information data write caching will be prefetched using module 212 is added;
When there is no free space in judging caching, judge to add up in caching using user's importance degree judge module 213 Whether the importance degree of the minimum power information data owning user of retrieval number of times meets pre-set user importance degree threshold value;
Without free space in caching is judged, and add up in caching belonging to the minimum power information data of retrieval number of times When the importance degree of user meets pre-set user importance degree threshold value, judge to add up retrieval time in caching using marker for judgment module 215 Whether the minimum power information data of number are marked;
Without free space in caching is judged, add up to be used belonging to the minimum power information data of retrieval number of times in caching The importance degree at family meets pre-set user importance degree threshold value, and the minimum power information data of accumulative retrieval number of times are not marked in caching When recording a demerit, retained using mark module 214 and add up the minimum power information data of retrieval number of times in caching, terminate retrieval, and marked Add up the minimum power information data of retrieval number of times in note caching;
Without free space in caching is judged, and add up in caching belonging to the minimum power information data of retrieval number of times When the importance degree of user is unsatisfactory for pre-set user importance degree threshold value, using replacement module 216 with power information data are prefetched, replace Add up the minimum power information data of retrieval number of times in caching.
Or, without free space in caching is judged, the minimum power information data of retrieval number of times are added up in caching The importance degree of owning user meets pre-set user importance degree threshold value, and adds up the minimum power information data of retrieval number of times in caching When marked, it is also possible to using replacement module 216 with power information data are prefetched, replace and add up in caching retrieval number of times minimum Power information data.
Because it is by poly- that index sets up module 600 in the power information data searcher that the embodiment of the present invention two is provided The mode of collection index is more in magnanimity power information database according to user's importance degree of user's importance degree tag representation Bar power information data set up database index, so, power information data puts in order in magnanimity power information database Consistent with putting in order for index, i.e., power information data are also according to the suitable of user's importance degree in magnanimity power information database Sequence arrangement, so, if it is judged that the power information data for currently retrieving from magnanimity power information database belong to weight Want user, then the importance degree for coming power information data behind the data is also higher, in order to ensure responsible consumer in next time Speed during retrieval, the embodiment of the present invention two is chosen in magnanimity power information database using module 700 is prefetched, although currently not It is retrieved, but the power information data behind the power information data being retrieved, obtain prefetching data, then will This prefetches power information data write caching, which adds the number of the power information data of the responsible consumer stored in caching Amount, so as in later retrieval, it is ensured that the power information data retrieval speed of responsible consumer.
And, the embodiment of the present invention two is in the power information data in updating caching, it is ensured that the electricity consumption of responsible consumer Information data can retain in the buffer longer time, so can improve responsible consumer in follow-up retrieval use telecommunications The retrieval rate of breath data.
In the description of above-mentioned embodiment, specific features, structure, material or feature can be at any one or many Combine in an appropriate manner in individual embodiment or example.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by the scope of the claims.

Claims (11)

1. a kind of power information data retrieval method, it is characterised in that include:
Step S1:Magnanimity power information database is built using a plurality of power information data;Count the accumulative of power information data Retrieval number of times, the power information data for meeting accumulative retrieval threshold using accumulative retrieval number of times build caching;
Step S2:According to retrieval request, the power information data corresponding with retrieval request are searched in the buffer;
Step S3:If not finding the power information data corresponding with retrieval request in the buffer, according to retrieval request, The power information data corresponding with retrieval request are searched in magnanimity power information database.
2. power information data retrieval method according to claim 1, it is characterised in that step S1 also includes:
By way of aggregat ion pheromones, according to user's importance degree of user's importance degree tag representation, according to magnanimity power information number A plurality of power information data according to storehouse set up database index;
Step S2 includes:According to retrieval request, searched in the buffer by database index corresponding with retrieval request Power information data;
In step S3, according to retrieval request, the use corresponding with retrieval request is searched in magnanimity power information database The method of power information data includes:According to retrieval request, by database index search in magnanimity power information database with The corresponding power information data of retrieval request.
3. power information data retrieval method according to claim 2, it is characterised in that by database index in magnanimity Search after the power information data corresponding with retrieval request in power information database, also include:
Step S4:The power information data retrieved from magnanimity power information database write is cached, and according to telecommunications The difference of breath data, the power information data to retrieving from magnanimity power information database are counted, and obtain accumulative inspection Rope number of times.
4. power information data retrieval method according to claim 3, it is characterised in that will be from magnanimity in step S4 The method of the power information data write caching retrieved in power information database includes:
Step S410:Judge whether there is free free space in caching, if it is, proceeding to step S420;If not, proceeding to step S430;
Step S420:The power information data retrieved from magnanimity power information database write is cached;
Step S430:Judge the importance degree for adding up the minimum power information data owning user of retrieval number of times in caching, if full Sufficient pre-set user importance degree threshold value;If it is, proceeding to step S440;If not, proceeding to step S460;
Step S440:Whether marked add up the minimum power information data of retrieval number of times in judging to cache, if it is, proceeding to Step S460;If not, proceeding to step S450;
Step S450:Terminate retrieval, and add up the minimum power information data of retrieval number of times in tag cache;
Step S460:Using the power information data retrieved from magnanimity power information database, replace and add up in caching inspection The minimum power information data of rope number of times.
5. power information data retrieval method according to claim 3, it is characterised in that the power information data retrieval Method also includes:
Step S5:Whether the importance degree of the power information data owning user that judgement is retrieved meets pre-set user importance degree threshold Value;If it is, proceeding to step S6;If not, terminating retrieval;
Step S6:According to database index, choose and the power information data being retrieved are located in magnanimity power information database Power information data afterwards, obtain prefetching power information data;And will prefetch power information data write caching.
6. power information data retrieval method according to claim 5, it is characterised in that power information data will be prefetched and write Entering the method for caching includes:
Step S610:Judge whether there is free free space in caching, if it is, proceeding to step S620;If not, proceeding to step S630;
Step S620:Power information data write caching will be prefetched;
Step S630:Judge the importance degree for adding up the minimum power information data owning user of retrieval number of times in caching, if full Sufficient pre-set user importance degree threshold value, if it is, proceeding to step S640;If not, proceeding to step S660;
Step S640:Whether marked add up the minimum power information data of retrieval number of times in judging to cache, if it is, proceeding to Step S660;If not, proceeding to step S650;
Step S650:Terminate retrieval, and add up the minimum power information data of retrieval number of times in tag cache;
Step S660:Add up the minimum power information data of retrieval number of times in caching using prefetching power information data and replacing.
7. a kind of power information data searcher, it is characterised in that include:Access module, cache module, the first retrieval mould Block, the second retrieval module and control module;The output end of the access module is connected with the input of the second retrieval module, described The output end of cache module is connected with the input of the first retrieval module, and the output end of the control module is retrieved respectively with first The input of the input of module and the second retrieval module is connected;
The access module is used to build magnanimity power information database using a plurality of power information data;
The cache module is used to count the accumulative retrieval number of times of power information data, and using accumulative retrieval number of times accumulative inspection is met The power information data of rope threshold value build caching;
The control module is used to send the first control instruction;
The first retrieval module is used under the control of the first control instruction, according to retrieval request, searches in the buffer and inspection Rope asks corresponding power information data;
When the control module is additionally operable to not find in the buffer the power information data corresponding with retrieval request, is sent Two control instructions;
The second retrieval module is used under the control of the second control instruction, according to retrieval request, in magnanimity power information number According to the power information data corresponding with retrieval request of lookup in storehouse.
8. power information data searcher according to claim 7, it is characterised in that the power information data retrieval Device also sets up module including index;The input that the output end of the access module sets up module with the index is connected, institute State index and set up the output end of module and be connected with the input of the first retrieval module and the input of the second retrieval module respectively;
The index sets up module for by way of aggregat ion pheromones, the user according to user's importance degree tag representation to be important Degree, a plurality of power information data in magnanimity power information database set up database index;
The first retrieval module is used for according to retrieval request, is searched in the buffer by database index relative with retrieval request The power information data answered;
The second retrieval module is used for according to retrieval request, is searched in magnanimity power information database by database index The power information data corresponding with retrieval request.
9. power information data searcher according to claim 8, it is characterised in that the cache module includes caching Writing module, counting module and caching build module, the output end of the second retrieval module and the input of caching writing module End is connected, and the output end of the caching writing module builds respectively the input of module and the input phase of counting module with caching Even, the output end of the caching structure module is connected with the input of the described first retrieval module;
The caching writing module is used to be searched and retrieval request phase in magnanimity power information database by database index After corresponding power information data, the power information data retrieved from magnanimity power information database write is cached;
The caching builds module to be used to utilize the power information data structure retrieved from magnanimity power information database slow Deposit;
The counting module is used for according to the difference of power information data, to the use retrieved from magnanimity power information database Power information data are counted, and obtain accumulative retrieval number of times.
10. power information data searcher according to claim 9, it is characterised in that the caching writing module bag Include space judge module, add module, user's importance degree judge module, marker for judgment module, mark module and replacement module;Institute The output end for stating the second retrieval module is connected with the input of space judge module, the output end difference of the space judge module Be connected with the input and the input of user's importance degree judge module of module is added, user's importance degree judge module it is defeated Go out end be connected with the input of marker for judgment module and the input of replacement module respectively, the marker for judgment module it is defeated Go out end to be connected with the input and the mark module of the replacement module respectively, the output end of the replacement module respectively with delay Deposit build module input be connected with the input of counting module, it is described addition module output end respectively with the count module The input of block and the caching build the input of module and are connected, the output end of the counting module respectively with user's importance degree The input of judge module is connected with the input of replacement module;
The space judge module is used to judge whether there is free free space in caching;
The addition module is used for when being free free space in judging caching, and the power information data being retrieved write is slow Deposit;
User's importance degree judge module is used for when not having free space in judging caching, judges to add up retrieval in caching Whether the importance degree of the minimum power information data owning user of number of times meets pre-set user importance degree threshold value;
The marker for judgment module is used to judge no free space in caching is judged, and accumulative retrieval time in caching When the importance degree of the minimum power information data owning user of number meets pre-set user importance degree threshold value, judge to add up inspection in caching Whether the minimum power information data of rope number of times are marked;
The mark module is used in caching is judged without free space, and what accumulative retrieval number of times was minimum in caching uses telecommunications The importance degree of breath data owning user meets pre-set user importance degree threshold value, and add up in caching retrieval number of times it is minimum use telecommunications When the affiliated power information data of breath data are not marked, retain and add up the minimum power information data of retrieval number of times in caching, And add up to retrieve the minimum power information data of number of times in tag cache;
Judge cache in without free space and cache in add up retrieval number of times minimum power information data owning user Importance degree when being unsatisfactory for pre-set user importance degree threshold value, or, without free space in caching is judged, inspection is added up in caching The importance degree of the minimum power information data owning user of rope number of times meets pre-set user importance degree threshold value, and adds up inspection in caching When the minimum affiliated power information data of power information data of rope number of times are marked, the replacement module is used for using from magnanimity The power information data retrieved in power information database, replace and add up the minimum power information number of retrieval number of times in caching According to.
11. power information data searchers according to claim 10, it is characterised in that the power information data inspection Rope device also includes prefetching module;The output end of the second retrieval module is connected with the input for prefetching module, described The output end for prefetching module is connected with the input of the space judge module;
The module that prefetches is used to meet pre-set user in the importance degree of the power information data owning user for judging to retrieve During importance degree threshold value, according to database index, choose and the power information number being retrieved is located in magnanimity power information database Power information data according to after, obtain prefetching power information data;
The addition module is additionally operable to when being free free space in judging caching, will prefetch power information data write caching;
Judge cache in without free space and cache in add up retrieval number of times minimum power information data owning user Importance degree when being unsatisfactory for pre-set user importance degree threshold value, or, without free space in caching is judged, inspection is added up in caching The importance degree of the minimum power information data owning user of rope number of times meets pre-set user importance degree threshold value, and adds up inspection in caching When the minimum affiliated power information data of power information data of rope number of times are marked, the replacement module is additionally operable to utilize and prefetches Power information data are replaced and add up the minimum power information data of retrieval number of times in caching.
CN201610957950.2A 2016-10-27 2016-10-27 Electricity information data retrieving method and device Pending CN106649544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610957950.2A CN106649544A (en) 2016-10-27 2016-10-27 Electricity information data retrieving method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610957950.2A CN106649544A (en) 2016-10-27 2016-10-27 Electricity information data retrieving method and device

Publications (1)

Publication Number Publication Date
CN106649544A true CN106649544A (en) 2017-05-10

Family

ID=58820741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610957950.2A Pending CN106649544A (en) 2016-10-27 2016-10-27 Electricity information data retrieving method and device

Country Status (1)

Country Link
CN (1) CN106649544A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377622A (en) * 2019-06-19 2019-10-25 深圳新度博望科技有限公司 Data capture method, data retrieval method and request responding method
CN111241037A (en) * 2020-01-17 2020-06-05 广州欧赛斯信息科技有限公司 Subject evaluation platform-based mass data importing method
CN113806408A (en) * 2021-09-27 2021-12-17 济南浪潮数据技术有限公司 Data caching method, system, equipment and storage medium
CN117312480A (en) * 2023-10-24 2023-12-29 广东广信通信服务有限公司 Knowledge base updating and optimizing method and system based on multiple fields

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110074A (en) * 2007-01-30 2008-01-23 浪潮乐金信息系统有限公司 Data speedup query method based on file system caching
CN101604334A (en) * 2008-11-18 2009-12-16 北京美智医疗科技有限公司 A kind of medical image database search method and searching system based on caching technology
CN202906977U (en) * 2012-06-15 2013-04-24 中国电力科学研究院 A storage access system of electric energy using efficiency data
CN103810300A (en) * 2014-03-10 2014-05-21 北京国双科技有限公司 Method and device for inquiring non-index coverage data
CN105975638A (en) * 2016-06-23 2016-09-28 中国民航大学 NoSQL-based massive small file storage structure for aviation logistics and storage method of NoSQL-based massive small file storage structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110074A (en) * 2007-01-30 2008-01-23 浪潮乐金信息系统有限公司 Data speedup query method based on file system caching
CN101604334A (en) * 2008-11-18 2009-12-16 北京美智医疗科技有限公司 A kind of medical image database search method and searching system based on caching technology
CN202906977U (en) * 2012-06-15 2013-04-24 中国电力科学研究院 A storage access system of electric energy using efficiency data
CN103810300A (en) * 2014-03-10 2014-05-21 北京国双科技有限公司 Method and device for inquiring non-index coverage data
CN105975638A (en) * 2016-06-23 2016-09-28 中国民航大学 NoSQL-based massive small file storage structure for aviation logistics and storage method of NoSQL-based massive small file storage structure

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
汤小丹,梁红兵,哲凤屏,汤子瀛: "《计算机操作系统》", 31 May 2007, 西安电子科学技术大学出版社 *
洪运国: "《SQL Server 2012数据库管理教程》", 31 December 2013, 航空工业出版社 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377622A (en) * 2019-06-19 2019-10-25 深圳新度博望科技有限公司 Data capture method, data retrieval method and request responding method
CN111241037A (en) * 2020-01-17 2020-06-05 广州欧赛斯信息科技有限公司 Subject evaluation platform-based mass data importing method
CN113806408A (en) * 2021-09-27 2021-12-17 济南浪潮数据技术有限公司 Data caching method, system, equipment and storage medium
CN117312480A (en) * 2023-10-24 2023-12-29 广东广信通信服务有限公司 Knowledge base updating and optimizing method and system based on multiple fields

Similar Documents

Publication Publication Date Title
CN106649544A (en) Electricity information data retrieving method and device
CN101447940B (en) Method and device for updating access control list rules
CN104978627B (en) A kind of method of electric power acquisition terminal update internal electric energy table archives
CN107515901A (en) A kind of chain type daily record storage organization and its Hash Index Structure, data manipulation method and server, medium
CN108920616A (en) A kind of metadata access performance optimization method, system, device and storage medium
CN106021128B (en) A kind of data pre-fetching device and its forecasting method based on stride and data dependence
CN105989076A (en) Data statistical method and device
CN101944068A (en) Performance optimization method for sharing cache
CN109772753B (en) Power battery sorting system and method
CN105740445A (en) Database query method and device
KR940004436A (en) Method and apparatus for preempting and naming a command at high speed using a preemptive predictive annotation
CN111942209B (en) Battery pack storing and taking method, system, medium and charging and replacing station
CN108875064A (en) OpenFlow multidimensional data matched and searched method based on FPGA
CN103813279A (en) Junk short message detecting method and device
CN108596785A (en) Processing method, device, computer equipment and the storage medium of power equipment data
CN109726205A (en) A kind of power system security stability analysis data-storage system and storage method
CN109657070B (en) Construction method of terminal-assisted SWOT index system
CN104361009B (en) A kind of real time indexing method based on inverted index
CN102354301B (en) Cache partitioning method
CN103150326A (en) Skyline query method orienting to probability data flow
CN106530685A (en) Traffic data short-term prediction method and device
CN103530298A (en) Information searching method and device
CN104239447A (en) Power-grid big time series data storage method
CN110765074B (en) Method and system for quickly accessing electric load curve data of acquisition terminal
CN103455491A (en) Method and device for classifying search terms

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510