CN111984673A - Fuzzy retrieval method and device for tree structure of power grid electric energy metering system - Google Patents

Fuzzy retrieval method and device for tree structure of power grid electric energy metering system Download PDF

Info

Publication number
CN111984673A
CN111984673A CN202010834998.0A CN202010834998A CN111984673A CN 111984673 A CN111984673 A CN 111984673A CN 202010834998 A CN202010834998 A CN 202010834998A CN 111984673 A CN111984673 A CN 111984673A
Authority
CN
China
Prior art keywords
node
primary key
pinyin
memory bank
fuzzy
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.)
Granted
Application number
CN202010834998.0A
Other languages
Chinese (zh)
Other versions
CN111984673B (en
Inventor
王国际
仲春林
方超
刘述波
姚鹏
姜宇轩
崔强
郑安宁
张凡
王子涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Fangtian Power Technology Co Ltd
Original Assignee
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Fangtian Power Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Jiangsu Electric Power Co Ltd, Jiangsu Fangtian Power Technology Co Ltd filed Critical State Grid Jiangsu Electric Power Co Ltd
Priority to CN202010834998.0A priority Critical patent/CN111984673B/en
Publication of CN111984673A publication Critical patent/CN111984673A/en
Application granted granted Critical
Publication of CN111984673B publication Critical patent/CN111984673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/243Natural language query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Automation & Control Theory (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a fuzzy retrieval method and a fuzzy retrieval device for a tree structure of a power grid electric energy metering system, wherein the fuzzy retrieval method comprises the following steps: dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time; acquiring all node tree structure data from a relational database of a power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data; converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value; comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form; and responding to the fact that a certain matched node is selected, and displaying the selected node and a father node thereof layer by layer. The invention can quickly carry out fuzzy retrieval.

Description

Fuzzy retrieval method and device for tree structure of power grid electric energy metering system
Technical Field
The invention relates to the technical field of power grid electric energy metering, in particular to a fuzzy retrieval method and device for a tree structure of a power grid electric energy metering system.
Background
The electric energy metering system of the power grid has a large number of tree node types, such as area tree nodes, plant station tree nodes, metering point tree nodes, voltage level tree nodes, equipment type tree nodes, transformer tree nodes, winding tree nodes, line segment tree nodes, circuit breaker tree nodes, collecting terminal tree nodes, collecting ammeter tree nodes, capacitance reactance device tree nodes, station transformer tree nodes and the like. If the data part of the tree node is loaded, the positioning of a specific tree node becomes difficult; if the knowledge of the tree nodes is not comprehensive enough, the information of all the nodes is recorded incompletely, and the workload of positioning a certain node is large.
In the prior art, under the condition of tree node part loading, a client only knows part of characters of a node name, or knows pronunciation, and cannot quickly position the node position to acquire the electric quantity information of the node under the condition of not determining the content of Chinese characters; therefore, a method for implementing fuzzy search of tree structures is needed, which can quickly locate the node position under the condition that the data of the tree node is partially loaded, and can perform fuzzy location on the tree node by using the initial pinyin or the full pinyin under the condition that the Chinese character memory is fuzzy.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a fuzzy retrieval method and a fuzzy retrieval device for a tree structure of a power grid electric energy metering system, which solve the problem that the node position cannot be quickly positioned and the fuzzy positioning cannot be realized under the condition that the data of the tree nodes is partially loaded.
In order to achieve the above purpose, the invention adopts the following technical scheme: a fuzzy retrieval method for a tree structure of a power grid electric energy metering system comprises the following steps:
dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time;
acquiring all node tree structure data from a relational database of a power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data;
converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value;
comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form;
and responding to the fact that a certain matched node is selected, and displaying the selected node and a father node thereof layer by layer.
Further, the final filtered fuzzy retrieval conditional expression is as follows:
p(k)=K1+K2+K3+...+Kn
in the formula (I), the compound is shown in the specification,p(k)the final filtered fuzzy retrieval condition is obtained; kiThe search conditions after the ith filtering are set to 1-n, and n is the total number of times of filtering of the search conditions.
Further, the storing process includes:
and according to the tree nodes, acquiring the values of the main keys and the corresponding data parts from the memory bank, comparing all the node tree structure data acquired from the relational database with the node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank.
Further, with the primary key as the comparison content, the new primary key in the memory bank is expressed by the formula:
Figure BDA0002639323660000021
in formula (II) p'(r)For new primary keys (keys), p, of banksdAll the node tree structure data obtained from the relational database;
Figure BDA0002639323660000022
primary key values in the repository that do not belong to the relational database,
Figure BDA0002639323660000023
primary key values in the relational database that do not belong to the memory bank.
Further, the comparing the final filtered fuzzy retrieval condition with the primary key value and/or the pinyin primary key value of the memory bank includes:
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, successfully matching;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, successfully matching;
if the fuzzy search condition content has both pinyin and Chinese characters, the fuzzy search condition content is compared with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the search condition and the pinyin primary key value contains the pinyin in the search condition, the matching is successful.
Further, the step of displaying the selected node and its parent node layer by layer in response to a certain retrieved node being selected includes:
responding to the fact that a certain searched node is selected, and obtaining the ID of the selected node;
inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
and loading the tree contents layer by layer according to the spliced node ID, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
A fuzzy retrieval device of a tree structure of a power grid electric energy metering system comprises:
the filtering module is used for dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time;
the storage module is used for acquiring all node tree structure data from a relational database of the power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data; converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value;
the matching module is used for comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form;
and the response positioning module responds to the fact that a certain matched node is selected, and displays the selected node and a father node thereof layer by layer.
Further, the storing process includes:
and according to the tree nodes, acquiring the values of the main keys and the corresponding data parts from the memory bank, comparing all the node tree structure data acquired from the relational database with the node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank.
Further, the comparing the final filtered fuzzy retrieval condition with the primary key value and/or the pinyin primary key value of the memory bank includes:
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, successfully matching;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, successfully matching;
if the fuzzy search condition content has both pinyin and Chinese characters, the fuzzy search condition content is compared with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the search condition and the pinyin primary key value contains the pinyin in the search condition, the matching is successful.
Further, the step of displaying the selected node and its parent node layer by layer in response to a certain retrieved node being selected includes:
responding to the fact that a certain searched node is selected, and obtaining the ID of the selected node;
inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
and loading the tree contents layer by layer according to the spliced node ID, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
The invention achieves the following beneficial effects:
1. according to the invention, all the node tree structure data are stored in the internal memory from the relational database, so that the data retrieval efficiency is improved;
2. the invention solves the problem that the client inputs pinyin initial letters, partial Chinese characters or pinyin full names in a fuzzy matching way under the condition of uncertain full names of tree nodes by a fuzzy retrieval way, then lists the matched contents for the client to select, and then locates the tree nodes, thereby reducing the memory of the user to the contents of the tree nodes;
3. according to the invention, by means of fuzzy retrieval, under the condition that only part of data is loaded in front-end page loading, tree nodes are accurately positioned according to the selection of a user after fuzzy matching, and the cache pressure and the loading speed of a front-end browser are reduced.
Drawings
FIG. 1 is a flow chart of a fuzzy search method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an integrated device navigation tree in accordance with an embodiment of the present invention;
FIG. 3 is a diagram illustrating a search result of an integrated device navigation tree in accordance with an embodiment of the present invention;
fig. 4 is a schematic diagram of step-by-step positioning of nodes of an integrated device navigation tree according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Example 1:
as shown in fig. 1 to 4, a method for implementing fuzzy retrieval of a tree structure of a power grid electric energy metering system includes the following steps:
step 1, a browser input box control acquires a mouse event and dynamically acquires fuzzy retrieval conditions input by a user, the acquired retrieval conditions are screened at regular time (within a set extremely short time), and when input contents cannot be acquired after the set time, final filtered fuzzy retrieval conditions are obtained;
considering that the fuzzy retrieval condition may have contents which are not required by retrieval, such as special characters, blank spaces and the like, the regular expression is used for filtering out the contents which do not meet the condition. The final filtered fuzzy search conditional expression is as follows:
p(k)=K1+K2+K3+...Kn (1)
in the formula, p(k)The final filtered fuzzy retrieval condition is obtained; kiAs search criteria after the ith filtering, K1,K2,K3,., Kn are retrieval conditions after the 1 st to the nth filtration respectively.
Step 2, acquiring all node tree structure data from a relational database of the power grid electric energy metering system, and storing the data into a memory bank (redis) in a mode of a main key and data;
the method comprises the following specific steps: the node tree structure data retrieved from the relational database is stored in the memory bank in the form of key _ value (primary key and data), where key is the name of the node, value is the other field contents of the node,
the storage process comprises the following steps:
according to tree nodes, obtaining values of main keys and corresponding data parts from a memory bank (redis), comparing all node tree structure data obtained from a relational database with node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank (redis);
taking the primary key as the comparison content, the new primary key in the memory bank is represented by formula (2):
Figure BDA0002639323660000061
in formula (II) p'(r)For new primary keys (keys), p, of banksdAll the node tree structure data obtained from the relational database;
Figure BDA0002639323660000062
primary key values in the repository that do not belong to the relational database,
Figure BDA0002639323660000063
primary key values in the relational database that do not belong to the memory bank.
Step 3, the primary key values (p ') in the memory banks obtained in the step 2 are processed'(r)) Converting into pinyin to obtain pinyinA primary key value;
packaging the pinyin syllable table into a one-dimensional array, listing all possible combination conditions, wherein the table is the one-dimensional array; GB2312 coding adopts a 16-bit coding mode for Chinese, and the coding range of simplified Chinese is from B0A1 to F7 FE. If each 8 bits of the code is represented in decimal form as [176|161] to [247|254], then for each chinese character, it can be represented by two values, e.g., "a" is [176|161], and "i" is [206|210 ]; by the method, each Chinese character can be positioned through a two-dimensional coordinate, so that a two-dimensional table is established to realize the corresponding relation between Chinese and pinyin, the index value of the syllable table is stored in the two-dimensional table to correspond to a syllable combination, such as bao, instead of directly storing the syllable combination in a two-dimensional array, and thus, the memory consumption can be effectively reduced. Thus, all values in the two-dimensional array should be index values, e.g., element [176] [161] of the two-dimensional array corresponds to index value 0 of a. It should be noted that, because the amount of characters corresponding to GB2312 is large and the character half-angles do not need to be converted, the class containing nouns omits the whole part of the character half-angles, and therefore its actual value starts from [129|64], i.e. 8140. The pinyin conversion process described above is prior art.
Step 4, comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to a foreground in a list form;
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, considering that the matching is successful;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, determining that the matching is successful;
if the fuzzy retrieval condition content has both pinyin and Chinese characters, comparing the fuzzy retrieval condition content with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the retrieval condition and the pinyin primary key value contains the pinyin in the retrieval condition, determining that the matching is successful;
after matching is successful, displaying the matched node names to the foreground in a list form, specifically:
grouping according to tree node types, and displaying all node names subjected to fuzzy matching in a list mode. As shown in fig. 3;
and 5, responding to the fact that a certain searched node is selected, and displaying the selected node and a father node thereof layer by layer.
The method comprises the following specific steps:
(1) the computer recognizes that one piece of data in a certain retrieved list is selected to obtain the ID of the selected node;
(2) inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
(3) and loading the tree contents layer by layer according to the ID of the splicing node, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
Example 2:
a fuzzy retrieval device of a tree structure of a power grid electric energy metering system comprises:
the filtering module is used for dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time;
the storage module is used for acquiring all node tree structure data from a relational database of the power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data; converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value;
the matching module is used for comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form;
and the response positioning module responds to the fact that a certain matched node is selected, and displays the selected node and a father node thereof layer by layer.
Further, the storing process includes:
and according to the tree nodes, acquiring the values of the main keys and the corresponding data parts from the memory bank, comparing all the node tree structure data acquired from the relational database with the node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank.
Further, the comparing the final filtered fuzzy retrieval condition with the primary key value and/or the pinyin primary key value of the memory bank includes:
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, successfully matching;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, successfully matching;
if the fuzzy search condition content has both pinyin and Chinese characters, the fuzzy search condition content is compared with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the search condition and the pinyin primary key value contains the pinyin in the search condition, the matching is successful.
Further, the step of displaying the selected node and its parent node layer by layer in response to a certain retrieved node being selected includes:
responding to the fact that a certain searched node is selected, and obtaining the ID of the selected node;
inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
and loading the tree contents layer by layer according to the spliced node ID, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
The method has the rapid retrieval capability and is suitable for the rapid fuzzy retrieval of the distribution network organization structure tree.
Aiming at the problems that tree nodes cannot be completely loaded, the tree node types are complex, and the node types which cannot be searched can not be specified by fuzzy search, the node object which needs to be found can be quickly and fuzzily retrieved and positioned, and the tree content is gradually expanded upwards;
the method solves the problem of tree node searching, the data content of the nodes of the tree is not completely loaded, the unloaded content can be searched, the data display efficiency is improved, the use convenience of customers is improved, and the power grid electric energy metering data corresponding to the node positions and the nodes can be quickly found under the condition that the customer memorizes the nodes in a fuzzy manner.
The invention improves the retrieval efficiency, and the node tree structure data is stored in the redis from the relational database, thereby improving the data retrieval efficiency;
under the condition that the client does not determine the full name of the tree node, the client can be positioned to the tree node in a fuzzy manner by means of the first letter of pinyin, the full name of pinyin and the like; in the case of partial loads, the data load of the tree can also be located exactly to any node of the tree.
Example 3:
in the embodiment of the invention, a comprehensive equipment navigation tree test system of a Jiangsu power grid electric energy metering system is adopted, as shown in figure 2. Wherein, the front ends of the nodes of east China, Jiangsu, Shanghai, Zhejiang and the like are loaded successfully, and the data of the child nodes are not loaded; inputting nj in the fuzzy search box, completing the search by the background according to the steps, displaying the search result as shown in fig. 3, selecting node data which can be matched according to the initial, selecting a certain node, such as xu state south suburb change, for example, loading the nodes of the tree step by step from the sequence of father to son, and expanding and positioning to the xu state south suburb change node. As shown in fig. 4, from the illustrated id data, the data represented by the value of its id can be automatically obtained.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A fuzzy retrieval method for a tree structure of a power grid electric energy metering system is characterized by comprising the following steps: the method comprises the following steps:
dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time;
acquiring all node tree structure data from a relational database of a power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data;
converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value;
comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form;
and responding to the fact that a certain matched node is selected, and displaying the selected node and a father node thereof layer by layer.
2. The fuzzy retrieval method for the tree structure of the power grid electric energy metering system according to claim 1, is characterized in that: the final filtered fuzzy search conditional expression is as follows:
p(k)=K1+K2+K3+...+Kn
in the formula, p(k)The final filtered fuzzy retrieval condition is obtained; kiThe search conditions after the ith filtering are set to 1-n, and n is the total number of times of filtering of the search conditions.
3. The fuzzy retrieval method for the tree structure of the power grid electric energy metering system according to claim 1, is characterized in that: the storage process comprises:
and according to the tree nodes, acquiring the values of the main keys and the corresponding data parts from the memory bank, comparing all the node tree structure data acquired from the relational database with the node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank.
4. The fuzzy retrieval method for the tree structure of the power grid electric energy metering system according to claim 3, wherein the fuzzy retrieval method comprises the following steps: taking the main key as the comparison content, the new main key in the memory bank is expressed by a formula as follows:
Figure FDA0002639323650000011
in formula (II) p'(r)For new primary keys (keys), p, of banksdAll the node tree structure data obtained from the relational database;
Figure FDA0002639323650000021
primary key values in the repository that do not belong to the relational database,
Figure FDA0002639323650000022
primary key values in the relational database that do not belong to the memory bank.
5. The fuzzy retrieval method for the tree structure of the power grid electric energy metering system according to claim 1, is characterized in that: the comparing the final filtered fuzzy retrieval condition with the primary key value and/or the pinyin primary key value of the memory bank comprises:
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, successfully matching;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, successfully matching;
if the fuzzy search condition content has both pinyin and Chinese characters, the fuzzy search condition content is compared with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the search condition and the pinyin primary key value contains the pinyin in the search condition, the matching is successful.
6. The fuzzy retrieval method for the tree structure of the power grid electric energy metering system according to claim 1, is characterized in that: the step of responding to the fact that a certain retrieved node is selected and displaying the selected node and a father node thereof layer by layer comprises the following steps:
responding to the fact that a certain searched node is selected, and obtaining the ID of the selected node;
inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
and loading the tree contents layer by layer according to the spliced node ID, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
7. A fuzzy retrieval device of a tree structure of a power grid electric energy metering system is characterized in that: the method comprises the following steps:
the filtering module is used for dynamically acquiring fuzzy retrieval conditions input by a user, regularly filtering the acquired retrieval conditions, and acquiring final filtered fuzzy retrieval conditions after input contents are not acquired after set time;
the storage module is used for acquiring all node tree structure data from a relational database of the power grid electric energy metering system and storing the data into a memory bank in a mode of main keys and data; converting the primary key value in the memory bank into pinyin to obtain a pinyin primary key value;
the matching module is used for comparing the final filtered fuzzy retrieval condition with the primary key values and/or pinyin primary key values of the memory bank, and if the matching is successful, displaying the matched node names to the foreground in a list form;
and the response positioning module responds to the fact that a certain matched node is selected, and displays the selected node and a father node thereof layer by layer.
8. The fuzzy retrieval device of the tree structure of the power grid electric energy metering system according to claim 7, is characterized in that: the storage process comprises:
and according to the tree nodes, acquiring the values of the main keys and the corresponding data parts from the memory bank, comparing all the node tree structure data acquired from the relational database with the node tree structure data in the memory bank, and storing the node tree structure data without the memory bank into the memory bank.
9. The fuzzy retrieval device of the tree structure of the power grid electric energy metering system according to claim 7, is characterized in that: the comparing the final filtered fuzzy retrieval condition with the primary key value and/or the pinyin primary key value of the memory bank comprises:
if the contents of the fuzzy retrieval conditions are all Chinese characters, directly comparing the contents of the fuzzy retrieval conditions with the primary key values of the memory bank, and if the primary key values contain the Chinese characters in the retrieval conditions, successfully matching;
if the fuzzy retrieval condition contents are all pinyin, directly comparing with pinyin primary key values in the memory bank, and if the primary key values contain the pinyin in the retrieval conditions, successfully matching;
if the fuzzy search condition content has both pinyin and Chinese characters, the fuzzy search condition content is compared with the primary key value and the pinyin primary key value of the memory bank, and if the primary key value contains the Chinese characters in the search condition and the pinyin primary key value contains the pinyin in the search condition, the matching is successful.
10. The fuzzy retrieval device of the tree structure of the power grid electric energy metering system according to claim 7, is characterized in that: the step of responding to the fact that a certain retrieved node is selected and displaying the selected node and a father node thereof layer by layer comprises the following steps:
responding to the fact that a certain searched node is selected, and obtaining the ID of the selected node;
inquiring IDs of all father nodes of the selected node in an upward recursion mode through sql inquiry in a relational database of the power grid electric energy metering system, and sequentially splicing the node IDs from father to son;
and loading the tree contents layer by layer according to the spliced node ID, expanding the tree contents layer by layer, and finally positioning the tree contents to the selected node.
CN202010834998.0A 2020-08-19 2020-08-19 Fuzzy retrieval method and device for tree structure of power grid electric energy metering system Active CN111984673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010834998.0A CN111984673B (en) 2020-08-19 2020-08-19 Fuzzy retrieval method and device for tree structure of power grid electric energy metering system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010834998.0A CN111984673B (en) 2020-08-19 2020-08-19 Fuzzy retrieval method and device for tree structure of power grid electric energy metering system

Publications (2)

Publication Number Publication Date
CN111984673A true CN111984673A (en) 2020-11-24
CN111984673B CN111984673B (en) 2022-06-10

Family

ID=73434812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010834998.0A Active CN111984673B (en) 2020-08-19 2020-08-19 Fuzzy retrieval method and device for tree structure of power grid electric energy metering system

Country Status (1)

Country Link
CN (1) CN111984673B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114218900A (en) * 2021-12-23 2022-03-22 国网北京市电力公司 Method, system, device and medium for filling operation ticket of 110kV and below transformer substation
CN115905297A (en) * 2023-01-04 2023-04-04 脉策(上海)智能科技有限公司 Method, apparatus and medium for retrieving data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539433A (en) * 2009-04-28 2009-09-23 北京四维图新科技股份有限公司 Searching method with first letter of pinyin and intonation in navigation system and device thereof
CN102819606A (en) * 2012-08-20 2012-12-12 中国农业银行股份有限公司 Spelling-based information inquiry method and system and server
CN106708814A (en) * 2015-07-16 2017-05-24 威海捷讯通信技术有限公司 Relational database-based retrieval method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539433A (en) * 2009-04-28 2009-09-23 北京四维图新科技股份有限公司 Searching method with first letter of pinyin and intonation in navigation system and device thereof
CN102819606A (en) * 2012-08-20 2012-12-12 中国农业银行股份有限公司 Spelling-based information inquiry method and system and server
CN106708814A (en) * 2015-07-16 2017-05-24 威海捷讯通信技术有限公司 Relational database-based retrieval method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114218900A (en) * 2021-12-23 2022-03-22 国网北京市电力公司 Method, system, device and medium for filling operation ticket of 110kV and below transformer substation
CN114218900B (en) * 2021-12-23 2024-02-20 国网北京市电力公司 110kV and below transformer substation operation ticket filling method, system, device and medium
CN115905297A (en) * 2023-01-04 2023-04-04 脉策(上海)智能科技有限公司 Method, apparatus and medium for retrieving data
CN115905297B (en) * 2023-01-04 2023-12-15 脉策(上海)智能科技有限公司 Method, apparatus and medium for retrieving data

Also Published As

Publication number Publication date
CN111984673B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN110795455A (en) Dependency relationship analysis method, electronic device, computer device and readable storage medium
CN112579155B (en) Code similarity detection method and device and storage medium
CN110532347B (en) Log data processing method, device, equipment and storage medium
CN111984673B (en) Fuzzy retrieval method and device for tree structure of power grid electric energy metering system
CN101477555B (en) Fast retrieval and generation display method for task tree based on SQL database
CN102867049A (en) Chinese PINYIN quick word segmentation method based on word search tree
CN108776678A (en) Index creation method and device based on mobile terminal NoSQL databases
CN111813744A (en) File searching method, device, equipment and storage medium
CN115757629A (en) Multi-source heterogeneous data increment synchronization method and system, storage medium and electronic equipment
CN104636401A (en) Data rollback method and device for SCADA system
JP5780036B2 (en) Extraction program, extraction method and extraction apparatus
US8463799B2 (en) System and method for consolidating search engine results
JPH09212353A (en) Method and device for supporting reused design
CN113297251A (en) Multi-source data retrieval method, device, equipment and storage medium
CN116303628B (en) Alarm data query method, system and equipment based on elastic search
CN106776590A (en) A kind of method and system for obtaining entry translation
CN115757479A (en) Database query optimization method, machine-readable storage medium and computer device
CN111143356B (en) Report retrieval method and device
CN108536819B (en) Method, device, server and storage medium for comparing integer column and character string
CN109785099B (en) Method and system for automatically processing service data information
CN112380445A (en) Data query method, device, equipment and storage medium
CN110633430B (en) Event discovery method, apparatus, device, and computer-readable storage medium
CN111275409A (en) Power grid overhaul audit data processing system and processing method
CN111078683A (en) Interpolation search-based power grid ledger data filling and counting method and device
CN115168399B (en) Data processing method, device and equipment based on graphical interface and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant