A business name recognition method, system, device and medium
By employing layered processing logic and large-scale model inference, the problem of balancing accuracy and efficiency in enterprise name recognition technology has been solved, achieving efficient and accurate enterprise name recognition and ensuring data consistency in subsequent business systems.
Patent Information
- Application Number
- CN202511460760.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing enterprise name recognition technologies struggle to balance accuracy and efficiency, and are unable to effectively handle variations and indistinguishability of enterprise names, leading to missed detections or misjudgments of potentially related enterprises.
The system employs a hierarchical processing logic. First, it quickly filters irrelevant companies through database retrieval. Then, it uses a similarity model to screen preliminary identification results. Finally, it calls a large model for fine-tuning and combines standardized company names and user questions to generate prompts for the large model to perform inference, ensuring the accuracy of the identification results.
It achieves a balance between response efficiency and recognition accuracy, avoids matching deviations caused by inconsistent descriptions, ensures the credibility of the final results, and provides a unified corporate identity for subsequent business systems, avoiding business errors caused by inconsistent names.
Smart Images

Figure CN120929589B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing and information retrieval technology, and in particular to a method, system, device and medium for recognizing enterprise names. Background Technology
[0002] In scenarios such as intelligent data query systems, enterprise data query platforms, and business system data association, enterprise name recognition is a core prerequisite for achieving accurate data matching and business response. Users need to obtain data such as revenue, registered address, and credit information of specific enterprises by asking questions, and whether the system can accurately identify the enterprise information in the question directly determines the effectiveness of subsequent business processing.
[0003] As enterprise data scales and user queries become more diverse, existing enterprise name recognition technologies struggle to balance accuracy and efficiency. For example, when user queries contain abbreviations, aliases, or spelling errors in the enterprise name, relying on single keyword matching or named entity recognition can only determine the degree of overlap in the text and cannot link the query to the standard name, leading to missed or incorrect detections of potentially relevant enterprises. For enterprises with similar names but different attributes, relying solely on name text matching can easily confuse different entities, causing subsequent data queries to point to the wrong enterprise. Existing technologies often rely on a single model to process enterprise name matching, such as using only a local small model or a large model, which cannot balance accuracy and efficiency.
[0004] In summary, existing enterprise name recognition technologies suffer from core problems such as weak variant associations, difficulty in distinguishing between names with the same name, and reliance on a single model that fails to balance response efficiency and recognition accuracy. Summary of the Invention
[0005] This invention provides a method, system, device, and medium for enterprise name recognition to solve the above-mentioned technical problems.
[0006] This invention is achieved through the following technical solution:
[0007] A first aspect of the present invention provides a method for recognizing enterprise names, comprising:
[0008] Extract company-related terms from user questions;
[0009] The relevant terms for the enterprise are retrieved from a preset database to obtain candidate identification results; the candidate identification results are standardized enterprise names.
[0010] The similarity score between the enterprise-related terms and the candidate identification results is calculated using a similarity model to obtain preliminary identification results; the preliminary identification results are candidate identification results with a similarity score not lower than a set threshold.
[0011] If at least two of the preliminary identification results exist, a large model prompt statement is generated based on the user question, the enterprise-related terms, and the preliminary identification results;
[0012] The large language model is used to reason about the prompts of the large model to obtain the reasoning result. Based on the reasoning result, the enterprise name recognition result is obtained. The enterprise name recognition result is one of the preliminary recognition results.
[0013] Otherwise, the unique preliminary identification result will be used as the enterprise name identification result, or a request to obtain the enterprise name will be initiated to the user.
[0014] Furthermore, the preset database uses a structured storage method to store relevant enterprise data; the relevant data includes the enterprise's standardized enterprise name, non-standardized enterprise name, unified social credit code, industry, registered location, and affiliated enterprises;
[0015] The preset database provides search fields that match the relevant terms for the enterprise, and the candidate identification results are retrieved from the preset database by combining the search fields with the search algorithm; the search algorithm includes a fuzzy matching algorithm.
[0016] Further, a search weight is configured for each of the search fields; the step of combining the search fields with the search algorithm to retrieve the candidate identification results from the preset database includes:
[0017] The relevant terms for the aforementioned enterprises are segmented into words to obtain search keywords;
[0018] The enterprise-related terms and the search keywords are retrieved using multiple search fields to obtain the matching results corresponding to each search field;
[0019] The matching results are weighted by the retrieval weights to obtain a comprehensive weight for each matching result, and all matching results are sorted according to the comprehensive weights.
[0020] The top N matching results are taken as the candidate recognition results.
[0021] Furthermore, the similarity model is trained using similarity calculation sample pairs; wherein each similarity calculation sample pair consists of a standardized company name and the company name in the question context; the training method is as follows:
[0022] The similarity calculation sample pairs are classified according to different question scenarios. For each standardized enterprise name, at least one similarity calculation sample pair is selected from each category to form a training set.
[0023] The similarity score between sample pairs in the training set is calculated to obtain the annotation score.
[0024] The similarity calculation task is transformed into a regression task, and a lightweight model is selected as the similarity model to perform the regression task.
[0025] The similarity calculation samples are input into the similarity model to calculate the predicted similarity score. The mean squared error loss function is used to calculate the error between the predicted similarity score and the labeled score. The parameters of the similarity model are optimized to minimize the error.
[0026] Furthermore, the extraction of enterprise-related terms from user questions includes:
[0027] Natural language processing technology is used to analyze user questions and extract words and phrases related to enterprise information from the user questions.
[0028] The system detects whether the user's question contains a preset pronoun. If it does, the system performs disambiguation processing on the word or phrase based on the user's context information to obtain enterprise-related terms. Otherwise, the word or phrase is used as the enterprise-related term.
[0029] The user context information includes the enterprise information bound to the registered user in the business system, and / or the user's historical session information.
[0030] Furthermore, the preset pronouns include personal pronouns and enterprise attribute pronouns; the disambiguation processing of the words and sentences based on user context information includes:
[0031] If the phrase contains a personal pronoun, it will be replaced with the bound enterprise information of the object referred to by the personal pronoun; if there is no bound enterprise information, the enterprise-related terms will be determined based on the historical conversation information.
[0032] If the phrase contains enterprise attribute pronouns, then the phrase and the enterprise attribute pronouns are combined to form enterprise-related terms; the enterprise attribute pronouns include enterprise level, enterprise address, and industry.
[0033] Furthermore, if at least two of the aforementioned preliminary identification results exist, the method further includes:
[0034] The preliminary identification results are sorted in descending order of similarity score;
[0035] Calculate the similarity score difference between the preliminary identification results ranked first and second;
[0036] If the absolute value of the difference in similarity scores is greater than a first preset value, then the preliminary identification result ranked first is taken as the enterprise name identification result; otherwise, the enterprise name identification result is obtained through language big data model reasoning.
[0037] A second aspect of the present invention provides a company name recognition system, comprising:
[0038] The natural language processing module is used to extract company-related terms from user queries.
[0039] The database retrieval module is used to retrieve relevant terms for the enterprise from a preset database to obtain candidate identification results; the candidate identification results are standardized enterprise names.
[0040] The first calculation module is used to calculate the similarity score between the enterprise-related terms and the candidate identification results through a similarity model, and obtain a preliminary identification result; the preliminary identification result is the candidate identification result with a similarity score not lower than a set threshold.
[0041] The first identification module is configured to, when at least two preliminary identification results exist, generate a large-scale model prompt statement based on the user's question, the enterprise-related terms, and the preliminary identification results; and...
[0042] The large language model is used to reason about the prompts of the large model to obtain the reasoning result. Based on the reasoning result, the enterprise name recognition result is obtained. The enterprise name recognition result is one of the preliminary recognition results.
[0043] The second identification module is used to, when there are fewer than two preliminary identification results, use the unique preliminary identification result as the enterprise name identification result, or to initiate an enterprise name acquisition request to the user.
[0044] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the enterprise name recognition method according to any one of the first aspects of the present invention.
[0045] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the enterprise name recognition method according to any one of the first aspects of the present invention.
[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0047] To address the issue of reliance on a single model, this invention first uses database retrieval to quickly filter irrelevant companies, then uses a similarity model to screen preliminary identification results, and finally calls a large model for fine ranking. This hierarchical processing logic eliminates ambiguity in multiple results, achieving a balance between response efficiency and recognition accuracy.
[0048] The system retrieves diverse expressions provided by users from a pre-defined database and returns the associated standardized company names as search results, forming a mapping relationship between non-standardized expressions and standardized company names. This provides a unified matching benchmark for subsequent steps. The similarity model can clearly identify the semantic association between variations of user queries and each candidate recognition result, avoiding matching deviations caused by inconsistent expressions. It can quickly filter out results with low matching degrees, providing a more reliable basis for judgment in subsequent steps.
[0049] Based on standardized company names, user questions, and extracted company-related terms, a large model prompt statement is constructed to provide sufficient reasoning basis for the large model's reasoning, reduce semantic understanding costs, shorten reasoning time, and combine the large model's reasoning results with the preliminary recognition results to determine the final company name recognition result, avoiding model illusions that produce irrelevant results and ensuring the credibility of the final result.
[0050] Subsequent steps are based on standardized company names, enabling different business systems to associate data based on a unified company identifier and avoiding business errors caused by inconsistent names. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0052] Figure 1 This is a flowchart of a company name recognition method according to an embodiment of the present invention;
[0053] Figure 2 This is a schematic diagram of a multi-field retrieval method according to an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0055] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims, and accompanying drawings of this invention are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to other steps or units inherent in the device.
[0056] The terminology used in the various embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. The terms (such as those defined in commonly used dictionaries) are to be interpreted as having the same meaning as in the context of the relevant technical field and are not to be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0057] This invention aims to provide a hierarchical processing method based on semantic extraction, database retrieval, candidate sorting, and large model inference, which can achieve accurate extraction, efficient matching, and standardized output of enterprise names, improve response efficiency and user experience, and is applicable to scenarios such as intelligent question answering, enterprise data query, and business system data association.
[0058] like Figure 1 As shown, the enterprise name recognition method proposed in this invention includes the following steps.
[0059] S1, extract company-related terms from user questions.
[0060] S2, retrieve relevant enterprise terms from a preset database to obtain candidate identification results; among them, the candidate identification results are standardized enterprise names.
[0061] S3, calculate the similarity score between the enterprise-related terms and the candidate identification results using a similarity model, and obtain the preliminary identification result; wherein, the preliminary identification result is the candidate identification result whose similarity score is not lower than a set threshold.
[0062] S4. If there are at least two preliminary identification results, generate a large model prompt statement based on the user's question, enterprise-related terms, and preliminary identification results; reason about the large model prompt statement through the language large model to obtain the reasoning result, and obtain the enterprise name identification result based on the reasoning result; wherein, the enterprise name identification result is one of the preliminary identification results.
[0063] S5. Otherwise (if the number of preliminary identification results is less than two), the unique preliminary identification result will be used as the enterprise name identification result or a request to obtain the enterprise name will be initiated to the user.
[0064] By quickly filtering irrelevant companies through database retrieval and matching, then using a similarity model to screen preliminary identification results, and finally invoking a hierarchical processing logic for fine-tuning using a large model, a balance between response efficiency and identification accuracy is achieved. Using standardized company names as a unified benchmark for similarity calculation and large model inference avoids process deviations in hierarchical processing and provides a data association foundation for subsequent business systems.
[0065] Specifically, a first scoring threshold is set. If the similarity scores of all candidate identification results are lower than the first scoring threshold, and the number of preliminary identification results is 0, a request to obtain the company name is initiated to the user to retrieve the relevant query information. If only one candidate identification result has a similarity score not lower than the first scoring threshold, this unique result is output as the final identification result. Alternatively, if the similarity score of this unique preliminary identification result is higher than the first scoring threshold but lower than the second scoring threshold, a request to obtain the company name is also initiated to the user. If the similarity score of this unique preliminary identification result is higher than the second scoring threshold, this unique result is output as the final identification result.
[0066] Enterprise data from the business database is pre-stored into a pre-defined database based on the principles of searchability and easy matching. This pre-defined database uses a structured database, such as Elasticsearch. Search fields are designed to match user queries, and multiple search entry points are configured for extracted enterprise-related terms, covering core enterprise attributes and search optimization needs. These entries are then used by the database for full-text string, keyword, and character matching.
[0067] Preferably, the preset database stores relevant enterprise data using a structured storage method. This data includes the enterprise's standardized name, non-standardized name, unified social credit code, industry, registered address, and affiliated companies. Using multiple search fields provided by the preset database that match relevant enterprise terms, the system uses these search fields as entry points and employs a preset search algorithm to match candidate identification results corresponding to relevant enterprise terms in the structured storage information. The search algorithm includes exact matching and fuzzy matching; fuzzy matching allows for errors of 1-2 characters.
[0068] The aforementioned data covers the core attributes required for enterprise identification. Non-standardized enterprise names (such as abbreviations, aliases, pinyin, and similar-looking / sounding misspellings) can be directly used to match variant expressions in user queries. The industry and registered location can help distinguish subsequent enterprises with the same name. The credit code can serve as a fallback field for unambiguous and accurate matching, such as quickly locating an enterprise when directly entering the credit code.
[0069] Furthermore, a search weight is configured for each search field. Multi-field weighted retrieval is used to match the stored information corresponding to relevant terms for the retrieved company in a preset database, resulting in field search results weighted by the search weights. Specifically, the search weight assignment method is as follows: for different core attribute fields of the company in the database (such as full name, abbreviation, alias, etc.), different weight values are assigned based on the difference in contribution of each field to the accuracy of the match. See Table 1 for one example of search field and search weight configuration.
[0070] Table 1
[0071]
[0072] By configuring the search weights, the search method in step S2 is as follows: Figure 2 As shown.
[0073] S2-1, perform word segmentation on enterprise-related terms to obtain search keywords;
[0074] S2-2, retrieve relevant enterprise terms and their search keywords through multiple search fields to obtain matching results for each search field;
[0075] S2-3: The matching results are weighted by the retrieval weight of each retrieval field to obtain the comprehensive weight of each matching result, and all matching results are re-sorted according to the comprehensive weight.
[0076] S2-4: Take the first N matching results and output them as candidate recognition results for enterprise-related terms.
[0077] By configuring search weights for each search field, when matching by full name / abbreviation with user query word segmentation, the full name search has a higher overall weight than companies that only match by abbreviation, thus ensuring that companies that match the core field are output first.
[0078] Step S2-1 uses a word segmentation tool (such as IK Analyzer) to perform word segmentation processing, such as splitting "AB Data Group Co., Ltd." into "AB Data", "Group", and "Co., Ltd." to support partial keyword matching. The preset database constructs multi-field search statements based on enterprise-related terms and their search keywords, and sets the number N. The multi-field search results are automatically weighted and sorted according to the search weight, and the top N results are output.
[0079] The following is an example of a search query (N=10) for "AB Data (Beijing Subsidiary)" constructed using ElasticsearchDSL:
[0080] {
[0081] "query": {
[0082] "multi_match": {
[0083] "query": "AB Data Beijing Subsidiary",
[0084] "fields": ["full_name^3.0", "short_name^2.0", "alias^1.5", "keyword^1.0", "region^1.0"],
[0085] "type": "best_fields",
[0086] "fuzziness": "AUTO"
[0087] }
[0088] },
[0089] "size": 10 / / Returns a maximum of TOP10 results
[0090] }
[0091] Logstash is used to configure the preset database to synchronize with the business database (such as MySQL), automatically synchronizing incremental data from the business database to the preset database, and setting a synchronization period for full verification to ensure data consistency between the two databases.
[0092] In addition, if the number of search results is 0, the following message will be returned: No company related to XX was found. Please check if the name is correct. If the number of search results is 1, the normalized search result will be output directly.
[0093] To ensure the accuracy of subsequent search and inference results, relevant terms related to the company are extracted from user queries and semantic disambiguation is performed.
[0094] S3-1 uses natural language processing technology to analyze user questions and extract words and phrases related to enterprise information from the user questions;
[0095] S3-2, Detect whether the user's question contains a preset pronoun. If it does, disambiguate the words and phrases according to the user's context information to obtain enterprise-related terms; otherwise, use the words and phrases as the enterprise-related terms.
[0096] The user context information includes the enterprise information bound to the registered user in the business system, and / or the user's historical session information.
[0097] You can use large open-source models or large models that call API interfaces for natural language understanding and pronoun recognition to ensure semantic understanding accuracy. An example is shown below.
[0098] User Question 1: "What was the revenue of our company's data services last year?";
[0099] Output: {"extracted_company": "our company", "has_pronoun": true} / / true indicates that a pronoun has been detected.
[0100] User Question 2: "Where is the registered address of the Beijing subsidiary of AB Data?";
[0101] Output: {"extracted_company": "AB Data (Beijing Subsidiary)", "has_pronoun": false} / / false indicates that no pronoun has been detected.
[0102] User Question 3: "What is the growth rate of the data service industry this year?";
[0103] Output: {"extracted_company": "none", "has_pronoun": false} (Terminate the process and prompt the user to supplement enterprise information).
[0104] Among them, the preset pronouns include personal pronouns and enterprise attribute pronouns. Enterprise attribute pronouns such as enterprise level, enterprise address, industry, etc.
[0105] In step S3-2, disambiguation processing is performed on the words and sentences according to the user's context information, specifically including:
[0106] If it contains a personal pronoun, the words and sentences are replaced with the bound enterprise information of the object referred to by the personal pronoun. If there is no bound enterprise information, the enterprise-related entries are determined according to the historical conversation information;
[0107] If it contains an enterprise attribute pronoun, the words and sentences are combined with the enterprise attribute pronoun to form an enterprise-related entry.
[0108] For example, for the user question: "What was the revenue of our company's data services last year", the processing process is as follows:
[0109] A. The large model extracts company information: {"extracted_company": "our company", "has_pronoun": true};
[0110] B. Pronoun processing: Query the enterprise bound to the user account (bound_enterprise_name = "AB Data Group Co., Ltd."), and resolve "our company" as "AB Data Group Co., Ltd.";
[0111] C. When there is no bound company, query the historical conversation. In the previous round of questions, "AB Data's revenue", "our company" is resolved to "AB Data Group Co., Ltd.";
[0112] D. When there is no history of conversations, prompt the user: "Please confirm the specific company name corresponding to 'our company' (e.g., AB Data Group Co., Ltd.)".
[0113] Regarding the user question, "Where is the registered address of AB Data's Beijing subsidiary?", the processing procedure is as follows:
[0114] A. Extracting company information from the large model: {"extracted_company":"AB data","Beijing subsidiary","has_pronoun":true};
[0115] B. Pronoun processing: Combine the AB data with the Beijing subsidiary and output "AB data (Beijing subsidiary)".
[0116] The similarity model is used to quantify the match between company information in user queries and company information in the database. The training process needs to be designed around variations of company names (abbreviations, aliases, spelling errors) to ensure lightweight and rapid inference. The training method is as follows:
[0117] (1) Constructing a training set: Combine the standardized company name with the company name in the question scenario to form a similarity calculation sample pair, and classify the similarity calculation sample pair according to different question scenarios.
[0118] The basic data for the training set can be extracted from the business database, capturing core enterprise information such as the full name, abbreviation, and aliases of each company, and generating similarity calculation sample pairs in combination with actual user question scenarios.
[0119] For each standardized enterprise name, at least one similarity calculation sample pair is selected from each category to form a training set; and the similarity score of the sample pairs in the training set is calculated to obtain the annotation score (sample label).
[0120] Among them, the question scenarios cover full name matching, abbreviation / alias matching, spelling error matching, mixed industry / regional abbreviations and no matching. Based on the similarity, the sample pairs are labeled with the standard similarity score corresponding to the type (question scenario), as shown in Table 2.
[0121] Table 2
[0122]
[0123] Ultimately, 100,000 sample pairs were extracted, covering 10,000 enterprises × 10 scenario samples from the business database. Sample sets were constructed according to different question scenarios to ensure that the model learns the mapping relationships under diverse scenarios and avoids the model overfitting to a single scenario.
[0124] The extracted data undergoes data cleaning, including removing special characters, lowercase conversion, and standardizing text format. For example, "AB Data (Group)" is rewritten as "AB Data Group" to ensure consistency of model input.
[0125] (2) Regression training: Convert the similarity calculation task into a regression task, select a lightweight model (basic model) as the similarity model to perform the regression task; calculate the similarity scores of the input similarity model using the similarity calculation samples in the training set (batch input method can be used).
[0126] The mean squared error loss function (MSE) is used to calculate the error between the predicted similarity score and the labeled score for each similarity calculation sample pair. By optimizing the parameters of the similarity model, the MSE error is minimized (the mean absolute error (MAE) between the predicted similarity score and the labeled score is <0.5, ensuring accurate judgment of the matching degree difference).
[0127] Finally, the parameters of the similarity model are output, completing the training process.
[0128] The base model needs to be lightweight and locally deployable, supporting Chinese semantic understanding, such as sentence-transformers / all-MiniLM-L6-v2. Training parameters are set as follows: learning rate 5e-5, batch size 32, 5-10 training epochs, and a validation set of 20% of the total samples for monitoring overfitting. The similarity model uses TensorRT quantization for accelerated deployment, quantized to FP16, and encapsulated as an HTTP interface.
[0129] The similarity score between enterprise-related terms and candidate identification results is calculated using a similarity model. An example of the preliminary identification results is shown below:
[0130] Model input: {"query_company":"AB Data","candidate_companies":["AB Data Group Co., Ltd.","AB Data Technology Co., Ltd."]};
[0131] Model output: [{"candidate_company":"AB Data Group Co., Ltd.","similarity_score": 9.5},{"candidate_company":"AB Data Technology Co., Ltd.","similarity_score": 7.8}].
[0132] If the similarity score threshold is set to 5, and the similarity scores of the two candidate recognition results are both higher than the set threshold, two preliminary recognition results are obtained.
[0133] At least two preliminary identification results are refined using a large model. Based on the user's question, the relevant enterprise terms, and the preliminary identification results, a prompt statement for the large model is generated and input into the large model for reasoning to obtain the final identification result.
[0134] By supplementing the judgment criteria, the large model is guided to analyze from the perspective of matching business needs, rather than relying solely on literal similarity. The following prompt words are input into the large model:
[0135] "Task: Select the company that best matches the user's question from the list of candidate companies, and output the company's full name, enterprise_id, and the reason for the judgment. The reason should be closely related to the user's question and the company's attributes (level, industry, region, alias)."
[0136] 1. User question: What was the revenue of AB Data's Beijing subsidiary last year?
[0137] 2. Extracted company-related terms: AB data (Beijing subsidiary);
[0138] 3. List of candidate companies: AB Data Group Co., Ltd. (Beijing subsidiary), AB Data Technology Co., Ltd. (Beijing branch), AB Data Services Co., Ltd. (Beijing headquarters);
[0139] 4. Additional Judgment Criteria: If the user's question contains hierarchical keywords such as "subsidiary / branch / headquarters", prioritize matching companies at the same hierarchical level; if the user's question contains business requirements (such as revenue, registered address), prioritize matching companies in industries and businesses related to the business; if the user's question contains regional keywords, it is necessary to confirm that the company's region matches the geographical location.
[0140] The inference results obtained from the large model are shown below:
[0141] {
[0142] "best_enterprise": {
[0143] "full_name": "AB Data Group Co., Ltd. (Beijing Subsidiary)",
[0144] "enterprise_id": "ent_123",
[0145] "credit_code": "91110102MA01Y3XX1X"
[0146] },
[0147] Reasons: 1. The user's core requirement is to query the revenue of "AB Data"'s "subsidiary" in Beijing last year, which must simultaneously meet three conditions: "name contains AB Data," "level = subsidiary," and "region = Beijing"; 2. AB Data Group Co., Ltd. (Beijing Subsidiary) has "level = subsidiary," "region = Xicheng District, Beijing (belonging to Beijing)," and "alias contains 'A Data Beijing Subsidiary,'" which perfectly matches the extracted "AB Data (Beijing Subsidiary)"; and "industry = data services" (related to the revenue query business scenario); 3. AB Data Technology Co., Ltd. (Beijing Branch) has "level = branch," which does not meet the "subsidiary" requirement; AB Data Service Co., Ltd. (Beijing Headquarters) has "level = headquarters," which also does not meet the "subsidiary" requirement, so it is excluded.
[0148] }
[0149] Furthermore, the system verifies whether the best result recommended by the large model is in the candidate company list to avoid model illusion. If the recommended result is one of the preliminary identification results (in the candidate company list), then this result is returned to the user or transferred to the subsequent business system as the final identification result of the company-related terms in the user's question. If an illusion occurs, the large model is called again with the additional prompt "Select only from the candidate company list, and do not add companies outside the list", with a maximum of 2 retries; if it still fails after retries, the user is prompted "The optimal company cannot be determined at the moment. Please select from the following options: 1. AB Data Group Co., Ltd. (Beijing Subsidiary); 2. AB Data Technology Co., Ltd. (Beijing Branch)".
[0150] Finally, the final identification results are output in a structured and standardized format, such as a unified output of: unique enterprise ID + standardized full name + credit code. This ensures the consistency of data association in subsequent business systems (such as querying revenue, legal representative, registered address, etc.) and avoids business errors caused by inconsistent names. The matching trajectory is also retained for easy troubleshooting and user explanation.
[0151] When pursuing localized deployment, Qwen-7B-Chat (which supports long text understanding and business logic reasoning) can be used as the large inference model. When pursuing higher accuracy, GPT-4oMini or Wenxin Yiyan API can be called to ensure that the task requirements and enterprise attributes are deeply associated.
[0152] In a preferred embodiment, when there are at least two preliminary identification results, the preliminary identification results are first sorted in descending order of similarity score; the difference in similarity score between the first and second ranked preliminary identification results is calculated; if the absolute value of the difference in similarity score is greater than a first preset value, the first ranked preliminary identification result is taken as the enterprise name identification result; otherwise, the enterprise name identification result is obtained through language big data model reasoning.
[0153] For example, the preliminary identification results are: 1. AB Data Group Beijing subsidiary, similarity score 9.9; 2. AB Data Technology Beijing branch, similarity score 7.2; 3. AB Data Services Beijing headquarters, similarity score 5.5. The similarity score difference between result 1 and result 2 is 2.7 > the preset value of 2, so AB Data Group Beijing subsidiary is output according to the standard format, without the need for language large model inference.
[0154] Embodiments of the present invention also provide an enterprise name recognition system for executing the enterprise name recognition method of any of the above embodiments of the present invention. The system includes:
[0155] The natural language processing module is used to extract company-related terms from user queries.
[0156] The database retrieval module is used to search for enterprise-related terms in a preset database and obtain candidate recognition results; the candidate recognition results are standardized enterprise names.
[0157] The first calculation module is used to calculate the similarity score between enterprise-related terms and candidate recognition results through a similarity model, and obtain preliminary recognition results; the preliminary recognition results are candidate recognition results with similarity scores not lower than a set threshold.
[0158] The first identification module is used to generate a large model prompt statement based on the user's question, relevant enterprise terms, and the preliminary identification results when at least two preliminary identification results exist; and...
[0159] The large language model is used to reason about the prompts in the large model, and the reasoning result is obtained. The enterprise name recognition result is obtained based on the reasoning result. The enterprise name recognition result is one of the preliminary recognition results.
[0160] The second identification module is used to take the only preliminary identification result as the enterprise name identification result when there are fewer than two preliminary identification results, or to initiate an enterprise name retrieval request to the user.
[0161] The natural language processing module uses open-source large-scale models to parse user queries and extract words and phrases related to company information. The large-scale language models employ Qwen-7B-Chat, GPT-4oMini, or the Wenxin Yiyan API.
[0162] Furthermore, the natural language processing module also includes a semantic disambiguation module, which is used to disambiguate enterprise-related information in user queries based on user context information.
[0163] The semantic disambiguation module includes a pronoun detection module, which is used to detect preset pronouns contained in user queries. Preset pronouns include personal pronouns and enterprise attribute pronouns. Enterprise attribute pronouns include enterprise level, enterprise address, and industry.
[0164] When the pronoun detection module detects that the preset pronoun contained in the user's question is a personal pronoun, the semantic disambiguation module replaces the word with the bound enterprise information of the object referred to by the personal pronoun. If there is no bound enterprise information, the enterprise-related terms are determined based on the historical conversation information.
[0165] When the pronoun detection module detects that the preset pronouns contained in the user's question are enterprise attribute pronouns, the semantic disambiguation module combines the words and the enterprise attribute pronouns to form enterprise-related terms.
[0166] Embodiments of the present invention also provide a business system, wherein the front end of the business system is connected to an intelligent query system, and the back end is connected to the enterprise name recognition system of the present invention. The intelligent query system receives user queries and, during the execution of the enterprise name recognition task, interacts with both the business system and the enterprise name recognition system, and utilizes the enterprise name recognition system to execute the enterprise name recognition method of any of the above embodiments of the present invention.
[0167] Embodiments of the present invention also provide an electronic device including a processor and a memory, wherein the number of processors may be one or more. The memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory, thereby implementing the enterprise name recognition method of any of the above embodiments of the present invention.
[0168] The memory may primarily comprise a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks (LANs), mobile communication networks, and combinations thereof.
[0169] Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the enterprise name recognition method of any embodiment of the present invention.
[0170] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0171] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0172] Embodiments of the present invention also provide a computer program product that, when run on a computer, causes the computer to execute the enterprise name recognition method of any of the above embodiments of the present invention.
[0173] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for recognizing enterprise names, characterized in that, include: Extract company-related terms from user questions; The relevant terms for the enterprise are retrieved from a preset database to obtain candidate identification results; The candidate identification results are standardized company names; The similarity score between the enterprise-related terms and the candidate identification results is calculated using a similarity model to obtain preliminary identification results; the preliminary identification results are candidate identification results with a similarity score not lower than a set threshold. If at least two of the preliminary identification results exist, a large model prompt statement is generated based on the user question, the enterprise-related terms, and the preliminary identification results; The large language model is used to reason about the prompts of the large model to obtain the reasoning results, and the enterprise name recognition results are obtained based on the reasoning results. The enterprise name recognition result is one of the preliminary recognition results; Otherwise, the unique preliminary identification result will be used as the enterprise name identification result, or a request to obtain the enterprise name will be initiated to the user.
2. The enterprise name recognition method according to claim 1, characterized in that, The preset database uses a structured storage method to store relevant enterprise data; the relevant data includes the enterprise's standardized enterprise name, non-standardized enterprise name, unified social credit code, industry, registered location, and affiliated enterprises; The preset database provides search fields that match the relevant terms for the enterprise, and the candidate identification results are retrieved from the preset database by combining the search fields with the search algorithm; the search algorithm includes a fuzzy matching algorithm.
3. The enterprise name recognition method according to claim 2, characterized in that, Assigning retrieval weights to each of the retrieval fields; retrieving the candidate identification results from the preset database by combining the retrieval fields with the retrieval algorithm includes: The relevant terms for the aforementioned enterprises are segmented into words to obtain search keywords; The enterprise-related terms and the search keywords are retrieved using multiple search fields to obtain the matching results corresponding to each search field; The matching results are weighted by the retrieval weights to obtain a comprehensive weight for each matching result, and all matching results are sorted according to the comprehensive weights. The top N matching results are taken as the candidate recognition results.
4. The enterprise name recognition method according to claim 1, characterized in that, The similarity model is trained using similarity calculation sample pairs; each similarity calculation sample pair consists of a standardized company name and the company name in the question context; the training method is as follows: The similarity calculation sample pairs are classified according to different question scenarios. For each standardized enterprise name, at least one similarity calculation sample pair is selected from each category to form a training set. The similarity score between sample pairs in the training set is calculated to obtain the annotation score. The similarity calculation task is transformed into a regression task, and a lightweight model is selected as the similarity model to perform the regression task. The similarity calculation samples are input into the similarity model to calculate the predicted similarity score. The mean squared error loss function is used to calculate the error between the predicted similarity score and the labeled score. The parameters of the similarity model are optimized to minimize the error.
5. The enterprise name recognition method according to claim 1, characterized in that, The extraction of enterprise-related terms from user questions includes: Natural language processing technology is used to analyze user questions and extract words and phrases related to enterprise information from the user questions. The system detects whether the user's question contains a preset pronoun. If it does, the system performs disambiguation processing on the word or phrase based on the user's context information to obtain enterprise-related terms. Otherwise, the word or phrase is used as the enterprise-related term. The user context information includes the enterprise information bound to the registered user in the business system, and / or the user's historical session information.
6. The enterprise name recognition method according to claim 5, characterized in that, The preset pronouns include personal pronouns and enterprise attribute pronouns; the disambiguation processing of the words and sentences based on user context information includes: If the phrase contains a personal pronoun, it will be replaced with the bound enterprise information of the object referred to by the personal pronoun; if there is no bound enterprise information, the enterprise-related terms will be determined based on the historical conversation information. If the phrase contains enterprise attribute pronouns, then the phrase and the enterprise attribute pronouns are combined to form enterprise-related terms; the enterprise attribute pronouns include enterprise level, enterprise address, and industry.
7. The enterprise name recognition method according to claim 1, characterized in that, If at least two of the preliminary identification results exist, the method further includes: The preliminary identification results are sorted in descending order of similarity score; Calculate the similarity score difference between the preliminary identification results ranked first and second; If the absolute value of the difference in similarity scores is greater than a first preset value, then the preliminary identification result ranked first is taken as the enterprise name identification result; otherwise, the enterprise name identification result is obtained through language big data model reasoning.
8. A company name recognition system, characterized in that, include: The natural language processing module is used to extract company-related terms from user queries. The database retrieval module is used to retrieve relevant terms for the enterprise from a preset database to obtain candidate identification results; the candidate identification results are standardized enterprise names. The first calculation module is used to calculate the similarity score between the enterprise-related terms and the candidate identification results through a similarity model, and obtain a preliminary identification result; the preliminary identification result is the candidate identification result with a similarity score not lower than a set threshold. The first identification module is used to generate a large model prompt statement based on the user question, the enterprise-related terms, and the preliminary identification results when there are at least two preliminary identification results. as well as, The large language model is used to reason about the prompts of the large model to obtain the reasoning results, and the enterprise name recognition results are obtained based on the reasoning results. The enterprise name recognition result is one of the preliminary recognition results; The second identification module is used to, when there are fewer than two preliminary identification results, use the unique preliminary identification result as the enterprise name identification result, or to initiate an enterprise name acquisition request to the user.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the enterprise name recognition method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the enterprise name recognition method according to any one of claims 1-7.
Citation Information
Patent Citations
Government affair intelligent response device and method based on intention recognition and large language model
CN118035419A
Knowledge graph-based traffic engineering large model intelligent question-answering system and method
CN120407752A