Data retrieval method and device, electronic equipment and storage medium
Through automated data retrieval methods, the historical experience data of nuclear power plants are quickly retrieved using word segmentation and indexing technology, solving the problems of low manual search efficiency and underutilization of data value, and ensuring the safe operation of nuclear power plants.
Patent Information
- Application Number
- CN202411557435.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the historical experience data retrieval of nuclear power plants relies on manual methods, is inefficient and prone to errors, and the data value cannot be fully explored, affecting safe operations.
A data search method is adopted to obtain the user's natural language description search statement, use the IK word segmenter to perform Chinese semantic word segmentation and custom word segmentation method word segmentation function position data, build a search statement sequence, and use Elasticsearch for index construction to match the database index data to realize automatic retrieval of historical experience data.
It greatly improves the search efficiency, can quickly retrieve all historical experience data related to the search statement, fully explore the value of the data, reduce errors, and ensure the safe operation of nuclear power plants.
Smart Images

Figure CN119441435A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data retrieval technology, and more specifically, to a data retrieval method, device, electronic equipment and storage medium. Background Art
[0002] At present, the experience feedback system of nuclear power plants provides a series of closed-loop processes such as problem identification, analysis and resolution, and continuous improvement. Over the years of operation, it has accumulated tens of thousands of structured historical experience data. These historical experience data contain a large amount of explicit or implicit experience and knowledge, and have become an important technical basis for the safe and stable operation of power generating units.
[0003] Usually, technicians need to refer to historical experience when executing on-site workflows. Existing technologies generally use manual retrieval to retrieve the required data from historical experience data, which not only consumes a lot of manpower and has low retrieval efficiency, but also does not deeply mine the data value and is prone to errors, posing a potential threat to the safe operation of nuclear power plants. Summary of the invention
[0004] In view of this, the present invention discloses a data retrieval method, device, electronic device and storage medium to realize automatic retrieval of historical experience data, improve retrieval work efficiency, and can quickly retrieve all historical experience data related to the search statement, so that the data value can be fully mined and is not prone to errors, thereby ensuring the safe operation of nuclear power plants.
[0005] A data retrieval method, comprising:
[0006] Obtaining a search statement in which a user describes a search target in natural language;
[0007] Using an IK word segmenter to perform Chinese semantic word segmentation on the search sentence to obtain a search Chinese word sequence;
[0008] The function position data in the search sentence is segmented using a custom segmentation method to obtain a search function position word sequence, wherein the function position data is a combination of English letters and numbers;
[0009] The search Chinese word sequence and the search function position word sequence are indexed and constructed using Elasticsearch to obtain a search statement sequence;
[0010] The search statement sequence is matched with each index data in the database to obtain a data search result, wherein the index data is obtained after word segmentation of the historical experience data of the nuclear power plant.
[0011] Optionally, the step of performing Chinese semantic segmentation on the search statement using an IK word segmenter to obtain a search Chinese word sequence includes:
[0012] The Chinese text in the search sentence is segmented into Chinese semantic words using the finest granularity segmentation mode of the IK word segmenter, and the Chinese text is segmented into independent words to obtain the search Chinese word sequence.
[0013] Optionally, the segmenting the function position data in the search sentence using a custom segmentation method to obtain a search function position word sequence includes:
[0014] determining functional location data from the search statement;
[0015] Eliminate numbers from the functional position data to obtain English letters;
[0016] The English letters are semantically divided using the custom word segmentation method to obtain the search function position word sequence.
[0017] Optionally, the step of indexing the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence includes:
[0018] The search Chinese word sequence and the search function position word sequence are indexed and constructed using the Elasticsearch, and the search statement sequence is obtained in the order of data entry, wherein the search statement sequence includes: event title, function location, event description information, event consequences, event causes and corrective measures.
[0019] Optionally, matching the search statement sequence with each index data in the database to obtain data search results includes:
[0020] The BM25 algorithm is used to match the search statement sequence with the event description information in each index data in the database to obtain the data search result.
[0021] Optionally, it also includes:
[0022] The target index data included in the data search result are sorted in descending order according to the relevance to the search statement sequence, and the N target index data with the highest relevance are output, where N is a positive integer.
[0023] Optionally, the process of obtaining the index data based on the historical experience data of the nuclear power plant includes:
[0024] Acquiring the historical experience data;
[0025] Using an IK word segmenter to perform Chinese semantic word segmentation on the historical experience data to obtain a Chinese word sequence;
[0026] The function position data in the historical experience data is segmented using a custom segmentation method to obtain a function position word sequence;
[0027] The Chinese word sequence and the functional position word sequence are indexed and constructed using Elasticsearch to obtain the index data.
[0028] A data retrieval device, comprising:
[0029] A search sentence acquisition unit, used to acquire a search sentence in which a user describes a search target in natural language;
[0030] A Chinese word segmentation unit, used for performing Chinese semantic word segmentation on the search sentence using an IK word segmenter to obtain a search Chinese word sequence;
[0031] A custom word segmentation unit, used to segment the function position data in the search sentence using a custom word segmentation method to obtain a search function position word sequence, wherein the function position data is a combination of English letters and numbers;
[0032] A merging unit, used to index the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence;
[0033] The retrieval unit is used to match the retrieval statement sequence with each index data in the database to obtain a data retrieval result, wherein the index data is obtained after word segmentation of the historical experience data of the nuclear power plant.
[0034] A computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the data retrieval method described above is implemented.
[0035] An electronic device, comprising: a memory and a processor;
[0036] The memory is used to store at least one instruction;
[0037] The processor is used to execute the at least one instruction to implement the data retrieval method described above.
[0038] As can be seen from the above technical solutions, the present invention discloses a data retrieval method, device, electronic device and storage medium, obtains a search statement of a user describing a search target through natural language, uses an IK word segmenter to perform Chinese semantic word segmentation on the search statement to obtain a search Chinese word sequence, uses a custom word segmentation method to perform word segmentation on the function position data in the search statement to obtain a search function position word sequence, uses Elasticsearch to index and construct the search Chinese word sequence and the search function position word sequence to obtain a search statement sequence, and obtains a data retrieval result by matching the search statement sequence with each index data in the database. The present invention pre-segmented the historical experience data of the nuclear power plant to obtain index data, and also segmented the search statement to obtain a search statement sequence, and matched the search statement sequence with each index data in the database to achieve automatic retrieval of historical experience data. Compared with traditional manual retrieval, the present invention greatly improves the efficiency of retrieval work, can quickly retrieve all historical experience data related to the search statement, so that the data value is fully mined and is not prone to errors, thereby ensuring the safe operation of the nuclear power plant. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without paying creative work.
[0040] Figure 1 A flow chart of a data retrieval method disclosed in an embodiment of the present invention;
[0041] Figure 2 A flow chart of a method disclosed in an embodiment of the present invention for segmenting the function position data in the search sentence using a custom segmentation method to obtain a search function position word sequence;
[0042] Figure 3 A flow chart of a method for obtaining index data based on historical experience data of a nuclear power plant disclosed in an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of the structure of a data retrieval device disclosed in an embodiment of the present invention;
[0044] Figure 5 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The embodiment of the present invention discloses a data retrieval method, device, electronic device and storage medium, which obtains a search statement of a user describing a search target through natural language, performs Chinese semantic segmentation on the search statement using an IK segmenter to obtain a search Chinese word sequence, performs segmentation on the function position data in the search statement using a custom segmentation method to obtain a search function position word sequence, performs index construction on the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence, and obtains a data retrieval result by matching the search statement sequence with each index data in a database. The present invention pre-segmented the historical experience data of a nuclear power plant to obtain index data, and also segmented the search statement to obtain a search statement sequence, and automatically retrieved the historical experience data by matching the search statement sequence with each index data in a database. Compared with traditional manual retrieval, the present invention greatly improves the efficiency of retrieval work, can quickly retrieve all historical experience data related to the search statement, so that the data value is fully mined and is not prone to errors, thereby ensuring the safe operation of the nuclear power plant.
[0047] See also Figure 1 , an embodiment of the present invention discloses a flow chart of a data retrieval method, the method comprising:
[0048] Step S101: Obtain a search statement in which a user describes a search target in natural language.
[0049] Describing retrieval targets in natural language means using the language used by humans in daily communication (such as Chinese) to describe the retrieval targets.
[0050] In this application, when it is necessary to retrieve historical experience data from a database, the user can describe the retrieval target in natural language to generate a retrieval statement.
[0051] Historical experience data refers to the nuclear power plant's past experience in eliminating abnormal defects, preventive maintenance and regular testing of the power plant, including several corresponding event titles, event dates, functional locations, event description information, event consequences, event causes and corrective measures.
[0052] Step S102: Use the IK word segmenter to perform Chinese semantic word segmentation on the search sentence to obtain a search Chinese word sequence.
[0053] IK (Intelligent Keyword) word segmenter is a word segmenter that processes Chinese text based on forward matching. It can divide the input Chinese text into independent words according to certain rules, providing support for subsequent retrieval and analysis.
[0054] This application uses the IK word segmenter to perform Chinese semantic word segmentation on the search sentence, mainly to perform Chinese semantic word segmentation on the event description information in the search sentence, and obtain the search Chinese word sequence.
[0055] Step S103: segment the function position data in the search sentence using a custom segmentation method to obtain a search function position word sequence.
[0056] Functional location data is a field in the search statement, which is a combination of English letters and numbers. The IK word segmenter cannot segment the functional location data. Based on this, this application uses a custom word segmentation method to segment the functional location data in the search statement to obtain a search functional location word sequence.
[0057] The custom word segmentation method is determined according to actual needs. For example, the custom word segmentation method can be a system code category.
[0058] Step S104: Use Elasticsearch to index the search Chinese word sequence and the search function position word sequence to obtain a search statement sequence.
[0059] Elasticsearch is a full-text search engine with distributed capabilities. It can provide fast and accurate full-text search functions and support complex query statements such as fuzzy matching, phrase search, term weight, etc. In addition to full-text search, Elasticsearch also supports structured search, that is, querying based on specific fields or attributes of the data, which makes it possible to effectively retrieve information from structured data sources such as databases or logs.
[0060] Elasticsearch can build indexes based on the inverted index mechanism. The inverted index is a data structure that maps each word in a document to a list of documents containing the word. This is the opposite of the traditional forward index, which searches for words through documents, while the inverted index searches for documents through words.
[0061] Based on this, this application uses Elasticsearch to index and construct the search Chinese word sequence and the search function position word sequence to obtain the search statement sequence.
[0062] Step S105: Match the search statement sequence with each index data in the database to obtain a data search result.
[0063] The present application pre-segmented the historical experience data of nuclear power plants in the database to obtain corresponding index data for storage, and each index data includes: event title, functional location, event description information, time consequences, event causes and corrective measures.
[0064] By matching the index statement sequence with the various index data in the database, automatic retrieval of historical experience data is achieved.
[0065] In summary, the present invention discloses a data retrieval method, which obtains a search statement in which a user describes a search target through natural language, performs Chinese semantic segmentation on the search statement using an IK segmenter to obtain a search Chinese word sequence, performs segmentation on the function position data in the search statement using a custom segmentation method to obtain a search function position word sequence, performs index construction on the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence, and obtains a data retrieval result by matching the search statement sequence with each index data in a database. The present invention pre-segmented the historical experience data of a nuclear power plant to obtain index data, and also segmented the search statement to obtain a search statement sequence, and automatically retrieved the historical experience data by matching the search statement sequence with each index data in a database. Compared with traditional manual retrieval, the present invention greatly improves the efficiency of retrieval work, can quickly retrieve all historical experience data related to the search statement, so that the data value is fully mined, and is not prone to errors, thereby ensuring the safe operation of the nuclear power plant.
[0066] In one embodiment, step S102 may specifically include:
[0067] The Chinese text in the search sentence is segmented into Chinese semantic words using the finest granularity segmentation mode of the IK word segmenter, and the Chinese text is segmented into independent words to obtain the search Chinese word sequence.
[0068] The IK word segmenter provides two word segmentation modes when executing the word segmentation algorithm: ik_smart and ik max_word.
[0069] ik_smart: Minimum segmentation mode, that is, try to segment the text into larger word units.
[0070] ik max_word: The finest-grained division mode, which divides the text into word units as small as possible.
[0071] When the IK word segmenter is used to segment the Chinese text in the search sentence, the application mainly uses the finest granularity division mode of the IK word segmenter to perform Chinese semantic word segmentation, and divides the Chinese text in the search sentence into independent words to obtain a search Chinese word sequence.
[0072] In one embodiment, see Figure 2 , a flowchart of a method disclosed in an embodiment of the present invention for segmenting the function position data in the search sentence using a custom segmentation method to obtain a search function position word sequence, that is, step S103 may specifically include:
[0073] Step S201: Determine function location data from the search statement.
[0074] The search statement usually contains Chinese text, English letters and numbers. However, the IK word segmenter can only perform Chinese semantic word segmentation, and cannot segment English letters and numbers, that is, it cannot segment the functional position data containing a combination of English letters and numbers. Based on this, it is also necessary to segment the functional position data in the search statement.
[0075] The functional location data is a field in the search statement, and the content of this field is a combination of English letters and numbers. Based on this, the present application can determine the functional location data from the search statement.
[0076] Step S202: Eliminate numbers from the functional position data to obtain English letters.
[0077] In practical applications, filters can be used to remove numbers from functional location data and retain English letters.
[0078] Step S203: semantically segment the English letters using a custom word segmentation method to obtain a search function position word sequence.
[0079] The custom word segmentation method may be determined according to actual needs. For example, the custom word segmentation method is a system code category.
[0080] In one embodiment, step S104 may specifically include:
[0081] The search Chinese word sequence and the search function position word sequence are indexed and constructed using Elasticsearch, and the search statement sequence is obtained in the order of data entry.
[0082] The search statement sequence includes: event title, functional location, event description information, event consequences, event causes and corrective measures.
[0083] Elasticsearch is a full-text search engine with distributed capabilities. When using Elasticsearch to index and construct Chinese word sequences and functional position word sequences, it is necessary to include event titles, functional locations, event description information, event consequences, event causes and corrective measures, and construct a search statement sequence in the order in which these data are entered.
[0084] In one embodiment, step S105 may specifically include:
[0085] The BM25 algorithm is used to match the search statement sequence with the event description information in each index data in the database to obtain the data search result.
[0086] BM25 (Best Matching 25) is an algorithm used for information retrieval and text mining. It is an improvement based on the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm. It not only takes into account the word frequency, but also the length of the document. It can more accurately evaluate the importance of words in a document collection and improve the effect of information retrieval.
[0087] This application uses the BM25 algorithm to match the search statement sequence with each index data in the database, especially with the event description information in the index data, to obtain data retrieval results.
[0088] In practical applications, the data retrieval result obtained by matching the search statement sequence with each index data in the database usually includes multiple matched target index data.
[0089] Based on this, in one embodiment, after obtaining the data retrieval result, the data retrieval method may further include:
[0090] The target index data included in the data search result are sorted in descending order according to the relevance to the search statement sequence, and the N target index data with the highest relevance are output, where N is a positive integer.
[0091] The target index data obtained by the search may be sorted from high to low according to the relevance to the search statement sequence, and the N target index data with the highest relevance, for example, the 5 target index data with the highest relevance, may be output.
[0092] In actual applications, the N most relevant target index data can be stored in a fixed format in Excel, and the ACP robot can be used to capture the relevant content in Excel into the email system, including the pusher information and relevant experience feedback information. Finally, it can be pushed to the relevant on-site personnel and executive personnel based on the relevant pusher information.
[0093] The ACP machine is a robot designed and applied based on the parallel system concept of ACP (Artificial societies, Computational experiments, Parallel execution). The Chinese interpretation of ACP is: artificial society, computational experiments and parallel execution.
[0094] In summary, the data retrieval method disclosed in the present invention can process multiple retrieval requirements at one time and can send them to all relevant personnel at one time, realizing one-click historical experience data feedback retrieval, thereby greatly improving the retrieval efficiency of retrieval staff, and will not cause differences in retrieval information due to differences in retrieval capabilities between retrieval personnel, thereby improving the accuracy of retrieval information.
[0095] In one embodiment, see Figure 3 , a flowchart of a method for obtaining index data based on historical experience data of a nuclear power plant disclosed in an embodiment of the present invention, the method comprising:
[0096] Step S301: Obtain historical experience data of a nuclear power plant.
[0097] Historical experience data refers to the nuclear power plant's past experience in eliminating abnormal defects, preventive maintenance and regular testing of the power plant, including several corresponding event titles, event dates, functional locations, event description information, event consequences, event causes and corrective measures.
[0098] Step S302: Perform Chinese semantic word segmentation on the historical experience data using an IK word segmenter to obtain a Chinese word sequence.
[0099] Similar to using IK word segmenter to perform Chinese semantic word segmentation on search statements, this application uses IK word segmenter to perform Chinese semantic word segmentation on historical experience data, mainly performing Chinese semantic word segmentation on event description information in historical experience data, and adopts the finest granularity division mode to obtain Chinese word sequence.
[0100] Step S303: Segment the function position data in the historical experience data using a custom segmentation method to obtain a function position word sequence.
[0101] Functional location data is a field in the historical experience data, which is a combination of English letters and numbers. The IK word segmenter cannot segment the functional location data. Based on this, this application uses a custom word segmentation method to segment the functional location data in the historical experience data to obtain a functional location word sequence.
[0102] The custom word segmentation method is determined according to actual needs. For example, the custom word segmentation method can be a system code category.
[0103] Step S304: Use Elasticsearch to index the Chinese word sequence and the functional position word sequence to obtain index data.
[0104] This application uses Elasticsearch to index and construct Chinese word sequences and functional position word sequences, including event titles, functional locations, event description information, event consequences, event causes and corrective measures, etc. The index data is constructed in the order in which the data corresponding to the Chinese word sequences and functional position word sequences are entered.
[0105] In summary, the present invention obtains index data after word segmentation of the historical experience data of the nuclear power plant, and also obtains a search statement sequence by word segmentation. By matching the search statement sequence with each index data in the database, automatic retrieval of the historical experience data is realized. Compared with traditional manual retrieval, the present invention greatly improves the retrieval efficiency, can quickly retrieve all historical experience data related to the search statement, so that the data value is fully mined and is not prone to errors, thereby ensuring the safe operation of the nuclear power plant.
[0106] Corresponding to the above method embodiment, the present invention also discloses a data retrieval device.
[0107] See also Figure 4 , a schematic diagram of the structure of a data retrieval device disclosed in an embodiment of the present invention, the device may include:
[0108] The search statement acquisition unit 401 is used to acquire the search statement of the user describing the search target in natural language;
[0109] Describing retrieval targets in natural language means using the language used by humans in daily communication (such as Chinese) to describe the retrieval targets.
[0110] In this application, when it is necessary to retrieve historical experience data from a database, the user can describe the retrieval target in natural language to generate a retrieval statement.
[0111] Historical experience data refers to the nuclear power plant's past experience in eliminating abnormal defects, preventive maintenance and regular testing of the power plant, including several corresponding event titles, event dates, functional locations, event description information, event consequences, event causes and corrective measures.
[0112] A Chinese word segmentation unit 402 is used to perform Chinese semantic word segmentation on the search sentence using an IK word segmenter to obtain a search Chinese word sequence;
[0113] IK (Intelligent Keyword) word segmenter is a word segmenter that processes Chinese text based on forward matching. It can divide the input Chinese text into independent words according to certain rules, providing support for subsequent retrieval and analysis.
[0114] This application uses the IK word segmenter to perform Chinese semantic word segmentation on the search sentence, mainly to perform Chinese semantic word segmentation on the event description information in the search sentence, and obtain the search Chinese word sequence.
[0115] A custom word segmentation unit 403 is used to segment the function position data in the search sentence using a custom word segmentation method to obtain a search function position word sequence;
[0116] Functional location data is a field in the search statement, which is a combination of English letters and numbers. The IK word segmenter cannot segment the functional location data. Based on this, this application uses a custom word segmentation method to segment the functional location data in the search statement to obtain a search functional location word sequence.
[0117] The custom word segmentation method is determined according to actual needs. For example, the custom word segmentation method can be a system code category.
[0118] A merging unit 404 is used to construct an index using Elasticsearch on the search Chinese word sequence and the search function position word sequence to obtain a search statement sequence;
[0119] Elasticsearch can build indexes based on the inverted index mechanism. The inverted index is a data structure that maps each word in a document to a list of documents containing the word. This is the opposite of the traditional forward index, which searches for words through documents, while the inverted index searches for documents through words.
[0120] Based on this, this application uses Elasticsearch to index and construct the search Chinese word sequence and the search function position word sequence to obtain the search statement sequence.
[0121] The retrieval unit 405 is used to match the retrieval statement sequence with each index data in the database to obtain a data retrieval result, wherein the index data is obtained after word segmentation of the historical experience data of the nuclear power plant.
[0122] The present application pre-segmented the historical experience data of nuclear power plants in the database to obtain corresponding index data for storage, and each index data includes: event title, functional location, event description information, time consequences, event causes and corrective measures.
[0123] By matching the index statement sequence with the various index data in the database, automatic retrieval of historical experience data is achieved.
[0124] In summary, the present invention discloses a data retrieval device, which obtains a search statement in which a user describes a search target through natural language, performs Chinese semantic segmentation on the search statement using an IK segmenter to obtain a search Chinese word sequence, performs segmentation on the function position data in the search statement using a custom segmentation method to obtain a search function position word sequence, performs index construction on the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence, and obtains a data retrieval result by matching the search statement sequence with each index data in a database. The present invention pre-segmented the historical experience data of a nuclear power plant to obtain index data, and also segmented the search statement to obtain a search statement sequence, and automatically retrieved the historical experience data by matching the search statement sequence with each index data in a database. Compared with traditional manual retrieval, the present invention greatly improves the efficiency of retrieval work, can quickly retrieve all historical experience data related to the search statement, so that the data value is fully mined and is not prone to errors, thereby ensuring the safe operation of the nuclear power plant.
[0125] In one embodiment, the Chinese word segmentation unit 402 is specifically used for:
[0126] The Chinese text in the search sentence is segmented into Chinese semantic words using the finest granularity segmentation mode of the IK word segmenter, and the Chinese text is segmented into independent words to obtain the search Chinese word sequence.
[0127] In one embodiment, the custom word segmentation unit 403 is specifically used for:
[0128] determining functional location data from the search statement;
[0129] Eliminate numbers from the functional position data to obtain English letters;
[0130] The English letters are semantically divided using the custom word segmentation method to obtain the search function position word sequence.
[0131] In one embodiment, the merging unit 404 is specifically used for:
[0132] The search Chinese word sequence and the search function position word sequence are indexed and constructed using the Elasticsearch, and the search statement sequence is obtained in the order of data entry, wherein the search statement sequence includes: event title, function location, event description information, event consequences, event causes and corrective measures.
[0133] In one embodiment, the retrieval unit 405 is specifically used to:
[0134] The BM25 algorithm is used to match the search statement sequence with the event description information in each index data in the database to obtain the data search result.
[0135] In one embodiment, the data retrieval device may further include:
[0136] The output unit is used to sort the target index data contained in the data search result in descending order according to the relevance to the search statement sequence, and output the N target index data with the highest relevance, where N is a positive integer.
[0137] In one embodiment, the data retrieval device may further include:
[0138] An index data generating unit is used to obtain the index data based on the historical experience data of the nuclear power plant.
[0139] The index data generation unit is specifically used for:
[0140] Acquiring the historical experience data;
[0141] Using an IK word segmenter to perform Chinese semantic word segmentation on the historical experience data to obtain a Chinese word sequence;
[0142] The function position data in the historical experience data is segmented using a custom segmentation method to obtain a function position word sequence;
[0143] The Chinese word sequence and the functional position word sequence are indexed and constructed using Elasticsearch to obtain the index data.
[0144] It should be noted that, for the specific working principles of each component in the device embodiment, please refer to the corresponding part of the method embodiment, which will not be repeated here.
[0145] Corresponding to the above embodiment, the present invention further discloses a computer storage medium, which stores at least one instruction, and when the at least one instruction is executed by a processor, the steps shown in the data retrieval method embodiment are implemented.
[0146] Computer storage media may be tangible media that may contain or store programs for use by or in conjunction with an instruction execution system, device, or apparatus. Computer storage media may be machine-readable signal media or machine-readable storage media. Computer storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0147] Corresponding to the above embodiment, Figure 5 As shown, the present invention also provides an electronic device, which may include: a processor 1 and a memory 2;
[0148] The processor 1 and the memory 2 communicate with each other via a communication bus 3;
[0149] Processor 1, configured to execute at least one instruction;
[0150] Memory 2, used to store at least one instruction;
[0151] The processor 1 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0152] The memory 2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0153] The processor executes at least one instruction to implement the steps shown in the data retrieval method embodiment.
[0154] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0155] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0156] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data retrieval method, characterized in that: include: Obtaining a search statement in which a user describes a search target in natural language; Using an IK word segmenter to perform Chinese semantic word segmentation on the search sentence to obtain a search Chinese word sequence; The function position data in the search sentence is segmented using a custom segmentation method to obtain a search function position word sequence, wherein the function position data is a combination of English letters and numbers; The search Chinese word sequence and the search function position word sequence are indexed and constructed using Elasticsearch to obtain a search statement sequence; The search statement sequence is matched with each index data in the database to obtain a data search result, wherein the index data is obtained after word segmentation of the historical experience data of the nuclear power plant.
2. The data retrieval method according to claim 1, characterized in that: The step of using an IK word segmenter to perform Chinese semantic word segmentation on the search sentence to obtain a search Chinese word sequence includes: The Chinese text in the search sentence is segmented into Chinese semantic words using the finest granularity segmentation mode of the IK word segmenter, and the Chinese text is segmented into independent words to obtain the search Chinese word sequence.
3. The data retrieval method according to claim 1 or 2, characterized in that: The step of segmenting the function position data in the search sentence using a custom segmentation method to obtain a search function position word sequence includes: determining functional location data from the search statement; Eliminate numbers from the functional position data to obtain English letters; The English letters are semantically divided using the custom word segmentation method to obtain the search function position word sequence.
4. The data retrieval method according to claim 1, characterized in that: The step of indexing the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence includes: The search Chinese word sequence and the search function position word sequence are indexed and constructed using the Elasticsearch, and the search statement sequence is obtained in the order of data entry, wherein the search statement sequence includes: event title, function location, event description information, event consequences, event causes and corrective measures.
5. The data retrieval method according to claim 1, characterized in that: The step of matching the search statement sequence with each index data in the database to obtain data search results includes: The BM25 algorithm is used to match the search statement sequence with the event description information in each index data in the database to obtain the data search result.
6. The data retrieval method according to claim 1 or 5, characterized in that: Also includes: The target index data included in the data search result are sorted in descending order according to the relevance to the search statement sequence, and the N target index data with the highest relevance are output, where N is a positive integer.
7. The data retrieval method according to claim 1, characterized in that: The process of obtaining the index data based on the historical experience data of the nuclear power plant includes: Acquiring the historical experience data; Using an IK word segmenter to perform Chinese semantic word segmentation on the historical experience data to obtain a Chinese word sequence; Using a custom word segmentation method to segment the function position data in the historical experience data to obtain a function position word sequence; The Chinese word sequence and the functional position word sequence are indexed and constructed using Elasticsearch to obtain the index data.
8. A data retrieval device, characterized in that: include: A search sentence acquisition unit, used to acquire a search sentence in which a user describes a search target in natural language; A Chinese word segmentation unit, used for performing Chinese semantic word segmentation on the search sentence using an IK word segmenter to obtain a search Chinese word sequence; A custom word segmentation unit, used to segment the function position data in the search sentence using a custom word segmentation method to obtain a search function position word sequence, wherein the function position data is a combination of English letters and numbers; A merging unit, used to index the search Chinese word sequence and the search function position word sequence using Elasticsearch to obtain a search statement sequence; The retrieval unit is used to match the retrieval statement sequence with each index data in the database to obtain a data retrieval result, wherein the index data is obtained after word segmentation of the historical experience data of the nuclear power plant.
9. A computer storage medium, characterized in that The computer storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the data retrieval method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The electronic device comprises: a memory and a processor; The memory is used to store at least one instruction; The processor is used to execute the at least one instruction to implement the data retrieval method as described in any one of claims 1 to 7.