Enterprise name retrieval method and device, electronic equipment and storage medium
By receiving enterprise query text and using an enterprise knowledge graph for a three-layer progressive retrieval, the problem of low accuracy in enterprise name retrieval in existing technologies is solved. This achieves a deep understanding of user intent and efficient recall of related enterprises, thereby improving retrieval accuracy and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES CORPORATION
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-12
AI Technical Summary
Existing enterprise name retrieval methods rely on literal keyword matching, lacking a deep understanding of user search intent and the relationships between enterprises, resulting in low accuracy of search results and an inability to identify the subordinate and brand relationships between enterprises.
By receiving enterprise query text input by users, structured semantic data is obtained, and multi-dimensional related queries are performed using enterprise knowledge graphs. A three-layer progressive retrieval strategy is adopted, including exact matching, substring matching, and semantic matching, to generate a list of search results.
It significantly improves the completeness and accuracy of search results, intelligently identifies user query intent, expands the search to all related companies under the brand, and enhances the user experience.
Smart Images

Figure CN122019747A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of name retrieval technology, and particularly relates to a method for retrieving enterprise names, a device for retrieving enterprise names, an electronic device, and a computer-readable storage medium. Background Technology
[0002] When searching for company information, matching candidates' professional backgrounds with their employer names is a crucial screening method. Current mainstream technologies typically follow a "keyword extraction - inverted index - similarity calculation" approach. This involves first using a general-purpose word segmenter (such as the IK segmenter) to segment the company name and extract keywords; then performing a search based on the inverted index; and finally using statistical models such as TF-IDF or BM25 to rank the results based on relevance.
[0003] However, existing methods rely solely on literal keyword matching, lacking a deep understanding of user search intent and the relationships between companies, and are unable to identify hierarchical and brand relationships between companies. Users often use brand names, product names, or abbreviations instead of their registered business names, but the word segmentation tools in existing methods are insufficient in processing professional terms or obscure words such as brand names and product names, easily leading to segmentation errors, resulting in low accuracy of search results and affecting user experience. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a method for searching enterprise names, an apparatus for searching enterprise names, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
[0005] To address the above problems, a first aspect of this invention provides a method for enterprise name retrieval, the method comprising: The system receives enterprise query text input by the user and obtains the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field. Obtain the enterprise knowledge graph, and query the set of candidate enterprises in the enterprise knowledge graph that are associated with the enterprise query text based on the core name field; In the candidate enterprise set, a first target enterprise that matches the enterprise query text is queried, and a score is assigned to the first target enterprise; Among the remaining companies in the candidate company set excluding the first target company, identify a second target company that contains the string of the company query text, and assign a score to the second target company; Among the remaining companies in the candidate company set excluding the first target company and the second target company, a third target company whose company name semantically matches the company query text is queried, and a score is assigned to the third target company; The candidate companies are sorted according to their scores, and a list of search results is generated based on the sorting results.
[0006] Optionally, the step of sorting the candidate companies according to their scores and generating a search result list based on the sorting results includes: Based on the scores of the first target company, the second target company, and the third target company, a comprehensive score is determined for each company in the candidate company set. Based on the comprehensive score, the candidate companies in the set are sorted in descending order to obtain a list of search results.
[0007] Optionally, identifying a second target enterprise containing the enterprise query text includes: The names of the remaining companies excluding the first target company are extracted character by character from the end of the string, generating multiple strings of increasing length until the entire company name is included. Among the remaining companies excluding the first target company, a second target company is identified whose company name contains the structured semantic data corresponding to the company query text.
[0008] Optionally, determining the second target enterprise whose enterprise name contains the structured semantic data corresponding to the enterprise query text includes: Obtain the search index; the search index contains all possible consecutive strings generated by extracting each enterprise name character by character from the last character forward. Based on the retrieval index, the enterprise containing the structured semantic data corresponding to the enterprise query text is the second target enterprise.
[0009] Optionally, the third target enterprise whose name semantically matches the enterprise query text includes: Based on the structured semantic data corresponding to the enterprise query text, a third target enterprise whose name matches the structured semantic data is determined from the remaining enterprises excluding the first target enterprise and the second target enterprise; the structured semantic data also includes at least one of the following: location field, business direction field, and organization type field.
[0010] Optionally, assigning a score to the third target enterprise includes: Obtain the matching degree between the company name of the third target company and the structured semantic data; The score of the third target enterprise is determined based on the matching degree and the preset field weights; the weight of the core name field is greater than the weight of the business direction field, and the weight of the business direction field is greater than or equal to the weights of the location field and the organization type field.
[0011] Optionally, obtaining the structured semantic data corresponding to the enterprise query text includes: The enterprise name segmentation model obtained through pre-training is used to parse the enterprise query text to obtain the structured semantic data.
[0012] Optionally, the enterprise knowledge graph is constructed in the following ways: Obtain the correspondence between the company's brand name and its registered name; Establish the relationship between the enterprise's brand name, the enterprise's registered name, and its associated parent company and subsidiaries; By using the company's brand name as a tag and linking it to the corresponding parent company and subsidiary entities, the aforementioned company knowledge graph is formed.
[0013] According to a second aspect of the present invention, a company name retrieval device is provided, the device comprising: The query text receiving module is used to receive enterprise query text input by the user and obtain the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; The enterprise set acquisition module is used to acquire the enterprise knowledge graph and query the candidate enterprise set associated with the enterprise query text in the enterprise knowledge graph based on the core name field. The first target enterprise determination module is used to query the candidate enterprise set for a first target enterprise that matches the enterprise query text, and assign a score to the first target enterprise. The second target enterprise determination module is used to identify a second target enterprise containing the string of the enterprise query text from the remaining enterprises in the candidate enterprise set excluding the first target enterprise, and to assign a score to the second target enterprise. The third target enterprise determination module is used to query the remaining enterprises in the candidate enterprise set excluding the first target enterprise and the second target enterprise, and to assign a score to the third target enterprise. The search result generation module is used to sort the companies in the candidate company set according to their scores and generate a search result list based on the sorting results.
[0014] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the enterprise name retrieval method as described in any of the preceding embodiments.
[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a program is stored, wherein the computer program, when executed by a processor, implements the steps of the enterprise name retrieval method as described in any of the preceding embodiments.
[0016] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a method, apparatus, electronic device, and storage medium for enterprise name retrieval. The method includes: receiving enterprise query text input by a user and obtaining structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; obtaining an enterprise knowledge graph and querying a set of associated candidate enterprises based on the core name field; querying a first target enterprise in the candidate enterprise set that matches the enterprise query text and assigning a score to the first target enterprise; identifying a second target enterprise containing the string of the enterprise query text in the remaining enterprises in the candidate enterprise set excluding the first target enterprise and assigning a score to the second target enterprise; querying a third target enterprise whose enterprise name semantically matches the enterprise query text in the remaining enterprises in the candidate enterprise set excluding the first and second target enterprises and assigning a score to the third target enterprise; and sorting the enterprises in the candidate enterprise set according to their scores to generate a retrieval result list. By introducing an enterprise knowledge graph, it is possible to intelligently identify whether the user-input query text is associated with a specific brand and expand the retrieval to all associated enterprises under that brand, significantly improving the completeness of the retrieval. Through a three-layer progressive retrieval strategy, it is possible to better understand the user's query intent, greatly improving retrieval accuracy and user experience.
[0017] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0018] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart illustrating the steps of a company name retrieval method provided in an embodiment of the present invention; Figure 2This is a flowchart of another enterprise name retrieval method provided in an embodiment of the present invention; Figure 3 This is a logical block diagram of a company name retrieval method provided in an embodiment of the present invention; Figure 4 This is a structural block diagram of a company name retrieval device provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Figure 1 This is a flowchart illustrating the steps of a company name retrieval method provided in an embodiment of the present invention. See also... Figure 1 The method specifically includes the following steps: Step 101: Receive the enterprise query text input by the user and obtain the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; The core name field is the most distinctive and identifiable semantic unit obtained after structured parsing of the enterprise query text. It represents the most core and unique naming part of the enterprise entity and is key to identifying the enterprise. It refers to the name body remaining after removing general or descriptive parts such as administrative division (location), industry / business characteristics (business direction), and organizational form (institution type), used for uniqueness or characteristic identification. Examples include "Baidu" (from "Beijing Baidu Netcom Technology Co., Ltd.") and "iQiyi" (from "Beijing iQiyi Technology Co., Ltd.").
[0021] In this embodiment of the invention, when a user inputs query text such as "Beijing Baidu Zhixing Technology", this composite string, which may contain various semantic elements such as location, core brand name, and business direction, will be captured. Unlike traditional methods that directly perform mechanical word segmentation on the original text, the received text is treated as a semantic carrier requiring in-depth deconstruction, providing raw input data for subsequent knowledge graph queries, word segmentation, and hierarchical retrieval strategies. The received query text exhibits high diversity and uncertainty; it may be a standardized full registered name (e.g., "Beijing Baidu Netcom Technology Co., Ltd."), a brand abbreviation (e.g., "Baidu"), a colloquial expression (e.g., "Baidu Beijing Company"), or even contain errors or omissions.
[0022] A pre-trained enterprise name segmentation model is used to parse enterprise query text. This model employs a sequence labeling model (such as BiLSTM-CRF or BERT), and its training data contains a large number of manually labeled enterprise names, structured according to four dimensions: location, core name, business direction, and organization type. Through model inference, the user-input enterprise query text is decomposed and mapped to the above structured fields. For example, "Beijing Baidu Zhixing Technology" is parsed as {location: Beijing, name: Baidu Zhixing, natureOfBusiness: Technology}. This transformation of unstructured query text into a structured representation rich in semantic information lays a crucial data foundation for subsequent knowledge graph-based association queries and hierarchical matching strategies.
[0023] Step 102: Obtain the enterprise knowledge graph and query the set of candidate enterprises in the enterprise knowledge graph that are associated with the enterprise query text based on the core name field; An enterprise knowledge graph is a structured semantic network whose core function is to establish multi-dimensional relationships between brands, abbreviations, and official registered company names to solve the problem of missing retrieval results due to name mismatches in traditional searches. Its core components include brand entities and enterprise entities. Relationship types include brand affiliation relationships connecting brands to their corresponding registered entities, describing parent-subsidiary relationships, and investment holding relationships. Cleaned structured enterprise relationship data is purchased from authoritative third-party platforms, and a rule engine automatically builds the relationship graph between brands, enterprises, and subsidiaries. Conflicting relationships (such as inconsistent descriptions of holding relationships from multiple data sources) are manually reviewed and corrected. Full updates are performed periodically (e.g., annually), and incremental updates are triggered by significant changes.
[0024] In this embodiment of the invention, when the system receives the query text, based on the core name field obtained through parsing (such as "Baidu Zhixing" extracted from the query text "Beijing Baidu Zhixing Technology"), it identifies the brand semantics contained in the query text by querying a pre-built enterprise knowledge graph, and dynamically expands the associated enterprise network. The knowledge graph stores enterprise brands, officially registered names, and the relationships between parent and subsidiary companies in a graph structure (for example, the brand "Baidu" node connects multiple entities such as "Beijing Baidu Netcom Technology Co., Ltd.", "Beijing Baidu Zhixing Technology Co., Ltd.", and "Apollo Intelligent Technology (Beijing) Co., Ltd.").
[0025] Using the core name field as the search key, the system searches the knowledge graph for matching brand or enterprise nodes. If the core name directly matches or is highly associated with a brand node (for example, if a user enters "Baidu Zhixing," the core name "Baidu Zhixing" can be associated with the "Baidu" brand through graph relationships), then all associated subsidiaries, holding companies, and other enterprise entities are dynamically aggregated by traversing the "brand affiliation" and other relationship edges under that brand node, forming a set of brand-related enterprises, which is then used as the candidate enterprise set for this search. If the core name field is not associated with any brand, it indicates that this query may be targeting a specific non-branded enterprise name. In this case, no scope limitation will be applied, and the entire enterprise database will be used as the candidate enterprise set to ensure the completeness of the search.
[0026] For example, when a user enters "Baidu Intelligent Driving", the core name "Baidu" is extracted first. Then, the "Baidu" brand node is located in the knowledge graph. By traversing the relationship edges such as "brand affiliation" and "group holding", a set of related candidate companies including all Baidu-related companies such as "Beijing Baidu Netcom Technology Co., Ltd.", "Beijing Baidu Intelligent Driving Technology Co., Ltd.", and "Apollo Intelligent Technology (Beijing) Co., Ltd." is automatically aggregated.
[0027] By leveraging the query expansion mechanism of the knowledge graph, an initial candidate pool is built for subsequent hierarchical and precise matching. This not only handles explicit brand queries but also complex compound queries: when a user enters "Beijing Alibaba Cloud Technology," it can simultaneously identify the relationship between the product brand "Alibaba Cloud" and the "Alibaba" Group, thereby expanding the candidate set from a single "Alibaba Cloud"-related company to relevant companies throughout the entire Alibaba ecosystem. This intelligent expansion based on graph relationships significantly improves retrieval efficiency and the relevance of results.
[0028] Step 103: In the candidate enterprise set, query the first target enterprise that matches the enterprise query text, and assign a score to the first target enterprise; This invention employs a hierarchical retrieval strategy that includes an exact matching layer, a substring matching layer, and a semantically fuzzy matching layer to retrieve user enterprise query texts.
[0029] In the embodiment of the present invention, querying the first target enterprise that is consistent with the enterprise query text is the first-level exact matching layer in the hierarchical retrieval strategy. In the candidate enterprise set extended by the knowledge graph, the exact matching results that completely match the user's query intention are preferentially identified and rewarded with high weights. The first-round quality screening is performed on the enterprise candidate set after semantic extension by the enterprise knowledge graph to ensure that when the user inputs a complete and standardized enterprise registration name, the most direct and clear matching feedback can be obtained. For example, when the user accurately inputs "Beijing Baidu Netcom Science and Technology Co., Ltd.", the enterprise entity that is exactly the same as the query text at the character level can be quickly located in the candidate pool of Baidu-related enterprises provided by the knowledge graph, and a score significantly higher than other levels is assigned to it (such as a weight of 128 points).
[0030] By giving the exact matching results an overwhelming weight advantage, the core sorting principle of "exact precedence over fuzzy" is established. When assigning scores, once there is an exact matching item in the candidate enterprise set, it is immediately marked as the first target enterprise and the highest-level score is assigned to it.
[0031] Step 104, in the remaining enterprises in the candidate enterprise set except the first target enterprise, identify the second target enterprise that contains the string of the enterprise query text, and assign a score to the second target enterprise; In the embodiment of the present invention, an Elasticsearch (ES) index that supports suffix substring matching is constructed in advance for the remaining candidate enterprise set after the previous exact matching screening. Specifically, in the data indexing stage, through the custom back_edge_ngram_analyzer text analyzer, each enterprise registration name stored in ES is segmented from back to front by edge N-Gram. The enterprise name is automatically disassembled into all possible consecutive suffix substrings (for example, "Guangxi Feifafa Trading Co., Ltd." will be disassembled into "Co.", "Company", "Limited Company"... until the complete name), and an inverted index is established for these substrings.
[0032] During the query, the enterprise name tokenization model parses the enterprise query text to obtain structured semantic data. This structured semantic data may contain one or more semantic fields, and queries are performed on the enterprise name suffix substring index field in the ES index through the semantic fields. Using the structured semantic data parsed by the tokenization model (such as name: "iQIYI"), each field value is used as an independent query term, and the leftmost matching rule is adopted to match the above-mentioned suffix substring index. "Leftmost matching" means that in a certain suffix substring entry, the query term must appear at the leftmost end of the substring to be considered a successful match. Through "leftmost matching" and using the index sorting feature, fast and accurate retrieval is achieved, and all enterprises containing core semantic vocabulary (such as brand names, locations) are quickly and accurately recalled. Example: The enterprise name "Beijing iQIYI Technology Co., Ltd." is preprocessed into a series of suffix substrings (such as: Co., Ltd., Company, Limited Company,..., Beijing iQIYI Technology Co., Ltd.), and each substring is an independent index entry. When querying whether "iQIYI" is contained at any position in the name, if a fuzzy or wildcard query is directly performed, the efficiency is very low. Using the suffix substring index, the query term "iQIYI" is used as a prefix (Prefix) to find all suffix substring entries starting with "iQIYI", and the entry "iQIYI Technology Co., Ltd." in the index will be quickly hit. Hitting this suffix entry of "iQIYI Technology Co., Ltd." proves that the enterprise name "Beijing iQIYI Technology Co., Ltd." contains "iQIYI".
[0033] The core of this query is multiple parallel matching sub-conditions under the logical "or" (should) relationship, and each sub-condition corresponds to a semantic field. This query contains multiple parallel sub-conditions, each sub-condition corresponding to a semantic field, and follows the "leftmost matching" principle: For the core name field (name): On the suffix substring index field, perform a leftmost matching query starting with the field value. Example: name: "iQIYI" will be converted into a query on the suffix substring index "Find all suffix substrings starting with 'iQIYI'". This will efficiently hit suffix entries such as "iQIYI Technology Co., Ltd.", "iQIYI (Shanghai) Co., Ltd.", etc. For the location field (location) and the business direction field (natureOfBusiness): The same logic is adopted, and leftmost matching queries are respectively performed on the suffix substring index field. Example: location: "Beijing" will find suffix substrings starting with "Beijing"; natureOfBusiness: "Technology" will find suffix substrings starting with "Technology". Execute the above constructed query in the candidate enterprise set. The search engine uses the inverted index to quickly find all enterprises that meet at least one "leftmost matching" sub-condition. These enterprises are identified as the second target enterprises.
[0034] The combined query constructed above is executed on the set of candidate companies other than the first target company. The search engine (such as Elasticsearch) evaluates the matching performance of each company for each sub-condition in parallel. The more matching sub-conditions a company meets, the higher its matching degree at this layer. A base matching degree score for this layer is calculated using a field-weighted summation method, and then multiplied by a preset overall weight coefficient for the second layer to obtain the final "second-layer score". All companies matched by this layer of queries are identified as second target companies and receive their calculated second-layer scores.
[0035] The assigned score (e.g., a weight of 32 points) is lower than exact match but significantly higher than broader semantic match, establishing a clear second priority in the ranking system. Through the specific form of suffix matching, it implicitly captures the structural features of company names, matching from back to front, prioritizing more distinctive suffix combinations such as "core name and business direction" or "core name, business direction, and organization type," rather than simply matching high-frequency, generic words. Even when exact match fails, it can still accurately recall and rank relevant companies that highly overlap with user input, which is the core guarantee for balancing recall and accuracy.
[0036] Step 105: Among the remaining companies in the candidate company set excluding the first target company and the second target company, query for a third target company whose company name semantically matches the company query text, and assign a score to the third target company; In this embodiment of the invention, after the first two layers of screening where both exact matching and substring matching fail, the remaining candidate companies undergo refined evaluation and scoring based on structured semantic features. Based on the structured semantic data (such as location, core name, and business direction) generated by the pre-trained company name segmentation model, multi-dimensional, weighted semantic similarity calculations are performed between the company query text and the candidate company names. For example, when a user queries "Beijing iQiyi Technology Co., Ltd.", and there are no exact or suffix matches among the candidate companies, the query text is deconstructed into {"location": "Beijing", "name": "iQiyi", "natureOfBusiness": "technology"}, and field-level matching is calculated with the remaining companies. By configuring the core name field with the highest weight (e.g., 64 times), the business direction with a medium weight (e.g., 4 times), and the location with a basic weight (e.g., 1 time), it can be ensured that even if the company name does not contain the complete query string, as long as the core name is highly relevant (e.g., "iQiyi (Shanghai) Information Technology Co., Ltd."), it can still obtain a meaningful score, thus being effectively recalled.
[0037] The assigned scores (such as the base score after weight normalization) are lower than those of the first two layers, but through differentiated field weights, a fine relevance gradient is established in a broad semantic matching pool. This structured, weighted semantic matching mechanism ensures that the final result list does not miss weakly relevant but valuable options, while also pushing the companies that best match the user's semantic intent to the top of the list.
[0038] Step 106: Sort the candidate companies according to their scores and generate a search result list based on the sorting results.
[0039] In this embodiment of the invention, based on the differentiated scoring system established by the first three layers of matching, the candidate enterprise set is comprehensively weighted and intelligently sorted to generate an ordered result list that reflects both matching accuracy and semantic relevance. A clear sorting rule (usually descending order) is used to uniformly compare and arrange the scores assigned to the first, second, and third layers in the preceding steps. In this process, the overwhelmingly high score obtained from exact matching (e.g., 128 points) ensures that enterprises that fully match the user's input will inevitably rank first; the second-highest weight obtained from suffix matching (e.g., 32 points) places enterprises with highly partially matched results in the second tier; and the gradient score (e.g., the 1-10 point range) obtained through weighted calculation of semantic matching fills the remaining relevant results, forming a natural decaying order from "exact match" to "highly relevant" to "weakly relevant." This structured sorting output, with its deep understanding and layered response to the user's query intent, translates into a user-perceptible, intuitive, and reasonable result presentation.
[0040] When generating the search results list, further information provided by the knowledge graph can be incorporated, such as visual annotations or grouping prompts for companies belonging to the same brand group, to enhance the interpretability of the results. By converging all the complex word segmentation, graph querying, hierarchical matching, and scoring calculations in the early stages into a clear, orderly, and actionable search results list, a complete closed loop from original user input to high-quality information output is completed.
[0041] Figure 2 This is a flowchart illustrating the steps of a company name retrieval method provided in an embodiment of the present invention. See also... Figure 2 The method specifically includes the following steps: Step 201: Receive the enterprise query text input by the user and obtain the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; In this embodiment of the invention, when a user inputs query text, this step captures a composite string that may contain various semantic elements such as location, core brand name, and business direction. Unlike traditional methods that directly perform mechanical word segmentation on the original text, the received text is treated as a semantic carrier requiring in-depth deconstruction, providing raw input data for subsequent knowledge graph queries, word segmentation, and hierarchical retrieval strategies.
[0042] The received query texts are highly diverse and unpredictable. They may be the full registered name (e.g., "Beijing Baidu Netcom Technology Co., Ltd."), a brand abbreviation (e.g., "Baidu"), colloquial expressions (e.g., "Baidu Beijing Company"), or even contain errors or omissions. By incorporating all possible user inputs into a unified processing framework, the system ensures it can handle complex query needs in real-world scenarios.
[0043] A pre-trained enterprise name segmentation model is used to parse enterprise query text. This model employs a sequence labeling model (such as BiLSTM-CRF or BERT), and its training data contains a large number of manually labeled enterprise names, structured according to four dimensions: location, core name, business direction, and organization. Through model inference, the free text is decomposed and mapped to the above structured fields. For example, "Beijing Baidu Zhixing Technology" is parsed as {location: Beijing, name: Baidu Zhixing, natureOfBusiness: Technology}. This transformation of unstructured query text into a structured representation rich in semantic information lays a crucial data foundation for subsequent knowledge graph-based relational queries and hierarchical matching strategies.
[0044] In some embodiments, step 201 may include the following sub-steps: Sub-step S11: Based on the pre-trained enterprise name segmentation model, the enterprise query text is parsed to obtain the structured semantic data.
[0045] Intelligent structured parsing of company names is achieved by training a deep learning word segmentation model. First, a large-scale labeled dataset is constructed, and company names are manually labeled according to four semantic components: location, core name, business direction, and organization type. Then, a sequence labeling model such as BiLSTM-CRF or BERT is trained based on the PyTorch framework to learn the inherent compositional rules of company names. The trained model can automatically segment any input company name and output structured semantic data.
[0046] To ensure efficient operation and continuous optimization of the system, all word segmentation results are cached in Redis to avoid duplicate calculations. At the same time, a manual feedback mechanism is established to correct bad cases of model errors and update the cache. The corrected data is accumulated for iterative training of the model.
[0047] In this embodiment of the invention, the parsing task is completed by calling a pre-trained enterprise name segmentation model. A neural network model specifically optimized for the enterprise name domain is utilized. When a user inputs query text such as "Ningbo Zhongji Automobile International Trade Co., Ltd.", the model, like a professional familiar with business registration naming conventions, intelligently breaks down and labels this string as: {"location": "Ningbo", "name": "Zhongji", "natureOfBusiness": "Automotive International Trade", "organization": "Co., Ltd."}. This process is end-to-end and automated; the model directly learns from the original character sequence and outputs a structured tag sequence.
[0048] This word segmentation model typically employs a sequence labeling architecture (such as BiLSTM-CRF or a fine-tuned BERT). Trained on a large number of manually labeled company name samples (labeled with the four fields mentioned above), it learns to recognize the boundaries and patterns between place names, company names, industry terms, and organization types. Even when faced with new company names not found in the training set, containing emerging industry terms or special combinations (such as "ByteDance"), it can reasonably segment them based on its learned linguistic patterns. Through this step, whether the user inputs a standardized full registration name, a colloquial abbreviation, or a name fragment with omitted components, it can be transformed into a unified, computable, structured semantic object. This provides standardized, semantically rich input for subsequent knowledge graph queries and refined semantic matching, a crucial prerequisite for automating and refining the entire intelligent retrieval process.
[0049] Step 202: Obtain the enterprise knowledge graph and query the set of candidate enterprises in the enterprise knowledge graph that are associated with the enterprise query text based on the core name field; In this embodiment of the invention, when the system receives a query text, it identifies the brand semantics contained in the query text by querying a pre-built enterprise knowledge graph based on the parsed core name field, and dynamically expands the associated enterprise network. Using the core name field as the search key, it searches for matching brand nodes or enterprise nodes in the knowledge graph. If the core name directly matches or is highly associated with a brand node (for example, if a user inputs "Baidu Zhixing," the core name "Baidu Zhixing" can be associated with the "Baidu" brand through graph relationships), then by traversing the "brand affiliation" and other relationship edges under that brand node, it dynamically aggregates all associated subsidiaries, holding companies, and other enterprise entities to form a set of brand-related enterprises, which is then used as the candidate enterprise set for this search. If the core name field is not associated with any brand, it indicates that this query may be targeting a specific non-branded enterprise name, and no scope limitation will be imposed; the entire enterprise database will be used as the candidate enterprise set to ensure the completeness of the search.
[0050] In some embodiments, the enterprise knowledge graph is constructed in the following ways: Obtain the correspondence between the enterprise brand name and the enterprise registered name; establish the association between the enterprise brand name, the enterprise registered name and its associated parent company and subsidiaries; use the enterprise brand name as a tag and associate it with the corresponding parent company and subsidiary entities to form the enterprise knowledge graph.
[0051] A knowledge graph for the enterprise domain is constructed. The data for this knowledge graph is sourced from third-party companies such as Qichacha, acquired through procurement, and updated annually. The data source used is accurate, revised data from companies like Qichacha; any conflicts are manually corrected. The knowledge graph data does not need to be synchronized to the index data; instead, queries are triggered to access the knowledge graph. The knowledge graph supports dynamic updates, which can be performed during off-peak hours when there are fewer users. The aim is to establish a link between brand names and registered company names, resolving the issue of brand names not leading to identifiable company information.
[0052] Collect the correspondence between enterprise brand names and their officially registered names. For example, the officially registered name of the brand name "Kuaishou" is "Beijing Dajia Internet Information Technology Co., Ltd." Establish tag associations between brand names and the names of affiliated entities under the brand, including the hierarchical relationship between parent companies and subsidiaries. When multiple brands point to the same company (e.g., one company operates multiple brands), a company is allowed to contain multiple sub-brands, all belonging to the same parent company. Taking Baidu as an example, the parent company is Beijing Baidu Netcom Technology Co., Ltd.; subsidiaries include Beijing Baidu Zhixing Technology Co., Ltd., Duyunzhi (Shanghai) Information Technology Co., Ltd., Luobo Yunli (Beijing) Technology Co., Ltd., and Apollo Intelligent Technology (Beijing) Co., Ltd. By adding brand tags to all related sub-units, a corporate knowledge graph network is formed. For example, by adding the "Baidu" brand tag to all Baidu-related companies, all related companies can be recalled through the brand name during searches.
[0053] In this invention, the construction process begins with obtaining cleaned, structured relational data from authoritative data sources such as Qichacha, including the ownership relationship between brands and their legal entities, as well as the equity control chains between enterprises, connecting discrete enterprise entities into an organic graph network. For example, when constructing the "Baidu" knowledge graph, the system first establishes the brand affiliation relationship between the "Baidu" brand and "Beijing Baidu Netcom Technology Co., Ltd.", then establishes the relationship between Netcom Technology and dozens of subsidiaries such as "Beijing Baidu Zhixing Technology Co., Ltd.", and finally intelligently associates the "Baidu" brand tag with all entities in the entire holding chain, enabling the graph to support relational queries starting from any node (brand, core company, subsidiary).
[0054] This structured knowledge graph representation allows for the retrieval of not only the brand's direct subsidiaries but also second- and third-tier subsidiaries when a user query involves a brand. A strategy of annual full updates and incremental updates triggered by key changes maintains data freshness while controlling maintenance costs. Based on the constructed knowledge graph, scattered enterprise information is transformed into a semantically related network.
[0055] Step 203: In the candidate enterprise set, query the first target enterprise that matches the enterprise query text, and assign a score to the first target enterprise; In this embodiment of the invention, the first target enterprise that matches the enterprise query text is an exact match retrieval within the candidate enterprise set.
[0056] After obtaining a set of related candidate companies based on the enterprise knowledge graph, the hierarchical retrieval stage begins. The first target company whose query text matches the enterprise query text serves as the first layer of the hierarchical retrieval. This involves performing the highest-precision matching within the candidate company set expanded by the knowledge graph, i.e., a complete match between the user query text and the company's registered name. Successfully matched companies are assigned a first-layer score representing the highest relevance, thus establishing the top priority for ranking the search results.
[0057] This function receives the original enterprise query text input by the user and outputs a set of candidate enterprises. It iterates through each enterprise entity in the candidate enterprise set, performing a character-level precise comparison between its normalized "Enterprise Registered Name" field (stored in the index) and the enterprise query text. The judgment condition is whether the enterprise query text matches the "Enterprise Registered Name" field. For example, when the enterprise query text is "Beijing Baidu Netcom Technology Co., Ltd.", only entities with exactly the same registered name will pass this level of matching.
[0058] To improve the efficiency of traversal and comparison, the candidate enterprise set is usually in the form of a list of enterprise IDs. The system uses a pre-built fast query cache or database index with enterprise IDs as keys to quickly retrieve the "enterprise registration name" field corresponding to each ID for comparison.
[0059] Once a "Company Registration Name" field that perfectly matches the query text is found in the candidate company set, the company entity is immediately assigned a pre-defined Tier 1 score. This Tier 1 score is set to the highest value in the entire tiered scoring system. Its setting follows the core ranking principle of "exact match priority," aiming to ensure that results that perfectly match the user's literal query intent receive an overwhelming ranking advantage. In subsequent ranking steps, this high score directly determines the company's position at the top of the results list. In actual retrieval systems (such as Elasticsearch), this score is typically achieved by setting a very high boost weight coefficient (e.g., 128) for the "exact match" query clause. The document relevance score returned by the search engine is multiplied by this weight, thus dominating the overall score.
[0060] Companies that successfully match and receive a first-level score (referred to as "first target companies") are marked and excluded from processing in subsequent retrieval layers. This means that first target companies will not participate in subsequent substring matching and semantic matching. A company that is already completely consistent with the query is the most likely target the user is looking for, and there is no need to consume computing resources to perform fuzzy matching on it. This matching mechanism gradually reduces the size of the set of companies that need to be processed as the retrieval layers progress, effectively reducing the system's overhead in subsequent, more complex, and computationally more costly fuzzy matching layers.
[0061] Step 204: In the remaining companies in the candidate company set excluding the first target company, identify a second target company that contains the string of the company query text, and assign a score to the second target company; In this embodiment of the invention, after the first target company is selected through the exact matching layer, the retrieval process enters the second substring matching layer to handle situations where users often input incomplete, colloquial, or omitted components when entering company names. In the remaining candidate company set where exact matching failed, a suffix substring matching mechanism intelligently identifies relevant companies whose registered names contain the user's query text as a continuous suffix, assigning them a second-level score that is significantly lower than exact matching but higher than broader semantic matching, thereby establishing a clear second priority in the result ranking.
[0062] In the data indexing stage (when not querying), each enterprise registration name stored in ES has been subjected to backward edge N-Gram word segmentation by a custom back_edge_ngram_analyzer text analyzer. The original enterprise name is automatically disassembled into all possible consecutive suffix substrings (for example, "Guangxi Feifafa Trading Co., Ltd." will be disassembled into "Co.", "Trading Co.", "Trading Co., Ltd.", ... until the complete name), and an inverted index is established for these substrings.
[0063] During querying, the enterprise name tokenization model parses the enterprise query text to obtain structured semantic data. This structured semantic data may contain one or more semantic fields, and queries are executed on the enterprise name suffix substring index fields through the semantic fields. Using the structured semantic data parsed by the tokenization model (such as name: "iQIYI"), each field value is used as an independent query term, and the leftmost matching rule is adopted to match the above-mentioned suffix substring index. "Leftmost matching" means that in a certain suffix substring entry, the query term must appear at the leftmost end of the substring to be considered a successful match. Through "leftmost matching" and utilizing the index sorting feature, fast and accurate retrieval is achieved, quickly and accurately recalling all enterprises containing core semantic vocabulary (such as brand names, locations).
[0064] The core of this query is a logical "OR" (should) relationship among multiple parallel matching subconditions, with each subcondition corresponding to a semantic field. This query contains multiple parallel subconditions, each corresponding to a semantic field, and follows the "leftmost matching" principle: For the core name field (name): On the suffix substring index field, execute a leftmost matching query starting from the field value. Example: name: "iQIYI" will be converted to a query on the suffix substring index "Find all suffix substrings starting with 'iQIYI'". This will efficiently hit suffix entries such as "iQIYI Technology Co., Ltd.", "iQIYI (Shanghai) Co., Ltd.", etc. For the location field (location) and the business direction field (natureOfBusiness): The same logic is adopted, and leftmost matching queries are respectively executed on the suffix substring index fields. Example: location: "Beijing" will find suffix substrings starting with "Beijing"; natureOfBusiness: "Technology" will find suffix substrings starting with "Technology". Execute the above-built query in the candidate enterprise set. The search engine uses the inverted index to quickly find all enterprises that meet at least one "leftmost matching" subcondition. These enterprises are identified as the second target enterprises.
[0065] The combined query constructed above is executed on the set of candidate companies other than the first target company. The search engine (such as Elasticsearch) evaluates the matching performance of each company for each sub-condition in parallel. The more matching sub-conditions a company meets, the higher its matching degree at this layer. A base matching degree score for this layer is calculated using a field-weighted summation method, and then multiplied by a preset overall weight coefficient for the second layer to obtain the final "second-layer score". All companies matched by this layer of queries are identified as second target companies and receive their calculated second-layer scores.
[0066] All identified second-target companies are assigned a pre-defined second-level score. The second-level score is set according to the principle of "suboptimal for highly partial matches." Its score is set much lower than the first-level score, but significantly higher than the scores that subsequent semantic matching layers might achieve (e.g., a weighted boost value of 32, compared to 128 for exact matches and a base boost of 4 for semantic matching). A company whose name contains a complete, continuous segment of the input is more relevant than those that only match in core words or business direction.
[0067] In some embodiments, step 204 may include the following sub-steps: Sub-step S21: Extract the names of the remaining companies excluding the first target company from the end character and start from the end character to generate multiple strings of increasing length until the entire company name is included. Sub-step S22: Among the remaining companies excluding the first target company, determine the second target company whose company name contains the structured semantic data corresponding to the company query text.
[0068] In this embodiment of the invention, the suffix substring matching layer includes suffixing of the query text and suffix-based index matching and target recognition. The query string input by the user as a whole is transformed (decomposed) into a set of "keywords" with a specific structure that can be used for efficient indexing and querying through a pre-trained enterprise name word segmentation model.
[0069] The input is the names of the remaining enterprises except the first target enterprise. Starting from the last character of the enterprise name, it serves as the starting point of the operation. One character is incrementally added forward successively to generate a new and longer continuous substring until this substring is equal to the original complete enterprise name. After performing the above operations, a list of strings increasing in length will be generated, that is, the "suffix substring set". Taking the enterprise name "Guangxi Feifafa Business" as an example, the suffix substring set takes 1 character "Business" from the end, takes 2 characters "Business Trade" from the end, takes 3 characters "Fafa Business Trade" from the end, takes 4 characters "Feifafa Business Trade" from the end, takes 5 characters "Feifafa Business" from the end, takes 6 characters "West Feifafa Business" from the end, and takes all characters "Guangxi Feifafa Business". This generation method ensures that each string in the set is a continuous suffix of the enterprise query text.
[0070] Using the generated suffix substring set, in a specific enterprise set, efficiently search for and identify those enterprises whose semantic structure data of the enterprise name suffix substring entries match the enterprise query text. The input includes the generated suffix substring set and the enterprise set to be retrieved, that is, "the remaining enterprises in the candidate enterprise set except the first target enterprise" and the generated suffix substring set increasing in length. The determination logic is to traverse each enterprise in the enterprise set and perform a leftmost match query on the suffix substring index. The matching determination condition is that the semantic structure data of the enterprise query text appears at the leftmost end of the enterprise suffix substring entry, implementing the reverse logic of suffix matching through prefix query. All enterprises that meet the above matching conditions are identified and aggregated into the "second target enterprise" set. These enterprises are then given a second-level score.
[0071] In some embodiments, step S22 may include the following sub-steps: Sub-step S221, obtain the retrieval index; the retrieval index contains all possible continuous strings generated by successively intercepting each enterprise name character by character from the last character forward; Sub-step S222, according to the retrieval index, query the enterprise containing the structured semantic data corresponding to the enterprise query text as the second target enterprise.
[0072] Obtaining the retrieval index. By establishing a Back-NGram word segmentation index, it aims to support the fast matching of any substring and solve the problem of unable to retrieve uncommon words. The enterprise name is segmented word by word from the back to the front using NGram, generating all suffix substrings. For example, "Guangxi Feifafa Business Co., Ltd." is segmented into: "Co.", "Ltd.", "Co., Ltd.", "Business Co., Ltd.", "Business Co., Ltd.", "Feifafa Business Co., Ltd.", "Guangxi Feifafa Business Co., Ltd.", "Guangxi Feifafa Business Co., Ltd.", "Feifafa Business Co., Ltd.", "Business Co., Ltd.", "Ltd.", "Co.". The number of substrings generated by Back-NGram word segmentation will increase linearly with the length of the enterprise name. The name of an enterprise organization is not too long and is controlled within 256 characters. If it exceeds, it will not be split further.
[0073] By constructing a Back-NGram inverted index, the efficient matching ability for any suffix substring of the enterprise name is achieved. Specifically, by configuring the back_edge_ngram_analyzer analyzer in Elasticsearch, the enterprise name is processed with edge N-Gram word segmentation from the back to the front, generating all possible suffix substrings and establishing an inverted index. At the same time, a dual-field index structure of company_keyword (exact match) and company_substring (suffix substring match) is established, forming the basic retrieval ability of exact match and any suffix match. This design breaks through the dependence on the dictionary of traditional word segmentation and can directly support the retrieval requirements including uncommon words such as "Feifafa", and even out-of-vocabulary words can be fully recalled.
[0074] When constructing the index, a length limit of 256 characters is set to prevent the index from expanding excessively, maintaining the index performance while ensuring coverage of the vast majority of enterprise name lengths. Although the independent index fields for four semantic fields are not shown to be established, in the query stage, the structured fields obtained by segmenting the user query text are used as independent query conditions, and a weighted match is performed on the company_substring field to achieve a differential weighting effect. This design not only meets the need for semantic weighting but also avoids over-complicating the index structure.
[0075] In the embodiments of the present invention, the "retrieval index" is not created temporarily during querying, but is pre-batch constructed during initialization or data update. It resides in memory or high-speed storage as the core infrastructure of the enterprise retrieval service for reuse by all query requests. During the construction process, the following operations are performed for each enterprise registered name in the index (such as "Beijing Baidu Netcom Science and Technology Co., Ltd."): Starting from the last character (such as 'Co., Ltd.') of the name string, reverse interception is performed as the starting point. One character is sequentially added forward for each character to generate a new and longer continuous substring. This process continues until the generated substring is equal to the complete string of the enterprise name. Each generated substring is used as an independent index term (Term). The data structure of the index is an inverted index structure. That is, for each unique suffix substring, an inverted list is maintained in the index to record the IDs or pointers of all enterprise documents that contain this substring as a suffix.
[0076] Query the generated set of suffix substrings using a dedicated index and complete the final determination of the second target enterprise. Use the structured semantic data corresponding to the enterprise query text as the query term. The logic is to traverse each enterprise in the enterprise set and perform a leftmost match query on the suffix substring index. The matching determination condition is that the semantic structure data of the enterprise query text appears at the leftmost end of the enterprise suffix substring entry, and the reverse logic of suffix matching is achieved through prefix query. Merge the sets of enterprise documents returned by all substring queries to obtain a preliminary set of matching enterprises.
[0077] Each enterprise in the above enterprise set is officially determined as the "second target enterprise" for this retrieval. Immediately assign a preset second-layer score to all these second target enterprises and mark them so as to exclude them from the processing objects of the subsequent semantic matching layer.
[0078] Step 205, in the remaining enterprises in the candidate enterprise set excluding the first target enterprise and the second target enterprise, query for a third target enterprise whose enterprise name semantically matches the enterprise query text and assign a score to the third target enterprise; In the embodiments of the present invention, after both the current two-layer exact match and the suffix substring match fail to hit, refined calculations based on structured semantic features are performed on the remaining candidate enterprises. Based on the structured semantic data parsed from the user query text through the enterprise name tokenization model and the remaining enterprise set after being screened by the first two layers. The matching degrees of each semantic field of the query text and the corresponding part of the enterprise name (through enterprise tokenization information or registered name field) are respectively evaluated, and then weighted summation is performed according to the preset differential weights.
[0079] A carefully designed weighting system (e.g., name has the highest weight, followed by natureOfBusiness, and location and organization have the lowest weight) is used to calculate the final semantic score, and a third-level score is assigned to matching companies. This ensures that even if a company name does not overlap with the query text literally, as long as there is a semantic connection in the core name or business direction, it can still obtain a meaningful score and be recalled. On the other hand, the differentiated weighting effectively suppresses noisy companies that only match on common fields such as location or organization type from receiving high scores, thus achieving accurate ranking of the result set based on broad recall.
[0080] In some embodiments, step 205 may include the following sub-steps: Sub-step S21: Based on the structured semantic data corresponding to the enterprise query text, determine a third target enterprise whose name matches the structured semantic data from the remaining enterprises excluding the first target enterprise and the second target enterprise; the structured semantic data also includes at least one of the location field, business direction field, and organization type field.
[0081] In this embodiment of the invention, the deep semantic structure of the enterprise query text input by the user is obtained, transforming it from a continuous sequence of characters into structured field data with clear business meaning. This process is accomplished by calling a pre-trained enterprise name segmentation model (e.g., a sequence labeling model based on BiLSTM-CRF or BERT). This model has been trained on a large-scale labeled enterprise name dataset, learned the composition rules of Chinese enterprise names, and can accurately identify and extract key semantic components such as location (e.g., "Beijing"), core name (e.g., "iQiyi"), business direction (e.g., "technology"), and organization type (e.g., "Limited Company") from the text.
[0082] For example, when a user enters "Beijing iQiyi Technology Co., Ltd.", this step does not simply treat it as an indivisible string, but parses it as: {"location": "Beijing", "name": "iQiyi", "natureOfBusiness": "technology", "organization": "Limited Company"}.
[0083] "Among the remaining enterprises except the first target enterprise and the second target enterprise", it ensures the mutual exclusivity with the previous two layers and avoids double counting. Its core operation is to traverse each enterprise in the set of remaining enterprises based on the structured semantic data parsed from the enterprise query text, and determine whether its enterprise name (or the pre-stored tokenized structured data of this enterprise) has a semantic association with any one or more fields of the structured semantic data. The "matching" here is broad, and may include exact consistency of field values, partial inclusion, or semantic similarity calculated through vector similarity. For example, if the name field of the structured semantic data is "IQIYI", and the name field of a certain enterprise is "IQIYI (Shanghai)", it is determined to be a match. All enterprises determined by this broad match are identified as "third target enterprises".
[0084] Sub-step S23, obtain the matching degree of the enterprise name of the third target enterprise matching the structured semantic data; Sub-step S24, determine the score of the third target enterprise according to the matching degree and the preset field weights; the weight of the core name field is greater than the weight of the business direction field, and the weight of the business direction field is greater than or equal to the weights of the location field and the institution type field.
[0085] In an embodiment of the present invention, in the set of remaining enterprises after double screening of exact and substring matching, a refined correlation evaluation and score calculation process based on structured semantic features is executed.
[0086] For each identified third target enterprise, a more refined quantitative evaluation is performed in this step to calculate the matching degree of its enterprise name and the structured semantic data in each semantic dimension. Specifically, usually a matching degree score is calculated for each keyword field in the structured semantic data. If the enterprise corresponding field and the query field value are exactly the same, the matching degree is 1.0. If the query field value is completely included in the enterprise corresponding field, the matching degree is 1.0 (or a preset value). For example, in the organization field, "Limited Company" and "Joint Stock Limited Company" may be given a relatively high matching degree (such as 0.8).
[0087] The calculated field matching scores are weighted and summed according to a pre-defined, differentiated field weighting system to obtain the final semantic score for the third target company. For example, the weight of "name" can be set to 64, "natureOfBusiness" to 4, and "location" and "organization" to 1 each. This reflects the business logic that "the value of core name matching is far higher than that of general business terms, and business terms are slightly higher than location and organization type." Even if a company (such as "iQiyi (Shanghai) Information Technology Co., Ltd.") does not perfectly match the query ("Beijing iQiyi Technology Co., Ltd.") in terms of location and organization type, it can still obtain a considerable score as long as the core name "iQiyi" is highly matched, thus occupying a reasonable position in the results. This ensures that the ranking depth of the search results closely matches the user's true semantic intent.
[0088] Step 206: Based on the scores of the first target company, the second target company, and the third target company, determine the comprehensive score of each company in the candidate company set; In this embodiment of the invention, the matching scores generated from the aforementioned content, belonging to different levels, are integrated into a unique and comparable comprehensive relevance score for each enterprise. Because the three-layer retrieval employs a progressive filtering mechanism, each enterprise can obtain a score from at most one level (exact match, substring match, or semantic match). For any enterprise in the candidate enterprise set, its comprehensive score is the single score it has already obtained (first-level, second-level, or third-level score), ensuring the clarity of the scoring system and the certainty of the results.
[0089] For example, if a knowledge graph query shows that a third-target company belongs to the brand system associated with the user's query, even if it only receives a low semantic matching score, a "brand association bonus score" can be added at this step to moderately improve its ranking in the final list. The final output is a list containing all candidate companies and their comprehensive scores.
[0090] Step 207: Sort the candidate companies in the set of companies in descending order according to the comprehensive score to obtain a list of search results.
[0091] In this embodiment of the invention, the calculated comprehensive score representing the relevance of each enterprise is transformed into an intuitive, ordered, and directly usable decision-making basis for users. All candidate enterprises are sorted in descending order according to their comprehensive scores, generating the final search results list. This ensures that enterprises highly consistent with the user's query intent (such as precisely matched enterprises with high scores in the first layer) are placed at the top, while enterprises with decreasing relevance are arranged in descending order. The generated search results list directly serves the end user, and the rationality and stability of its sorting directly determine the quality of the user experience.
[0092] This invention achieves intelligent retrieval and accurate ranking of company names by constructing a "hierarchical retrieval strategy." First, a differentiated weight system is predefined and configured, assigning boost weights with significant differences (e.g., 128, 32, 4) to the exact matching layer, substring matching layer, and semantic fuzzy matching layer, respectively. Weights reflecting the importance of each field (name, natureOfBusiness, location, organization) within the semantic layer are also assigned (e.g., 64, 4, 1, 1), thereby establishing a priority order.
[0093] Secondly, during actual retrieval, a complex Boolean query is dynamically constructed and executed by integrating knowledge graphs, word segmentation models, and hierarchical strategies. Starting with the user's query text, a pre-trained word segmentation model of the company name is used to parse it into structured semantic data, and the knowledge graph is queried for brand association expansion. Subsequently, a three-layer `should` query is constructed based on this: the first layer performs exact matching, the second layer performs suffix substring matching, and the third layer uses each field obtained from word segmentation as an independent condition for fuzzy matching, applying preset field weights respectively. The query is executed in Elasticsearch using optimized indexes such as Back-NGram. The final document score is determined by the internal relevance score of Elasticsearch and the boost weights of each layer and field, generating a list of search results sorted in descending order of comprehensive relevance score.
[0094] Reference Figure 3 The diagram shows a logical block diagram of a company name retrieval method provided by an embodiment of the present invention. Figure 3 The complete execution flow of the enterprise name retrieval method according to an embodiment of the present invention is described: Starting with receiving the user's query text, the system first expands brand associations through an enterprise knowledge graph to obtain a set of candidate enterprises. Then, a three-layer progressive matching and scoring process is performed on the candidate set: first, exact matching is performed and a first-layer score is assigned; then, among the remaining enterprises, a second target enterprise is identified through suffix substring matching and assigned a second-layer score; finally, among the remaining enterprises, semantic matching is performed based on structured semantic data, and a third-layer score is assigned to the third target enterprise. Ultimately, the system aggregates the scores of all enterprises, determines the comprehensive score, and then sorts and generates a list of search results.
[0095] This invention discloses a method, apparatus, electronic device, and storage medium for enterprise name retrieval. The method includes: receiving enterprise query text input by a user and obtaining structured semantic data corresponding to the enterprise query text; obtaining an enterprise knowledge graph and querying a set of related candidate enterprises based on the structured semantic data; querying a first target enterprise in the candidate enterprise set that matches the enterprise query text and assigning a score to the first target enterprise; identifying a second target enterprise containing the string of the enterprise query text in the remaining enterprises in the candidate enterprise set excluding the first target enterprise and assigning a score to the second target enterprise; querying a third target enterprise whose enterprise name semantically matches the enterprise query text in the remaining enterprises in the candidate enterprise set excluding the first and second target enterprises and assigning a score to the third target enterprise; and sorting the enterprises in the candidate enterprise set according to their scores to generate a retrieval result list. By introducing an enterprise knowledge graph, it is possible to intelligently identify whether the user-input query text is associated with a specific brand and expand the retrieval to all related enterprises under that brand, significantly improving the completeness of the retrieval. Through a three-layer progressive retrieval strategy, it is possible to better understand the user's query intent, greatly improving retrieval accuracy and user experience.
[0096] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0097] Figure 4 This is a structural block diagram of a company name retrieval device provided in an embodiment of the present invention. (Refer to...) Figure 4 The device specifically includes the following modules: The query text receiving module 301 is used to receive enterprise query text input by the user and obtain the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; The enterprise set acquisition module 302 is used to acquire an enterprise knowledge graph and query the candidate enterprise set associated with the enterprise query text in the enterprise knowledge graph based on the core name field. The first target enterprise determination module 303 is used to query the candidate enterprise set for a first target enterprise that matches the enterprise query text, and assign a score to the first target enterprise. The second target enterprise determination module 304 is used to identify a second target enterprise containing the string of the enterprise query text from the remaining enterprises in the candidate enterprise set excluding the first target enterprise, and to assign a score to the second target enterprise. The third target enterprise determination module 305 is used to query the remaining enterprises in the candidate enterprise set excluding the first target enterprise and the second target enterprise, and to assign a score to the third target enterprise. The search result generation module 306 is used to sort the candidates based on their scores and generate a search result list based on the sorting results.
[0098] In some embodiments, the retrieval result generation module 306 includes: The enterprise comprehensive score determination submodule is used to determine the comprehensive score of each enterprise in the candidate enterprise set based on the scores of the first target enterprise, the second target enterprise, and the third target enterprise. The search results list determination submodule is used to sort the candidate companies in the set in descending order according to the comprehensive score to obtain the search results list.
[0099] In some embodiments, the second target enterprise determination module 304 includes: The string generation submodule is used to extract the names of the remaining companies excluding the first target company by extracting each character from the end character and generating multiple strings of increasing length until the entire company name is included. The second enterprise determination submodule is used to determine, from the remaining enterprises excluding the first target enterprise, a second target enterprise whose enterprise name contains the structured semantic data corresponding to the enterprise query text.
[0100] In some embodiments, the second enterprise determining submodule includes: The retrieval index acquisition unit is used to acquire the retrieval index; the retrieval index contains all possible continuous strings generated by extracting each enterprise name character by character from the end character forward. The second target enterprise query unit is used to query, based on the retrieval index, enterprises that contain structured semantic data corresponding to the enterprise query text as the second target enterprise.
[0101] In some embodiments, the third target enterprise determination module 305 includes: The third enterprise determination submodule is used to determine, based on the structured semantic data corresponding to the enterprise query text, a third target enterprise whose name matches the structured semantic data among the remaining enterprises excluding the first target enterprise and the second target enterprise; the structured semantic data also includes at least one of a location field, a business direction field, and an organization type field.
[0102] In some embodiments, the third target enterprise determination module 305 includes: The semantic matching degree acquisition submodule is used to obtain the matching degree between the enterprise name of the third target enterprise and the structured semantic data; The third enterprise rating determination submodule is used to determine the rating of the third target enterprise based on the matching degree and preset field weights; the weight of the core name field is greater than the weight of the business direction field, and the weight of the business direction field is greater than or equal to the weights of the location field and the organization type field.
[0103] In some embodiments, the query text receiving module 301 includes: The semantic data determination unit is used to parse the enterprise query text based on the pre-trained enterprise name word segmentation model to obtain the structured semantic data.
[0104] In some embodiments, the enterprise knowledge graph is constructed using the following modules: The brand name relationship acquisition module is used to obtain the correspondence between a company's brand name and its registered name. The association establishment module is used to establish the association relationship between the enterprise brand name, the enterprise registered name and its associated parent company and subsidiaries; The enterprise knowledge graph generation module is used to use the enterprise brand name as a tag and associate it with the corresponding parent company and subsidiary entities to form the enterprise knowledge graph.
[0105] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.
[0106] This invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described enterprise name retrieval method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0107] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described enterprise name retrieval method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for searching enterprise names, characterized in that, The method includes: The system receives enterprise query text input by the user and obtains the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field. Obtain the enterprise knowledge graph, and query the set of candidate enterprises in the enterprise knowledge graph that are associated with the enterprise query text based on the core name field; In the candidate enterprise set, a first target enterprise that matches the enterprise query text is queried, and a score is assigned to the first target enterprise; Among the remaining companies in the candidate company set excluding the first target company, identify a second target company that contains the string of the company query text, and assign a score to the second target company; Among the remaining companies in the candidate company set excluding the first target company and the second target company, a third target company whose company name semantically matches the company query text is queried, and a score is assigned to the third target company; The candidate companies are sorted according to their scores, and a list of search results is generated based on the sorting results.
2. The enterprise name retrieval method according to claim 1, characterized in that, The step of sorting the candidate companies based on their scores and generating a search result list based on the sorting results includes: Based on the scores of the first target company, the second target company, and the third target company, a comprehensive score is determined for each company in the candidate company set. Based on the comprehensive score, the candidate companies in the set are sorted in descending order to obtain a list of search results.
3. The enterprise name retrieval method according to claim 1, characterized in that, The identification of a second target enterprise containing a string of the enterprise query text includes: The names of the remaining companies excluding the first target company are extracted character by character from the end of the string, generating multiple strings of increasing length until the entire company name is included. Among the remaining companies excluding the first target company, a second target company is identified whose company name contains the structured semantic data corresponding to the company query text.
4. The enterprise name retrieval method according to claim 3, characterized in that, The step of determining the second target enterprise whose enterprise name contains structured semantic data corresponding to the enterprise query text includes: Obtain the search index; the search index contains all possible consecutive strings generated by extracting each enterprise name character by character from the last character forward. Based on the retrieval index, the enterprise containing the structured semantic data corresponding to the enterprise query text is the second target enterprise.
5. The enterprise name retrieval method according to claim 1, characterized in that, The third target companies whose names match the semantics of the query text include: Based on the structured semantic data corresponding to the enterprise query text, a third target enterprise whose name matches the structured semantic data is determined from the remaining enterprises excluding the first target enterprise and the second target enterprise; the structured semantic data also includes at least one of the following: location field, business direction field, and organization type field.
6. The enterprise name retrieval method according to claim 5, characterized in that, The process of assigning scores to the third target enterprise includes: Obtain the matching degree between the company name of the third target company and the structured semantic data; The score of the third target enterprise is determined based on the matching degree and the preset field weights; the weight of the core name field is greater than the weight of the business direction field, and the weight of the business direction field is greater than or equal to the weights of the location field and the organization type field.
7. The enterprise name retrieval method according to claim 1, characterized in that, The step of obtaining the structured semantic data corresponding to the enterprise query text includes: The enterprise name segmentation model obtained through pre-training is used to parse the enterprise query text to obtain the structured semantic data.
8. The enterprise name retrieval method according to claim 1, characterized in that, The enterprise knowledge graph is constructed in the following ways: Obtain the correspondence between the company's brand name and its registered name; Establish the relationship between the enterprise's brand name, the enterprise's registered name, and its associated parent company and subsidiaries; By using the company's brand name as a tag and linking it to the corresponding parent company and subsidiary entities, the aforementioned company knowledge graph is formed.
9. A company name retrieval device, characterized in that, The device includes: The query text receiving module is used to receive enterprise query text input by the user and obtain the structured semantic data corresponding to the enterprise query text; the structured semantic data includes a core name field; The enterprise set acquisition module is used to acquire the enterprise knowledge graph and query the candidate enterprise set associated with the enterprise query text in the enterprise knowledge graph based on the core name field. The first target enterprise determination module is used to query the candidate enterprise set for a first target enterprise that matches the enterprise query text, and assign a score to the first target enterprise. The second target enterprise determination module is used to identify a second target enterprise containing the string of the enterprise query text from the remaining enterprises in the candidate enterprise set excluding the first target enterprise, and to assign a score to the second target enterprise. The third target enterprise determination module is used to query the remaining enterprises in the candidate enterprise set excluding the first target enterprise and the second target enterprise, and to assign a score to the third target enterprise. The search result generation module is used to sort the companies in the candidate company set according to their scores and generate a search result list based on the sorting results.
10. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the enterprise name retrieval method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the steps of the enterprise name retrieval method as described in any one of claims 1-8.