A method, device, equipment and medium for information retrieval and information index update

Through semantic expansion and named sharding technology, the semantic matching of information retrieval is improved, the problem of insufficient authoritativeness and accuracy of information retrieval in the existing technology is solved, and more accurate and comprehensive legal information retrieval is achieved.

CN115203357BActive Publication Date: 2024-09-17HAINAN LVJING HI TECH ENVIRONMENTAL PROTECTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210895504.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2024-09-17
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

In existing information retrieval technology, the search results driven by the initial query keywords input by the user are not authoritative, accurate and comprehensive enough. Especially in legal information retrieval, it may lead to the inability to fully understand relevant legal regulations in a timely manner, leading to the risk of project violations.

Method used

By obtaining the information retrieval request, semantic expansion is performed to generate extended query keywords, and the named fragments are determined based on the initial and extended keywords, and are sent to the corresponding retrieval nodes for retrieval. The index database is used to display the retrieval results to achieve improved semantic matching of information retrieval. .

Benefits of technology

It enhances the semantic matching degree of information retrieval results, improves the authority, accuracy and comprehensiveness of information retrieval services, and ensures the accuracy and comprehensiveness of legal information retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115203357B
    Figure CN115203357B
Patent Text Reader

Abstract

The embodiment of the present invention discloses an information retrieval and information index update method, device, equipment and medium. The method comprises: obtaining an information retrieval request, and performing semantic expansion according to the initial query keyword in the information retrieval request to obtain the extended query keyword; determining the named fragment corresponding to the information retrieval according to the information retrieval request; sending the initial query keyword and the extended query keyword to the retrieval node corresponding to the named fragment; and performing information retrieval display according to the retrieval result obtained by the retrieval node in the index database. The method can enhance the semantic matching degree between the information query and the retrieval result, so as to provide accurate information retrieval service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information retrieval technology, and in particular to an information retrieval and information index update method, device, equipment and medium. Background Art

[0002] During the implementation of a project, information retrieval is usually required to ensure the normal and legal operation of the project. For example, in an environmental governance project, legal information retrieval is usually required to understand the latest environmental governance standards and ensure that the environmental governance process and results comply with legal regulations.

[0003] In the prior art, information retrieval is performed based only on the initial query keywords input by the user, which may result in the search results being not authoritative, comprehensive, and accurate. For example, for users without a legal background, searching for legal information based only on the initial query keywords may result in the inability to fully and timely understand the relevant legal provisions of the project, which may lead to illegality of the project. Summary of the invention

[0004] The present invention provides an information retrieval and information index update method, device, equipment and medium to solve the problem that the information retrieval service is not authoritative, accurate and comprehensive enough.

[0005] According to one aspect of the present invention, there is provided an information retrieval method, the method comprising:

[0006] Obtaining an information retrieval request, and performing semantic expansion according to an initial query keyword in the information retrieval request to obtain an expanded query keyword;

[0007] Determining a named shard corresponding to the information retrieval according to the information retrieval request;

[0008] Sending the initial query keyword and the extended query keyword to the search node corresponding to the named shard;

[0009] Information retrieval is displayed based on the retrieval results obtained by the retrieval node in the index database.

[0010] According to one aspect of the present invention, there is provided an information index updating method, the method comprising:

[0011] In response to the information index update request, obtaining original information corresponding to the information index update request, and performing fine-grained splitting on the original information to obtain at least one target information;

[0012] Each target information is updated to the named slice and retrieval node corresponding to the original information, so that the target information is used as an index item in the index database corresponding to the information retrieval method provided by any embodiment of the present invention.

[0013] According to another aspect of the present invention, there is provided an information retrieval device, the device comprising:

[0014] An extended query keyword determination module is used to obtain an information retrieval request and perform semantic expansion based on the initial query keyword in the information retrieval request to obtain an extended query keyword;

[0015] A named slice determination module, used to determine a named slice corresponding to the information retrieval according to the information retrieval request;

[0016] A query keyword sending module, used to send the initial query keyword and the extended query keyword to the search node corresponding to the named slice;

[0017] The information retrieval display module is used to display information retrieval according to the retrieval results obtained by the retrieval node in the index database.

[0018] According to another aspect of the present invention, there is provided an information index updating device, the device comprising:

[0019] A target information determination module, configured to obtain original information corresponding to the information index update request in response to the information index update request, and perform fine-grained splitting of the original information to obtain at least one target information;

[0020] The target information updating module is used to update each target information to the named slice and retrieval node corresponding to the original information, so as to use the target information as an index item in the index database corresponding to the information retrieval method provided by any embodiment of the present invention.

[0021] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0022] at least one processor; and

[0023] a memory communicatively connected to at least one processor; wherein,

[0024] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the information retrieval or information index update method of any embodiment of the present invention.

[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for implementing the information retrieval or information index update method of any embodiment of the present invention when executed by a processor.

[0026] The technical solution of the embodiment of the present invention obtains an information retrieval request, and performs semantic expansion based on the initial query keywords in the information retrieval request to obtain the extended query keywords; determines the named fragment corresponding to the information retrieval based on the information retrieval request; sends the initial query keywords and the extended query keywords to the retrieval node corresponding to the named fragment; and performs information retrieval display based on the retrieval results retrieved by the retrieval node in the index database, thereby solving the problem that the information retrieval service is not authoritative, accurate and comprehensive enough, and achieves the effect of enhancing the semantic matching degree between the information query and the retrieval results, thereby improving the authority, accuracy and comprehensiveness of the information retrieval service.

[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 is a flow chart of an information retrieval method provided according to Embodiment 1 of the present invention;

[0030] Figure 2 is a flow chart of an information retrieval method provided according to Embodiment 2 of the present invention;

[0031] Figure 3 is a flowchart of an information index updating method provided according to Embodiment 3 of the present invention;

[0032] Figure 4 A schematic diagram of the structure of an information retrieval device provided in Embodiment 4 of the present invention;

[0033] Figure 5 A schematic diagram of the structure of an information index updating device provided in Embodiment 5 of the present invention;

[0034] Figure 6 It is a structural diagram of an electronic device for implementing the information retrieval method or information index updating method of an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "original", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] Embodiment 1

[0038] Figure 1 This is a flowchart of an information retrieval method provided according to the first embodiment of the present invention. This embodiment is applicable to the situation of information retrieval, especially to the situation of legal information retrieval by project-related personnel in environmental governance projects to make environmental governance projects comply with legal provisions. This method can be executed by an information retrieval device, which can be implemented in the form of hardware and / or software, and can be configured in electronic devices such as servers, computers or mobile phones. Figure 1 As shown, the method includes:

[0039] Step 110: Obtain an information retrieval request, and perform semantic expansion based on the initial query keywords in the information retrieval request to obtain expanded query keywords.

[0040] Among them, the information retrieval request can be initiated by the user through the information retrieval system. Specifically, the information retrieval request can be a retrieval request for legal and regulatory information. The index database corresponding to the information retrieval request can be a legal standard database. Specifically, the information retrieval system can be combined with the legal standard database in a loosely coupled manner to ensure the synchronous update of the index data and the legal information. Furthermore, the index database corresponding to the information retrieval system also supports expansion based on the user's customized information. For example, the index database can be updated according to the information index update method provided in an embodiment of the present invention. Specifically, the step of updating the index database can be before the user information retrieval, or after the user information retrieval, or can occur during the user information retrieval process. The embodiment of the present invention does not specifically limit the order of information index update and information retrieval execution.

[0041] The initial query keyword in this step may be set by the user when initiating an information retrieval request. Specifically, the initial query keyword may be a word entered by the user according to the legal and regulatory information to be queried. The semantic expansion of the initial query keyword may be a semantic expansion at the legal level based on the initial query keyword to form an extended query keyword corresponding to the initial query keyword.

[0042] Step 120: Determine the named slice corresponding to the information retrieval according to the information retrieval request.

[0043] The information retrieval method provided by the embodiment of the present invention can be built based on a self-organizing distributed retrieval solution. Among them, the self-organizing distributed retrieval solution can be SolrCloud (a retrieval solution) provided by the Solr platform (an open source retrieval platform). Specifically, SolrCloud can be implemented based on a Solr server and a distributed application coordination service cluster (Zookeeper), supporting centralized configuration information, and providing near-real-time retrieval with automatic fault tolerance and automatic load balancing. From a physical structure, the distributed retrieval platform is composed of multiple Solr servers and Zookeeper clusters. Each Solr server can contain one or more Solr server-side applications, i.e., cores. Core is a basic unit that can independently provide index creation, modification, deletion and retrieval functions. The Zookeeper cluster contains one or more Zookeeper servers, which store the configuration information of the distributed retrieval platform and provide a distributed lock function for processing the leader node (Leader) election. From a logical structure, a distributed index has multiple shards. According to the requirements of the information retrieval system, the shards in the system are named shards.

[0044] When a user initiates an information retrieval request, the user can specify the area to be searched. The corresponding Named Shard can be determined based on the area value. Specifically, the Named Shard can be determined based on the correspondence between the area value specified in the search and the Named Shard name. For example, when a user initiates an information retrieval request, the user specifies the area value to be searched as "beijing", and the information retrieval request can be forwarded to the named shard named "beijing".

[0045] Step 130: Send the initial query keyword and the extended query keyword to the search node corresponding to the named slice.

[0046] A named shard can contain one or more replica nodes (Replica), and each logical Replica node corresponds to a physical Solr server application. The distributed platform will hold an election among multiple Replica nodes in a named shard to select a Leader node.

[0047] In this step, the initial query keyword and the extended query keyword can be sent to the retrieval node corresponding to the named shard for retrieval. The retrieval node can be any active Replica node corresponding to the named shard. All Replica nodes under the named shard have the same index copy and complete retrieval capabilities, so the retrieval operation belonging to the named shard can be completed directly on any active Replica node. Specifically, the retrieval node can be determined by load balancing control based on the current load situation.

[0048] The search node searches for information based on the initial query keywords and the extended query keywords, so that when the user enters the initial query keywords for search, not only the search results corresponding to the initial query keywords can be found, but also the search results corresponding to the extended query keywords can be found. That is, the semantic matching degree between the information query and the search results can be enhanced, so that accurate information search services can be provided.

[0049] Step 140: Perform information retrieval and display based on the retrieval results obtained by the retrieval node in the index database.

[0050] Among them, after the search node completes the local search in the index database, it can forward the obtained candidate association results to the master control node that initiated the information search request. The master control node can obtain the search results based on the candidate association results and can perform information search and display. Specifically, the master control node can re-sort the candidate association results, select the most relevant top K (natural number) candidate association results, and perform information search and display.

[0051] In this step, the information search display can be realized by means of website web page display (Web Service). The website can provide a concise and clear search mode, that is, it can support both simple search and advanced search modes. When the information search is for legal information search, the search results can be organized and displayed by legal provisions, and the source of the legal provisions, storage time and other information can be displayed. The text part of the search results can highlight the matching keywords.

[0052] The technical solution of this embodiment obtains an information retrieval request, and performs semantic expansion based on the initial query keywords in the information retrieval request to obtain the extended query keywords; determines the named segment corresponding to the information retrieval based on the information retrieval request; sends the initial query keywords and the extended query keywords to the retrieval node corresponding to the named segment; and displays the information retrieval based on the retrieval results retrieved by the retrieval node in the index database, thereby solving the problem that the information retrieval service is not authoritative, accurate and comprehensive enough, and achieves the effect of enhancing the semantic matching degree between the information query and the retrieval results, thereby improving the authority, accuracy and comprehensiveness of the information retrieval service.

[0053] Embodiment 2

[0054] Figure 2 is a flow chart of an information retrieval method provided according to Embodiment 2 of the present invention. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with each optional solution in one or more of the above embodiments. Specifically,

[0055] In an optional implementation of the embodiment of the present invention, semantic expansion is performed according to the initial query keyword in the information retrieval request to obtain the expanded query keyword, including:

[0056] Count the document frequency and word frequency of words in the corpus corresponding to information retrieval, and generate a stop word list in the field of information retrieval;

[0057] Perform model training on a preset machine learning model according to the stop word list to obtain a query expansion model;

[0058] The initial query keywords in the information retrieval request are input into the query expansion model to obtain the expanded query keywords.

[0059] In an optional implementation of the embodiment of the present invention, information retrieval display is performed according to the retrieval results obtained by the retrieval node in the index database, including:

[0060] Obtain at least one candidate related result retrieved by the search node in the index database;

[0061] Determine the effectiveness weights corresponding to the candidate association results according to the relevance of the candidate association results to the initial query keyword and the effectiveness level of the candidate association results;

[0062] The candidate related results are sorted according to the effectiveness weight to obtain the search results and perform information search and display.

[0063] like Figure 2 As shown, the information retrieval method includes:

[0064] Step 210: Obtain information retrieval request.

[0065] The information retrieval method provided by the embodiment of the present invention may be a retrieval method based on a global corpus, or may be a retrieval method based on a preliminary inspection local corpus.

[0066] In the retrieval method based on the global corpus, the stop word list and query expansion model required for the generation of the extended query keywords can be pre-calculated. That is, before the information retrieval system is run, the data required for the extended query keywords can be generated in advance and cached in the form of intermediate files. When performing information retrieval, the intermediate files cached in the memory can be read to achieve expansion. In this case, steps 220 to 230 can be performed before step 210.

[0067] In the retrieval method based on the initial inspection local corpus, the stop word list and query expansion model required for the generation of the extended query keywords can be calculated in real time. Specifically, the stop word list and query expansion model can be directly derived from the initial inspection document, which can reduce unnecessary calculations. At this time, step 220 and step 230 can be performed after step 210.

[0068] Step 220: Count the document frequency and word frequency of words in the corpus corresponding to the information retrieval, and generate a stop word list in the field of information retrieval.

[0069] The stop word list may be automatically generated in advance through statistical analysis of document frequency and word frequency of words in the legal corpus, and stored in a disk in the form of a file.

[0070] Step 230: Perform model training on a preset machine learning model according to the stop word list to obtain a query expansion model.

[0071] The preset machine learning model may be the Mallet natural language machine learning model of the University of Massachusetts Amherst. The output of the query expansion model may be a semantic expansion dictionary, document topic distribution, topic word distribution, and co-occurrence frequency of word pairs.

[0072] In an optional implementation of an embodiment of the present invention, a preset machine learning model is trained according to a stop word list to obtain a query expansion model, including: encapsulating a word segmentation tool in the preset machine learning model to form a feature extraction pipeline of the preset machine learning model; extracting features from the stop word list through the feature extraction pipeline, and performing model training to obtain a query expansion model.

[0073] Among them, the word segmentation tool can be a Chinese word segmentation tool based on ICTCLAS. Specifically, the Chinese word segmentation tool of ICTCLAS can be implemented based on Lucene. Chinese word segmentation tools may include: SmartCN, PaodingAnalyzer, IKAnalyzer, etc. Among them, SmartCN is a java implementation version based on ICTCLAS, which has the best word segmentation effect, but does not support custom user dictionaries. PaodingAnalyzer and IKAnalyzer are lightweight word segmentation toolkits developed by individual developers. Although they can support custom user dictionaries, the word segmentation effect is not as good as ICTCLAS. The word segmentation tool required for the information retrieval method provided in the embodiment of the present invention can be able to support custom user dictionaries, which can improve the word segmentation effect of legal professional terms. In the embodiment of the present invention, the complete C++ version of ICTCLAS can be selected as the underlying word segmentation library, and customized packaging can be performed based on the general word segmentation interface Analyzer of Lucene to support the information retrieval method provided in the embodiment of the present invention.

[0074] Among them, Lucene provides a highly modular and customizable text analysis interface. The customized word segmentation toolkit only needs to implement the three interfaces of Analyzer, TokenFilter and Tokenizer under the org.apache.1ucene.analysis package. Among them, Tokenizer is used to complete the actual word segmentation operation; TokenFilter is responsible for filtering the data after word segmentation, such as filtering stop words; Analyzer is the entrance of the word segmentation toolkit, and the word segmentation parameters can be set in Analyzer, and Tokenizer and TokenFilter can be called to complete the word segmentation. The Chinese word segmentation toolkit generated by the embodiment of the present invention can be in the form of iar package + dynamic link library for programs that need word segmentation. Among them, for the SolrCloud distributed retrieval platform, the word segmentation library to be used can be specified through the configuration file of the distributed index.

[0075] In an embodiment of the present invention, the Chinese word segmentation tool based on ICTCLAS can be encapsulated as a feature extraction pipeline (cc.mallet.pipe.Pipe) of Mallet to provide Chinese word segmentation and feature selection support for the query expansion model.

[0076] Step 240: Input the initial query keyword in the information retrieval request into the query expansion model to obtain the expanded query keyword.

[0077] Among them, an expansion word list can be constructed according to the output results of the query expansion model, and the weights of the expansion words in the expansion word list can be adjusted. Further, the expansion words in the expansion word list can be sorted according to the weights, and some expansion words with the highest weights can be selected as the expansion query keywords as needed.

[0078] Specifically, the information retrieval system can support two modes: simple retrieval and advanced retrieval. For advanced retrieval, there can be multiple initial query keywords. Each initial query keyword can be constructed into a chained filtering filter (Filter). By default, the relationship between each filter is "AND", requiring that the search results returned by the search must meet all the filtering conditions. When the user enters the initial query keyword for information query, the information retrieval system can construct a corresponding extended word list. Among them, each extended keyword in the extended word list can have a normalized weight. When performing information query based on the initial query keyword and the corresponding extended query keyword, the information retrieval system can set corresponding weights for each query keyword to make the query results more accurate.

[0079] Step 250: Determine the named slice corresponding to the information retrieval according to the information retrieval request.

[0080] Step 260: Send the initial query keyword and the expanded query keyword to the search node corresponding to the named slice.

[0081] Step 270: Obtain at least one candidate association result retrieved by the search node in the index database.

[0082] The candidate association result may be a preliminary result obtained by searching the index database by the search node.

[0083] Step 280: Determine the effectiveness weight corresponding to each candidate association result according to the relevance of each candidate association result to the initial query keyword and the effectiveness level of each candidate association result.

[0084] Among them, the relevance of the alternative association results to the initial query keywords can be determined by a relevance algorithm. For example, the relevance algorithm can be a similarity calculation. The validity level of the alternative association results can be a pre-set validity level. For example, the validity level of the alternative association results can be determined based on the timeliness of the legal information corresponding to the alternative association results. Specifically, the information retrieval system can inherit org.apache.1ucene.search.TopDocsCollector to implement customized legal information management (LawCollector) and add a unique validity level to legal documents. Specifically, LawCollector can be specified in the distributed retrieval platform through an independent jar package and a SolrCloud configuration file. The validity weight can be determined based on the relevance and the validity level. Specifically, the stronger the relevance, the greater the validity weight; the higher the validity level, the greater the validity weight.

[0085] Step 290: Sort the candidate related results according to the effectiveness weight to obtain the search results and perform information search and display.

[0086] Among them, the alternative related results can be sorted by effectiveness weight to optimize the search results, making it easier for users to determine more matching search content in a timely manner.

[0087] In an optional implementation of an embodiment of the present invention, each candidate association result is sorted according to the effectiveness weight to obtain a retrieval result, and information retrieval display is performed, including: sorting each candidate association result in descending order of the effectiveness weight, selecting a preset number of candidate association results arranged in front as target association results; highlighting the target association results according to the initial query keywords and the extended query keywords, obtaining a retrieval result, and performing information retrieval display.

[0088] The information retrieval system can use the top K candidate related results with the largest effectiveness weights, i.e., the TOP K candidate related results, as target related results. In each target related result, a highlight component (Highlighter) can be used to highlight keywords, which can be used as a search result to enable users to intuitively locate key information.

[0089] The technical solution of this embodiment is to obtain an information retrieval request; generate a stop word list in the information retrieval field by counting the document frequency and word frequency of words in the corpus corresponding to the information retrieval; train a preset machine learning model according to the stop word list to obtain a query expansion model; input the initial query keyword in the information retrieval request into the query expansion model to obtain the extended query keyword; determine the named fragment corresponding to the information retrieval according to the information retrieval request; send the initial query keyword and the extended query keyword to the retrieval node corresponding to the named fragment; obtain at least one alternative associated result retrieved by the retrieval node in the index database; determine the effectiveness weight corresponding to each alternative associated result according to the relevance of each alternative associated result to the initial query keyword and the effectiveness level of each alternative associated result; sort the alternative associated results according to the effectiveness weight to obtain the retrieval result, and display the information retrieval, thereby solving the problem that the information retrieval service is not authoritative, accurate and comprehensive enough, and achieving the effect of enhancing the semantic matching degree between the information query and the retrieval result, thereby improving the authority, accuracy and comprehensiveness of the information retrieval service, and the reliability of the retrieval result can be further improved through the effectiveness weight. In addition, it can also facilitate users to quickly locate keywords through highlighting.

[0090] Embodiment 3

[0091] Figure 3 This is a flowchart of an information index update method provided according to the third embodiment of the present invention. This embodiment can be applied to the situation of adding, deleting or modifying index data when retrieving information. It is particularly applicable to the situation of updating legal information retrieval indexes by project-related personnel in environmental governance projects, so that other project-related personnel can understand the latest legal provisions related to environmental governance projects. This method can be executed by an information index update device, which can be implemented in the form of hardware and / or software, and can be configured in electronic devices such as servers, computers or mobile phones. Figure 3 As shown, the method includes:

[0092] Step 310: In response to the information index update request, original information corresponding to the information index update request is obtained, and the original information is fine-grainedly split to obtain at least one target information.

[0093] The information index update request may be a request initiated by a user in the information retrieval system to update an index item in the index database. Specifically, the information index update request may be a request by a user to add, delete or modify an index item in the index database. An index item may be a reference item of a search result. For example, an index item may be a legal document.

[0094] In this step, the original information may be the initial information of the user's updated index item. For example, it may be a legal document uploaded directly by the user. Fine-grained segmentation of the original information may be performed to split the original information into multiple components, i.e., multiple target information. For example, a legal provision in a legal document may be used as a separate target information.

[0095] In an optional implementation of an embodiment of the present invention, original information corresponding to an information index update request is obtained, and the original information is fine-grainedly split to obtain at least one target information, including: obtaining the original information corresponding to the information index update request, and identifying the structure of the original information to obtain the structural boundary; according to the format rules corresponding to the original information, using regular expressions to split the structural boundary to obtain at least one split information; obtaining the split title and text domain weight of each split information, and forming the target information according to the split title, text domain weight and split information.

[0096] Among them, identifying the structure of the original information may be identifying the structural boundary of the original information according to the format rules of the original information. Specifically, the structural boundary may be a title, volume, chapter, section, and article. The regular expression may represent the various layers of the structure of the original information according to the format rules of the original information. For example, the structural boundary of the volume, chapter, section, and article of the legal document may be identified, and the policy expression may be used to represent the various layers of the structure of the legal document, such as the volume, chapter, section, and article, to achieve the splitting of the legal document. Specifically, the legal document may be split into split information based on legal articles.

[0097] In an embodiment of the present invention, the split information can be packaged according to the format set by the SolrCloud distributed retrieval platform. Specifically, the split information can be packaged according to the split title and the body domain weight of the split information to form the target information. Among them, the split title and the body domain weight can be user-defined. Alternatively, the split title can be obtained by information extraction or semantic recognition based on the main content of the corresponding split information. The body domain weight can be determined according to the importance of the split information in the entire original information.

[0098] Step 320: Update each target information to the named slice and retrieval node corresponding to the original information, so as to use the target information as an index item in the index database corresponding to the information retrieval method provided by any embodiment of the present invention.

[0099] When updating the target information of the information retrieval system, it is possible to first check whether the named fragment corresponding to the domain exists. If it exists, the update operation of the index item can be performed normally; otherwise, it can be fed back to the application system that calls Solrj as an exception.

[0100] Specifically, the target information can be updated to the corresponding named shard and the Leader node under the named shard. The Leader node can be elected from multiple Replica nodes. When the Leader node completes the index item update, it distributes the content to be updated to all active Replica nodes under the named shard. The processing status of the Replica node can be fed back to the Leader node.

[0101] The technical solution of the embodiment of the present invention obtains the original information corresponding to the information index update request by responding to the information index update request, and splits the original information into fine-grained parts to obtain at least one target information; updates each target information to the named fragment and retrieval node corresponding to the original information, so as to use the target information as the index item in the index database corresponding to the information retrieval method provided by any embodiment of the present invention, thereby solving the problem of updating the index item during information retrieval, and providing authoritative, accurate and easy-to-use legal retrieval services to environmental protection departments, pollution control enterprises, pollution control institutions, scientific research institutes, legal researchers, lawyers and other legal practitioners, as well as the general public with legal retrieval needs; legal documents can be updated in real time to ensure the synchronization of index data.

[0102] Specifically, in the embodiment of the present invention, by setting up an information retrieval system with a distributed retrieval platform, distributed retrieval services and a user interface, the information retrieval system is easily expandable, server nodes can be added and deleted online, and available retrieval services can be provided uninterruptedly 24 hours a day, 7 days a week.

[0103] Among them, the distributed retrieval platform is the basis of the system's scalability, providing distributed support for indexing and querying. Its main functions include: formulating index sharding and query forwarding rules for distributed retrieval, hiding the underlying addressing, and presetting the naming and processing of sharding according to the legislative bodies of laws and regulations. The distributed retrieval platform provides a unified and standardized interface to implement functions such as creation, deletion, and modification of index items, as well as real-time retrieval functions, hiding sharding details. The distributed retrieval platform can also provide backup, recovery, and automatic fault tolerance functions for index items to ensure the reliability of the system. The distributed retrieval platform can also provide an automatic load balancing mechanism for retrieval to improve the response speed of the system during retrieval.

[0104] In an embodiment of the present invention, management services for a distributed retrieval platform can also be provided. Specifically, the distributed platform management service can provide status monitoring of the distributed retrieval platform, cluster configuration, and server node management and deployment. Among them, platform status monitoring and cluster configuration are mainly secondary development based on Solrj API of SolrCloud. Simple commands based on Linux Shell can be provided for the management of server nodes to support automated Solr service deployment. Each function is customized and simplified according to management requirements. Platform status monitoring includes monitoring the operating status of Solr and Zookeeper servers in the cluster. In particular, for Solr server-side applications, it can monitor its startup, operation, recovery, shutdown and other links in real time. Cluster configuration mainly includes configuration of functional modules of server-side applications, such as analyzer, score calculation (Collector): and addition and deletion operations of the logical structure of distributed indexes. Addition refers to assigning a Solr Core to the distributed index, and deletion is its reverse operation. For the configuration, deployment and startup of Solr servers and SolrCore, it can only be achieved manually. The management service customizes the Linux Shell for repeated manual deployment operations, implements automatic deployment of remote servers, and adds, starts, or stops the Solr Core service.

[0105] The distributed search service is the core of the information retrieval system, providing two key issues for legal search, namely, updating index items based on customized legal provisions and searching based on phonetic extensions. The distributed search service integrates ICTCLAS, a high-performance Chinese word segmentation tool library with customizable user dictionaries, to provide support for search and semantic extension.

[0106] The user interface can be implemented through the Web Service interface defined in the specification. The Web Service encapsulates the functions of adding, modifying, deleting and searching index items. The data exchange between the service and the user interface adopts the JSON format. The user interface can support simple sentence search, advanced Boolean search with metadata screening, keyword highlighting of search results, and viewing of legal standard texts.

[0107] On the basis of the above implementation, the technical scheme of the embodiment of the present invention can further limit the performance of the information retrieval system. For example, the system response time does not exceed 1 second; the effective time for the data entry operating system to be saved is within 5 seconds. When the system performs query and search operations, the response time of a single table should be within 5 seconds. At the same time, the feedback time for special data should not exceed 5 seconds. For the retrieval system, stability means that it can provide retrieval services 7×24 uninterruptedly, which is a strong guarantee for the overall service quality and competitiveness of the system. The number of concurrent users is the number of online users who interact with the server at the same time, reflecting the user experience of the group. At present, the number of concurrent users usually adopts empirical values. For the retrieval system, the maximum number of concurrent users that can be achieved is 1000. The system interface is friendly and convenient for user operation, which can enable users to clearly know the functions of each interface. Online help is provided in each module, and users can freely configure it according to their own behavior habits when necessary. The system should have good maintainability so that when vulnerabilities and defects occur in the later system operation, the maintenance personnel can quickly deal with the problems and ensure the soundness of the system development and design documents as much as possible.

[0108] Embodiment 4

[0109] Figure 4 This is a schematic diagram of the structure of an information retrieval device provided by Embodiment 4 of the present invention. Figure 4 As shown, the device includes: an extended query keyword determination module 410, a named segment determination module 420, a query keyword sending module 430 and an information retrieval display module 440. Among them:

[0110] The extended query keyword determination module 410 is used to obtain an information retrieval request and perform semantic expansion based on the initial query keyword in the information retrieval request to obtain an extended query keyword;

[0111] A named slice determination module 420, configured to determine a named slice corresponding to the information retrieval according to the information retrieval request;

[0112] A query keyword sending module 430 is used to send the initial query keyword and the extended query keyword to the search node corresponding to the named slice;

[0113] The information retrieval display module 440 is used to display information retrieval according to the retrieval results obtained by the retrieval node in the index database.

[0114] Optionally, the extended query keyword determination module 410 includes:

[0115] A stop word list generating unit is used to count the document frequency and word frequency of words in the corpus corresponding to information retrieval, and generate a stop word list in the field of information retrieval;

[0116] A query expansion model generating unit, used for training a preset machine learning model according to a stop word list to obtain a query expansion model;

[0117] The extended query keyword determination unit is used to input the initial query keyword in the information retrieval request into the query expansion model to obtain the extended query keyword.

[0118] Optionally, a query expansion model generation unit includes:

[0119] The feature extraction pipeline forms a subunit, which is used to encapsulate the word segmentation tool in the preset machine learning model to form a feature extraction pipeline of the preset machine learning model;

[0120] The query expansion model generation subunit is used to extract features from the stop word list through a feature extraction pipeline and perform model training to obtain a query expansion model.

[0121] Optionally, the information retrieval display module 440 includes:

[0122] A candidate association result generating unit, used to obtain at least one candidate association result retrieved by the search node in the index database;

[0123] An effectiveness weight determination unit, used to determine the effectiveness weight corresponding to each candidate association result according to the relevance of each candidate association result to the initial query keyword and the effectiveness level of each candidate association result;

[0124] The information retrieval display unit is used to sort the candidate related results according to the effectiveness weight, obtain the retrieval results, and perform information retrieval display.

[0125] Optional, information retrieval presentation unit, including:

[0126] A target association result determination subunit is used to sort the candidate association results according to the descending order of effectiveness weights, and select a preset number of candidate association results arranged in front as the target association results;

[0127] The information retrieval display subunit is used to highlight the target related results according to the initial query keywords and the extended query keywords, obtain the retrieval results, and perform information retrieval display.

[0128] The information retrieval device provided by the embodiment of the present invention can execute the information retrieval method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0129] Embodiment 5

[0130] Figure 5 This is a schematic diagram of the structure of an information index updating device provided by Embodiment 5 of the present invention. Figure 5 As shown, the device includes: a target information determination module 510 and a target information update module 520. Among them:

[0131] The target information determination module 510 is used to obtain the original information corresponding to the information index update request in response to the information index update request, and to perform fine-grained splitting of the original information to obtain at least one target information;

[0132] The target information updating module 520 is used to update each target information to the named slice and retrieval node corresponding to the original information, so as to use the target information as an index item in the index database corresponding to the information retrieval method provided by any embodiment of the present invention.

[0133] Optionally, the target information determination module 510 includes:

[0134] A structure boundary determination unit, used to obtain original information corresponding to the information index update request, identify the structure of the original information, and obtain a structure boundary;

[0135] A split information determination unit, configured to split the structure boundary using a regular expression according to a format rule corresponding to the original information to obtain at least one split information;

[0136] The target information forming unit is used to obtain the split titles and text domain weights of each split information, and form the target information according to the split titles, text domain weights and split information.

[0137] The information index updating device provided in the embodiment of the present invention can execute the information index updating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0138] Embodiment 6

[0139] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0140] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0141] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0142] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, for example, an information retrieval method or an information index update method.

[0143] In some embodiments, the information retrieval method or the information index update method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the information retrieval method or the information index update method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the information retrieval method or the information index update method in any other appropriate manner (e.g., by means of firmware).

[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0145] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0146] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An information retrieval method, characterized in that: include: Obtaining an information retrieval request, and performing semantic expansion according to an initial query keyword in the information retrieval request to obtain an expanded query keyword; Determining a named slice corresponding to the information retrieval according to the information retrieval request; Sending the initial query keyword and the extended query keyword to the search node corresponding to the named slice; Perform information retrieval and display according to the retrieval results obtained by the retrieval node in the index database; The step of performing semantic expansion according to the initial query keyword in the information retrieval request to obtain the expanded query keyword includes: Count the document frequency and word frequency of words in the corpus corresponding to information retrieval, and generate a stop word list in the field of information retrieval; Performing model training on a preset machine learning model according to the stop word list to obtain a query expansion model; Inputting the initial query keyword in the information retrieval request into the query expansion model to obtain the expanded query keyword; wherein, constructing an expanded word list according to the output result of the query expansion model, and sorting the expanded words in the expanded word list according to the weight to obtain the expanded query keyword; The preset machine learning model is trained according to the stop word list to obtain a query expansion model, including: Encapsulating a word segmentation tool in the preset machine learning model to form a feature extraction pipeline of the preset machine learning model; The feature extraction pipeline is used to extract features from the stop word list, and model training is performed to obtain a query expansion model.

2. The method according to claim 1, characterized in that The information retrieval and display is performed according to the retrieval results obtained by the retrieval node in the index database, including: Obtain at least one candidate association result retrieved by the search node in the index database; Determining the effectiveness weights corresponding to the candidate association results respectively according to the relevance of each candidate association result to the initial query keyword and the effectiveness level of each candidate association result; The candidate related results are sorted according to the effectiveness weight to obtain the search results and perform information search and display.

3. The method according to claim 2, characterized in that The candidate related results are sorted according to the effectiveness weights to obtain search results and perform information search and display, including: Sorting the candidate association results according to the descending order of the effectiveness weight, and selecting a preset number of candidate association results arranged in front as target association results; According to the initial query keyword and the extended query keyword, the target related results are keyword highlighted to obtain the search results and perform information search and display.

4. A method for updating an information index, characterized in that: include: In response to an information index update request, obtaining original information corresponding to the information index update request, and performing fine-grained splitting on the original information to obtain at least one target information; Each of the target information is updated to the named slice and retrieval node corresponding to the original information, so as to use the target information as an index item in the index database corresponding to the information retrieval method described in any one of claims 1 to 3.

5. The method according to claim 4, characterized in that The obtaining of original information corresponding to the information index update request and fine-grained splitting of the original information to obtain at least one target information includes: Acquire original information corresponding to the information index update request, identify the structure of the original information, and obtain a structure boundary; According to the format rule corresponding to the original information, the structure boundary is split using a regular expression to obtain at least one split information; The split titles and body domain weights of each of the split information are obtained, and target information is formed according to the split titles, the body domain weights and the split information.

6. An information retrieval device, characterized in that: include: An extended query keyword determination module is used to obtain an information retrieval request and perform semantic expansion based on the initial query keyword in the information retrieval request to obtain an extended query keyword; A named slice determination module, used to determine a named slice corresponding to the information retrieval according to the information retrieval request; A query keyword sending module, used to send the initial query keyword and the extended query keyword to a search node corresponding to the named slice; An information retrieval display module, used to display information retrieval according to the retrieval results obtained by the retrieval node in the index database; The extended query keyword determination module includes: A stop word list generating unit is used to count the document frequency and word frequency of words in the corpus corresponding to information retrieval, and generate a stop word list in the field of information retrieval; A query expansion model generating unit, configured to perform model training on a preset machine learning model according to the stop word list to obtain a query expansion model; an extended query keyword determination unit, configured to input the initial query keyword in the information retrieval request into the query expansion model to obtain the extended query keyword; wherein an extended word list is constructed according to the output result of the query expansion model, and the extended words in the extended word list are sorted according to the weight to obtain the extended query keyword; The query expansion model generating unit comprises: The feature extraction pipeline forms a subunit, which is used to encapsulate the word segmentation tool in the preset machine learning model to form a feature extraction pipeline of the preset machine learning model; The query expansion model generation subunit is used to extract features from the stop word list through a feature extraction pipeline and perform model training to obtain a query expansion model.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the information retrieval method described in any one of claims 1-3, or the information index updating method described in any one of claims 4-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the information retrieval method described in any one of claims 1 to 3, or the information index updating method described in any one of claims 4 to 5 when executed.