CN111914155A - Query conversion system and method based on keyword matching - Google Patents

Query conversion system and method based on keyword matching Download PDF

Info

Publication number
CN111914155A
CN111914155A CN202010783506.XA CN202010783506A CN111914155A CN 111914155 A CN111914155 A CN 111914155A CN 202010783506 A CN202010783506 A CN 202010783506A CN 111914155 A CN111914155 A CN 111914155A
Authority
CN
China
Prior art keywords
query
service
request
monitoring
keyword
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
CN202010783506.XA
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.)
Nanjing Litongda Electrical Technology Co ltd
Original Assignee
Nanjing Litongda Electrical 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 Nanjing Litongda Electrical Technology Co ltd filed Critical Nanjing Litongda Electrical Technology Co ltd
Priority to CN202010783506.XA priority Critical patent/CN111914155A/en
Publication of CN111914155A publication Critical patent/CN111914155A/en
Pending legal-status Critical Current

Links

Images

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/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • 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/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a query conversion system and a query conversion method based on keyword matching, which relate to the technical field of electric power and comprise that a client initiates a fuzzy query request to initiate a query, a service query server matches a preset service query rule based on decomposed keywords, converts the fuzzy query request into an accurate query statement, executes the query through an execution module, and arranges and outputs the obtained query result to the client.

Description

Query conversion system and method based on keyword matching
Technical Field
The invention relates to the technical field of electric power, in particular to a query conversion system and a query conversion method based on keyword matching.
Background
Data objects stored by the power equipment operation monitoring equipment usually comprise multiple monitoring types, different values are represented in parameter attributes of the multiple monitoring types, and the different values comprise remote signaling parameters such as state marks and the like, various numerical remote monitoring parameters and the like. Therefore, when the application client initiates a query request to the monitoring cloud platform, different query conditions must be set in the query request for a plurality of monitoring types to be queried and parameter attributes thereof, so that the monitoring cloud platform can search for data objects meeting the conditions according to the query conditions in the query request and return query results to the monitoring application client.
Because the query request sent by the monitoring client must include detailed information of each parameter and attribute item of the monitored equipment, the query mode is tedious and inflexible, and the requirement of customizing fuzzy query by the monitoring client according to the requirement cannot be met; various monitoring parameters and attribute items of the monitored equipment are numerous, and the monitoring parameters and attribute items of different types of monitored equipment are different, so that the method for realizing query by the monitoring client is extremely complex, and the complexity of the monitoring client is improved; in addition, the characteristics of the online monitoring data model and the system implementation of the power equipment lead to a complex data storage mode, real-time memory data and various data sources such as a physical library and a historical filing database, the data are respectively stored according to time, equipment, monitoring types (remote signaling, remote monitoring and the like), parameters and other granularities, and the complexity of data query implementation is increased.
Disclosure of Invention
The invention aims to provide a query conversion system based on keyword matching and a method thereof, which solve the technical problem of rapidly querying the quantity and types of various monitoring parameters through fuzzy query.
In order to achieve the purpose, the invention adopts the following technical scheme:
a query conversion system based on keyword matching comprises a client, a service query server and a service database server, wherein the client, the service query server and the service database server are communicated through the Internet;
establishing a service query rule database, a query request conversion module, a query request execution module and a query result output module in a service query server, wherein the service query rule database is used for storing service query rules;
the query request conversion module is used for receiving the fuzzy query request transmitted by the client, decomposing the keywords and the query logic connectors of the fuzzy query request and generating an accurate query statement;
the query request execution module is used for calling data in the service database server according to the accurate query statement and constructing a query result set;
and the query result output module is used for merging the query results constructed by the query request execution module and sending the merged query results to the client.
Preferably, the service query rule is a preconfigured rule, and the service query rule includes a query rule corresponding to a configured query service type, a data source corresponding to a query service, a data object, and a query condition configuration.
Preferably, the service query server is a distributed server cluster, and the service query rule database, the query request conversion module, the query request execution module, and the query result output module are deployed in different servers.
Preferably, the query request conversion module comprises a query request decomposition unit, a service query rule matching unit and a query statement generation unit, wherein the query request decomposition unit is used for decomposing the fuzzy query request and processing the fuzzy query request by decomposing keywords and query logic connectors;
the service query rule matching unit is used for matching the keywords with the service query rules to generate accurate query keywords;
the query sentence generating unit is used for synthesizing the precise query key words into the precise query sentences.
A query conversion method based on keyword matching comprises the following steps:
step 1: establishing the query conversion system based on keyword matching;
step 2: a user sends a fuzzy query request to a service query server through a client, wherein the fuzzy query request comprises a query statement input by the user;
and step 3: the query request conversion module receives a fuzzy query request;
the query request decomposition unit is used for decomposing the keywords, the query values and the query logical connectors of the fuzzy query request to obtain all the keywords, the query values and the query logical connectors;
and 4, step 4: the business query rule matching unit calls the business query rules in the business query rule database and matches each keyword, and the specific steps are as follows:
step S1: obtaining a keyword A;
step S2: comparing the business query rules, and searching a monitoring parameter item corresponding to the keyword A in the business query rules;
step S3: determining specific parameter item and query condition values according to the monitoring parameter item corresponding to the keyword A and the value corresponding to the keyword A;
step S4: judging whether business query rule matching is carried out on all the decomposed keywords or not, and determining corresponding parameter items and query condition values: if yes, go to step S5; if not, acquiring a next keyword, and executing the step S2;
and 5: the query sentence generating unit traverses the query logic connectors and connects the parameter items corresponding to all the keywords obtained in the step (4) with the query condition values to generate an accurate query sentence;
step 6: the query request execution module calls the accurate query statement and executes query processing on the accurate query statement, and the method specifically comprises the following steps:
step A1: acquiring a first monitoring data source according to the accurate query statement;
step A2: constructing a data query request command, calling a service database server to execute query, and storing a query result;
step A3: judging whether the query statement is executed on all data sources in the accurate query statement: if yes, go to step A4; if not, acquiring the next monitoring data source according to the accurate query statement, and executing the step A2;
step A4: and combining the query results to generate a query result set, and returning the query result set to the client.
Preferably, the keyword includes a monitoring object, a monitoring type, a query type, query time and a monitoring device number, and the query value includes a query time range and a monitoring device number range.
The invention relates to a query conversion system based on keyword matching and a method thereof, which solve the technical problem of rapidly querying the quantity and types of various monitoring parameters through fuzzy query, convert the fuzzy query description into the query statement matched accurately based on the query rule of the keyword matching service, reduce the complexity of the realization of a client, decouple the realization of the client from the specific query service, and meet the flexible and changeable query service requirements of the online monitoring of power equipment; by automatically adapting to multiple data sources through the service query type, the platform architecture is more flexible, distributed data storage and query are supported, and the performance and expandability of the platform are greatly improved.
Drawings
FIG. 1 is a system architecture diagram of the present invention;
FIG. 2 is a data flow diagram of the present invention;
FIG. 3 is a main flow diagram of the present invention;
FIG. 4 is a flow chart of steps 4 and 5 of the present invention;
FIG. 5 is a detailed flow chart of step 4 of the present invention;
FIG. 6 is a flow chart of step 6 of the present invention;
FIG. 7 is a schematic diagram of a storage format of the monitored object data of the present invention;
fig. 8 is a schematic diagram of a storage format of monitored object data of the transformer according to the present embodiment.
Detailed Description
Example 1:
a query conversion system based on keyword matching as shown in fig. 1-8 includes a client, a service query server and a service database server, which communicate with each other via internet;
establishing a service query rule database, a query request conversion module, a query request execution module and a query result output module in a service query server, wherein the service query rule database is used for storing service query rules;
the query request conversion module is used for receiving the fuzzy query request transmitted by the client, decomposing the keywords and the query logic connectors of the fuzzy query request and generating an accurate query statement;
the query request execution module is used for calling data in the service database server according to the accurate query statement and constructing a query result set;
and the query result output module is used for merging the query results constructed by the query request execution module and sending the merged query results to the client.
Preferably, the service query rule is a preconfigured rule, and the service query rule includes a query rule corresponding to a configured query service type, a data source corresponding to a query service, a data object, and a query condition configuration.
Preferably, the service query server is a distributed server cluster, and the service query rule database, the query request conversion module, the query request execution module, and the query result output module are deployed in different servers.
Preferably, the query request conversion module comprises a query request decomposition unit, a service query rule matching unit and a query statement generation unit, wherein the query request decomposition unit is used for decomposing the fuzzy query request and processing the fuzzy query request by decomposing keywords and query logic connectors;
the service query rule matching unit is used for matching the keywords with the service query rules to generate accurate query keywords;
the query sentence generating unit is used for synthesizing the precise query key words into the precise query sentences.
In this embodiment, as shown in fig. 7 and 8, the service database server is configured to store monitoring object data for operating the power device, where a monitoring object data storage structure is a multi-layer structure, and a monitoring object is taken as a root, where multiple monitoring types, that is, a set of monitoring parameter items, exist, and each monitoring type corresponds to one table in the database. Each monitoring parameter item corresponds to data collected by one monitoring device, and the data comprises a name, a data type, a value range, a collected value and the like, namely, the data corresponds to fields in a table. The transformer operation monitoring examples comprise partial discharge, vibration, gas in oil and other monitoring types, each monitoring type comprises a group of monitoring parameter items, and as shown in table 1, partial discharge monitoring comprises discharge times, discharge amplitude, peak value, average value and the like.
Figure BDA0002621061230000051
TABLE 1
The invention configures an inquiry rule for the monitoring parameter item of each service inquiry type, and obtains corresponding parameter codes, types and legal value ranges through matching of key information such as monitoring objects, monitoring types, monitoring parameter names and the like, so as to construct accurate inquiry conditions.
Example 2:
a query conversion method based on keyword matching as described in embodiment 2 shown in fig. 1-8 is implemented on the basis of the query conversion system based on keyword matching as described in embodiment 1, and includes the following steps:
step 1: establishing the query conversion system based on keyword matching;
step 2: a user sends a fuzzy query request to a service query server through a client, wherein the fuzzy query request comprises a query statement input by the user;
the fuzzy query request comprises the following contents:
monitoring object, monitoring type, service query type, query time range-start time, query time range-end time, monitoring object id and fuzzy query description.
Such as: monitoring the object: a transformer;
and (3) monitoring type: partial discharge;
and (3) service query type: a daily report;
query time range-start time: 2020-01-01;
query time range-end time: empty;
monitoring object id: TF 0101;
fuzzy query description: the amplitude: > 30& peak: > -20, i.e., the amplitude is greater than-30 dBm and the peak is greater than or equal to-20 dBm.
And step 3: the query request conversion module receives a fuzzy query request;
the query request decomposition unit is used for decomposing the keywords, the query values and the query logical connectors of the fuzzy query request to obtain all the keywords, the query values and the query logical connectors;
and 4, step 4: the business query rule matching unit calls the business query rules in the business query rule database and matches each keyword, and the specific steps are as follows:
step S1: obtaining a keyword A;
step S2: comparing the business query rules, and searching a monitoring parameter item corresponding to the keyword A in the business query rules;
step S3: determining specific parameter item and query condition values according to the monitoring parameter item corresponding to the keyword A and the value corresponding to the keyword A;
step S4: judging whether business query rule matching is carried out on all the decomposed keywords or not, and determining corresponding parameter items and query condition values: if yes, go to step S5; if not, acquiring a next keyword, and executing the step S2;
in this embodiment, the service query rule specifically includes a monitoring object, a monitoring type, a database table name, a data source, and a plurality of monitoring parameter lists, where the monitoring parameter lists include monitoring parameter names, corresponding database storage column names, normal value ranges, and value types;
such as: monitoring the object: a transformer;
and (3) monitoring type: partial discharge;
database table name: t _ MON _ TF _ JF, i.e., in which table data is stored in the database;
a data source: LTD6000, the specific equipment number of the collected data;
a monitoring parameter list 1, a monitoring parameter list 2, a monitoring parameter list 3 and the like;
the list of monitoring parameters includes:
monitoring parameter names: the number of discharges;
the corresponding database stores column names: FREQUENCY, i.e., the name of the memory column;
normal value range: [0,3), specific data;
value type: int, the type of data employed.
And 5: the query sentence generating unit traverses the query logic connectors and connects the parameter items corresponding to all the keywords obtained in the step (4) with the query condition values to generate an accurate query sentence;
the exact query statement generated as in this embodiment is in the following format:
SELECT*FROM T_MON_TF_JF WHERE DEVICEID IN(‘TF0101’)AND MONTIME>=‘2020-01-01’AND AMPLITUDE>-30AND PEAK>=-20;
SELECT FROM is the name of the database table; WHERE DEVICEID IN is the monitored object id; AND is a query logical connector; MONTIME is the query time range; AMPLITUDE is a fuzzy query description.
Step 6: the query request execution module calls the accurate query statement and executes query processing on the accurate query statement, and the method specifically comprises the following steps:
step A1: acquiring a first monitoring data source according to the accurate query statement;
step A2: constructing a data query request command, calling a service database server to execute query, and storing a query result;
step A3: judging whether the query statement is executed on all data sources in the accurate query statement: if yes, go to step A4; if not, acquiring the next monitoring data source according to the accurate query statement, and executing the step A2;
step A4: and combining the query results to generate a query result set, and returning the query result set to the client.
Preferably, the keyword includes a monitoring object, a monitoring type, a query type, query time and a monitoring device number, and the query value includes a query time range and a monitoring device number range.
The invention relates to a query conversion system based on keyword matching and a method thereof, which solve the technical problem of rapidly querying the quantity and types of various monitoring parameters through fuzzy query, convert the fuzzy query description into the query statement matched accurately based on the query rule of the keyword matching service, reduce the complexity of the realization of a client, decouple the realization of the client from the specific query service, and meet the flexible and changeable query service requirements of the online monitoring of power equipment; by automatically adapting to multiple data sources through the service query type, the platform architecture is more flexible, distributed data storage and query are supported, and the performance and expandability of the platform are greatly improved.

Claims (6)

1. A query conversion system based on keyword matching is characterized in that: the system comprises a client, a service query server and a service database server, wherein the client, the service query server and the service database server are communicated through the Internet;
establishing a service query rule database, a query request conversion module, a query request execution module and a query result output module in a service query server, wherein the service query rule database is used for storing service query rules;
the query request conversion module is used for receiving the fuzzy query request transmitted by the client, decomposing the keywords and the query logic connectors of the fuzzy query request and generating an accurate query statement;
the query request execution module is used for calling data in the service database server according to the accurate query statement and constructing a query result set;
and the query result output module is used for merging the query results constructed by the query request execution module and sending the merged query results to the client.
2. A query conversion system based on keyword matching as claimed in claim 1, characterized in that: the service query rule is a preset rule, and the service query rule comprises a query rule corresponding to a configured query service type, a data source corresponding to a query service, a data object and a query condition configuration.
3. A query conversion system based on keyword matching as claimed in claim 1, characterized in that: the service query server is a distributed server cluster, and the service query rule database, the query request conversion module, the query request execution module and the query result output module are deployed in different servers.
4. A query conversion system based on keyword matching as claimed in claim 1, characterized in that: the query request conversion module comprises a query request decomposition unit, a service query rule matching unit and a query statement generation unit, wherein the query request decomposition unit is used for decomposing the fuzzy query request and processing the fuzzy query request by decomposing key words and query logic connectors;
the service query rule matching unit is used for matching the keywords with the service query rules to generate accurate query keywords;
the query sentence generating unit is used for synthesizing the precise query key words into the precise query sentences.
5. A query conversion method based on keyword matching is characterized in that: the method comprises the following steps:
step 1: establishing the query conversion system based on keyword matching;
step 2: a user sends a fuzzy query request to a service query server through a client, wherein the fuzzy query request comprises a query statement input by the user;
and step 3: the query request conversion module receives a fuzzy query request;
the query request decomposition unit is used for decomposing the keywords, the query values and the query logical connectors of the fuzzy query request to obtain all the keywords, the query values and the query logical connectors;
and 4, step 4: the business query rule matching unit calls the business query rules in the business query rule database and matches each keyword, and the specific steps are as follows:
step S1: obtaining a keyword A;
step S2: comparing the business query rules, and searching a monitoring parameter item corresponding to the keyword A in the business query rules;
step S3: determining specific parameter item and query condition values according to the monitoring parameter item corresponding to the keyword A and the value corresponding to the keyword A;
step S4: judging whether business query rule matching is carried out on all the decomposed keywords or not, and determining corresponding parameter items and query condition values: if yes, go to step S5; if not, acquiring a next keyword, and executing the step S2;
and 5: the query sentence generating unit traverses the query logic connectors and connects the parameter items corresponding to all the keywords obtained in the step (4) with the query condition values to generate an accurate query sentence;
step 6: the query request execution module calls the accurate query statement and executes query processing on the accurate query statement, and the method specifically comprises the following steps:
step A1: acquiring a first monitoring data source according to the accurate query statement;
step A2: constructing a data query request command, calling a service database server to execute query, and storing a query result;
step A3: judging whether the query statement is executed on all data sources in the accurate query statement: if yes, go to step A4; if not, acquiring the next monitoring data source according to the accurate query statement, and executing the step A2;
step A4: and combining the query results to generate a query result set, and returning the query result set to the client.
6. A query conversion system based on keyword matching as claimed in claim 1, characterized in that: the keywords comprise monitoring objects, monitoring types, query time and monitoring equipment numbers, and the query values comprise query time ranges and monitoring equipment number ranges.
CN202010783506.XA 2020-08-06 2020-08-06 Query conversion system and method based on keyword matching Pending CN111914155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010783506.XA CN111914155A (en) 2020-08-06 2020-08-06 Query conversion system and method based on keyword matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010783506.XA CN111914155A (en) 2020-08-06 2020-08-06 Query conversion system and method based on keyword matching

Publications (1)

Publication Number Publication Date
CN111914155A true CN111914155A (en) 2020-11-10

Family

ID=73287955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010783506.XA Pending CN111914155A (en) 2020-08-06 2020-08-06 Query conversion system and method based on keyword matching

Country Status (1)

Country Link
CN (1) CN111914155A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851700A (en) * 2005-11-01 2006-10-25 华为技术有限公司 Inquiry method and system, and inquiry switching device
CN109766354A (en) * 2018-12-04 2019-05-17 北京辰森世纪科技股份有限公司 Optimization method, device and the equipment of business datum inquiry
CN110489445A (en) * 2019-08-02 2019-11-22 四川宏力信息科技有限责任公司 It is a kind of based on polymorphic compound mass data method for quickly querying

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851700A (en) * 2005-11-01 2006-10-25 华为技术有限公司 Inquiry method and system, and inquiry switching device
CN109766354A (en) * 2018-12-04 2019-05-17 北京辰森世纪科技股份有限公司 Optimization method, device and the equipment of business datum inquiry
CN110489445A (en) * 2019-08-02 2019-11-22 四川宏力信息科技有限责任公司 It is a kind of based on polymorphic compound mass data method for quickly querying

Similar Documents

Publication Publication Date Title
US11573948B2 (en) Predictive determination of constraint data for application with linked data in graph-based datasets associated with a data-driven collaborative dataset platform
US11238109B2 (en) Computerized tools configured to determine subsets of graph data arrangements for linking relevant data to enrich datasets associated with a data-driven collaborative dataset platform
US11971898B2 (en) Method and system for implementing machine learning classifications
US7987163B2 (en) Apparatus and method for dynamic web service discovery
CN108989397B (en) Data recommendation method and device and storage medium
CN111563385B (en) Semantic processing method, semantic processing device, electronic equipment and medium
US20080040510A1 (en) Web services broker and method of using same
US11775767B1 (en) Systems and methods for automated iterative population of responses using artificial intelligence
CN110019712A (en) More intent query method and apparatus, computer equipment and computer readable storage medium
US10642897B2 (en) Distance in contextual network graph
CN111708805A (en) Data query method and device, electronic equipment and storage medium
CN112328741A (en) Intelligent association reply method and device based on artificial intelligence and computer equipment
CN114138997A (en) Computer-implemented system and method with digital twinning and graph-based structure
CN110888672A (en) Metadata architecture-based expression engine implementation method and system
CN111914155A (en) Query conversion system and method based on keyword matching
CN110019714A (en) More intent query method, apparatus, equipment and storage medium based on historical results
CN117215540A (en) Code generation method, device and system of remote procedure call framework
CN107436919B (en) Cloud manufacturing standard service modeling method based on ontology and BOSS
Shafi et al. [WiP] Web Services Classification Using an Improved Text Mining Technique
CN111680508B (en) Text processing method and device
EP3764243B1 (en) An industrial information identification and retrieval system
CN114648121A (en) Data processing method and device, electronic equipment and storage medium
EP2318956A1 (en) Apparatus and method for searching information
WO2009096979A1 (en) Use of associate memory learning agent technology to identify interchangeable parts in parts catalog
JP2015156103A (en) Telegram conversion system and telegram conversion method in m2m

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

Application publication date: 20201110

RJ01 Rejection of invention patent application after publication