Quick retrieval system and method for querying similar enterprises
By constructing a pre-defined vector representation database and an enterprise clustering library, the problem of low relevance in enterprise similarity retrieval in existing technologies is solved, and efficient enterprise similarity retrieval is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2026-03-24
AI Technical Summary
Existing enterprise similarity retrieval methods only consider the literal similarity of words, resulting in insufficient relevance of recalled documents and low retrieval efficiency.
By constructing a pre-defined vector representation database, the main business of the target enterprise is obtained and a representation vector is generated. The enterprise clustering library is used to match the clusters, reducing the traversal matching process and improving retrieval efficiency.
It improved the vector representation capability of the main business, reduced the amount of data computation, and improved retrieval efficiency and the relevance of recall results.
Smart Images

Figure CN121722902A_ABST
Abstract
Description
[0001] The application is a divisional application, the basis of the divisional application is the invention patent application with the application date of 2023.07.25, the application number of 202310915004.1, and the invention name of "a fast retrieval method and system for querying similar enterprises". TECHNICAL FIELD
[0002] The application relates to the technical field of enterprise query, in particular to a fast retrieval system and method for querying similar enterprises. BACKGROUND
[0003] With the increase in the number of enterprises, and the difference in the main business of each enterprise, in the process of mining similar enterprises, the accuracy of the main business representation of the enterprise and the huge calculation of the similarity between the main business representations need to be considered. Therefore, how to construct the enterprise peer portrait through a fast and effective similar enterprise retrieval method plays a key role in mining similar enterprises.
[0004] At present, in the information retrieval process, the commonly used retrieval method is ES retrieval (Elasticsearch, Elasticsearch). It obtains multiple feature words by segmenting the content to be retrieved, and then calculates the similarity between the multiple feature words after segmentation and the enterprise database to recall the documents related to the content to be retrieved.
[0005] However, the above retrieval method only considers the similarity of the segmented words, which leads to insufficient relevance of the recalled documents. SUMMARY
[0006] In view of the problem that the commonly used retrieval method only considers the similarity of the segmented words, which leads to insufficient relevance of the recalled documents, the application provides a fast retrieval system and method for querying similar enterprises.
[0007] In a first aspect, the application provides a fast retrieval method for querying similar enterprises, applied to a server, the method comprising: obtaining the main business of a target enterprise input by a user; matching the main business with a preset vector representation database to obtain a first representation vector, the first representation vector comprising a first enterprise cluster number, the first enterprise cluster number representing a vector number of the main business type of the target enterprise, the preset vector representation database comprising a corresponding relationship between the main business and its corresponding representation vector; matching the first enterprise cluster number with a preset enterprise cluster library to obtain a cluster cluster corresponding to the first enterprise cluster number, the preset enterprise cluster library comprising a corresponding relationship between the cluster number and the cluster cluster, and the cluster cluster corresponding to the first enterprise cluster number comprising the main business documents of a plurality of enterprises with the same main business type as the target enterprise; and obtaining a plurality of enterprises with the same main business type as the target enterprise based on the cluster cluster corresponding to the first enterprise cluster number.
[0008] By adopting the technical scheme, the main business of the target enterprise is matched with the preset vector representation database, so that the first representation vector with high representation capability is obtained; the problem of low vector representation capability of the main business is solved, and the first enterprise cluster number in the first representation vector is used to match the cluster cluster corresponding to the first enterprise cluster number from the preset enterprise cluster library; at this time, it is not necessary to traverse and match the main business of the target enterprise with the enterprise database, and only by using the cluster number corresponding to the cluster cluster, other enterprises with high similarity to the main business of the target enterprise can be obtained, so that the efficiency of retrieval is improved.
[0009] In a second aspect, the application provides a fast retrieval system for querying similar enterprises, the system being a server, the server comprising an acquisition module and a processing module, wherein: The acquisition module is configured to acquire the main business of a target enterprise input by a user. The processing module is configured to match the main business with a preset vector representation database to obtain a first representation vector, the first representation vector comprising a first enterprise cluster number, the first enterprise cluster number representing a vector number of a main business type of the target enterprise, the preset vector representation database comprising a corresponding relationship between a main business and a representation vector corresponding thereto; match the first enterprise cluster number with a preset enterprise cluster library to obtain a cluster cluster corresponding to the first enterprise cluster number, the preset enterprise cluster library comprising a corresponding relationship between a cluster number and a cluster cluster, the cluster cluster corresponding to the first enterprise cluster number comprising main business documents of a plurality of enterprises with the same main business type as the target enterprise; and based on the cluster cluster corresponding to the first enterprise cluster number, obtain a plurality of enterprises with the same main business type as the target enterprise.
[0010] Optionally, before matching the main business with the preset vector representation database to obtain the first representation vector, the following steps are included: The acquisition module acquires a plurality of brief introduction texts of enterprises; and a preset rule screening model is used to extract main businesses in the plurality of brief introduction texts, the preset rule screening model being defined with a plurality of information screening rules, wherein one brief introduction text corresponds to one main business, and one main business comprises a plurality of main business words. The processing module inputs the first main business into a plurality of preset pre-training models to obtain a plurality of first text vectors, the first main business being any one of the plurality of main businesses; performs first pooling processing on the plurality of first text vectors respectively to generate a plurality of second text vectors; performs second pooling processing on the plurality of second text vectors to obtain a third text vector; and stores the third text vector as a representation vector corresponding to the first main business in the preset vector representation database.
[0011] By adopting the above technical solution, the vectors of multiple main keywords contained in the main business are fused into a comprehensive vector through the first pooling process, thereby reducing the amount of data computation. The comprehensive vector is then input into multiple pre-trained models, and the output results are then pooled a second time. This reduces the decrease in vector representation accuracy of the main business caused by the first pooling process, and combines the good representation capabilities of multiple pre-trained models, resulting in a significant improvement in the vector representation of the main business.
[0012] Optionally, before matching the main business with a preset vector representation database to obtain the first representation vector, the method further includes: an acquisition module retrieving multiple word vector models from a preset word vector model library; constructing a training sample library from the main businesses of the multiple enterprises; a processing module inputting data from the training sample library into the multiple word vector models to obtain multiple training text vectors; calculating the evaluation value corresponding to each of the multiple word vector models based on the multiple training text vectors using a vector space distribution evaluation function; sorting the evaluation values corresponding to each of the multiple word vector models from largest to smallest to generate a ranking table; and using the multiple word vector models ranked in the ranking table with a rank greater than or equal to a preset rank as pre-trained models.
[0013] By adopting the above technical solution, since different pre-trained models have different representation capabilities, and retraining a word vector model with better representation capabilities requires a lot of time, this solution directly uses multiple pre-trained word vector models as pre-trained models. Then, a training sample library containing the main business information is input into these multiple word vector models, and their representation capabilities are evaluated. Based on the evaluation values, the few word vector models with better representation capabilities are selected as pre-trained models. Therefore, it eliminates the need to spend a lot of time training models and obtains multiple pre-trained models with good representation capabilities.
[0014] Optionally, based on multiple training text vectors, the evaluation values of each word vector model are calculated using a vector space distribution evaluation function, specifically: Where T is the evaluation value, W xi W is the training text vector corresponding to the i-th main keyword of the x-th main business category. yj Let be the training text vector corresponding to the i-th main word of the y-th main business category, n be the number of main business categories, m be the number of main words in the n-th main business category, the numerator is used to represent the average similarity between multiple main words of the same main business, and the denominator is used to represent the average similarity value between multiple main words corresponding to different main businesses.
[0015] By adopting the above technical solution and based on the calculation formula of the evaluation value of the above word vector model, the evaluation is conducted on whether the word vector model can associate multiple main words of the same main business and whether the word vector model can distinguish multiple main words corresponding to different main businesses. Based on the evaluation value, it is determined whether the word vector model meets the representation requirements of the pre-trained model.
[0016] Optionally, the processing module iterates through the word vector dimensions of multiple word vector models; if the first word vector dimension is less than or equal to the second word vector dimension, then the first word vector dimension is determined as the standard vector dimension, and the first word vector dimension and the second word vector dimension are any two word vector dimensions among multiple word vector dimensions; the word vector dimensions corresponding to each of the multiple word vector models are compressed to the standard vector dimension respectively.
[0017] By adopting the above technical solution, the word vector dimensions of multiple word vector models are compressed to a unified vector dimension, so that the word vectors output by multiple word vector models are aligned in the vector space, thereby enabling the fusion of the output results of multiple word vector models.
[0018] Optionally, before matching the first enterprise cluster number with the preset enterprise clustering library to obtain the cluster corresponding to the first enterprise cluster number, the method further includes: the acquisition module determining multiple enterprise cluster numbers in the preset enterprise clustering library based on the main business classification tree; the processing module clustering the representation vectors of multiple main businesses in the preset vector representation database based on the multiple enterprise cluster numbers to obtain multiple clusters, wherein one enterprise cluster number corresponds to one cluster; and constructing a correspondence between the multiple enterprise cluster numbers and the clusters corresponding to each of the multiple enterprise cluster numbers, and storing it in the preset enterprise clustering library.
[0019] By adopting the above technical solution, due to the large number of main business operations, the clustering clusters classify and summarize the massive amount of main business data, gather main business data with high similarity into the same cluster, and divide main business data with low similarity into different clusters. Finally, a cluster is represented by an enterprise cluster number, thereby reducing the amount of data processing during data matching and improving the efficiency of data matching.
[0020] Optionally, the acquisition module acquires the representation vector of the second main business and the center vector of multiple enterprise cluster numbers. The second main business is any one of the multiple main businesses in the preset vector representation database. When the cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is greater than or equal to a preset threshold, the processing module constructs a correspondence between the representation vector of the second main business and the second enterprise cluster number. The second enterprise cluster number is any one of the multiple enterprise cluster numbers.
[0021] By adopting the above technical solution, based on the cosine distance between the representation vector of the second main business and the center vector of multiple enterprise cluster numbers, it is determined which enterprise cluster number is most similar to the second main business. This improves the correlation between main businesses of the same type and makes it difficult to distinguish between main businesses of different types, so that the recall results corresponding to the main business of the target enterprise have high relevance.
[0022] Thirdly, this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of the first aspects.
[0023] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any one of the first aspects.
[0024] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Match the target company's main business with a preset vector representation database to obtain a first representation vector with high representation capability. This solves the problem of low vector representation capability of the main business. Then, using the first company cluster number in the first representation vector, the cluster corresponding to the first company cluster number is matched from the preset company cluster library. At this point, it is no longer necessary to traverse and match the target company's main business with the company database. The main business documents of other companies with high similarity to the target company's main business can be obtained simply by using the cluster number corresponding to the cluster, thereby improving the retrieval efficiency.
[0025] 2. Since different pre-trained models have varying representational capabilities, retraining a word vector model with better representational capabilities requires a significant amount of time. Therefore, by directly using multiple pre-trained word vector models as pre-trained models, and then inputting a training sample library containing the main business information into these models, the representational capabilities of each model are evaluated. Based on the evaluation values, the best-performing word vector models are selected as the pre-trained models. This eliminates the need for extensive model training and yields multiple pre-trained models with good representational capabilities. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a fast retrieval method for searching similar companies provided in an embodiment of this application; Figure 2 This is a schematic diagram of the first pooling process provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of a fast retrieval system for querying similar companies provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0027] Explanation of reference numerals in the attached drawings: 1. Acquisition module; 2. Processing module; 400. Electronic device; 401. Processor; 402. Communication bus; 403. User interface; 404. Network interface; 405. Memory. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0029] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0030] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0031] With the development of the social economy, enterprises are gradually becoming more diversified. Even if two enterprises are in the same industry, their main businesses may still differ. Therefore, when identifying similar enterprises, the representation of the enterprise's main business is crucial, and the accuracy of this representation will directly affect the results of identifying similar enterprises.
[0032] Currently, the most commonly used information retrieval method is Elasticsearch (ES). It segments the user's search input into multiple feature words; then, it calculates the similarity between these feature words and a corporate database to retrieve documents related to the search query. However, ES doesn't perform extensive representation processing on the search query before retrieval; it simply converts the feature words into text vectors and calculates similarity with the corporate database. This easily leads to weak relevance between the retrieved results and the search query. Representation processing can be understood as standardizing and adjusting the information to express its accurate meaning. Furthermore, during the retrieval process, when searching for related documents in the corporate database, ES mainly compares multiple feature words with all data in the database. This process involves a huge amount of computation, resulting in low retrieval efficiency.
[0033] To address the aforementioned issues, this application provides a rapid retrieval method for searching similar enterprises. This method is applied to a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. This disclosure does not impose any limitations on this method. Figure 1 As shown, the method includes steps S101 to S104.
[0034] S101. Obtain the target company's main business as input by the user.
[0035] In the above steps, the user can enter the target company's main business into a business information query application installed on their terminal. The user terminal then sends a query request to the server and transmits the user's input to the server. The user device can be a mobile phone, tablet, desktop computer, personal computer, etc., and is not limited thereto. The methods of user input include, but are not limited to, text input, voice input, and input from browsing history.
[0036] S102. Match the main business with the preset vector representation database to obtain the first representation vector. The first representation vector includes the first enterprise cluster number, which represents the vector number of the main business type of the target enterprise. The preset vector representation database includes the correspondence between the main business and its corresponding representation vector.
[0037] In the above steps, the user-inputted main business of the target company is not an accurate description. Therefore, to ensure the accuracy and efficiency of the main business representation, a vector representation database is pre-built, storing the correspondence between main businesses and their corresponding representation vectors. The vector representation database is constructed as follows: First, the server obtains a large amount of introductory text about companies; then, a rule-based filtering model is pre-defined, containing multiple information filtering rules. These rules can be understood as the content between, before, and after pre-labeled filtering terms. For example, "dedicated to" XX "field", XX "solutions", and "under its umbrella" XX can be considered a set of information filtering rules. Through these multiple information filtering rules defined in the model, the main businesses of each company can be extracted from a large amount of introductory text.
[0038] For a company, its main business is often more than one, thus a selected main business may include multiple key terms. Taking the first main business as an example, the first main business can be the main business of any one of multiple companies, and it includes multiple key terms. Then, these multiple key terms are treated as a dataset and input into several pre-trained models to obtain the representation vectors of the first main business in different pre-trained models. These are the multiple first text vectors corresponding to the first main business, where each first text vector is composed of the representation vectors of each key term. The pre-trained model can be understood as a word vector model, used to convert text into numerical vectors. Since different pre-trained models represent text into vectors with different dimensions, to reduce the computational load on the server, the first text vectors are... The representation vectors of multiple main keywords in the data are combined into a low-dimensional composite vector, i.e., the second text vector. At this time, the second text vector only includes a vector of one dimension. The specific process is as follows: the first text vector is subjected to a first pooling process to generate the second text vector. The first pooling process can be understood as reducing the dimensionality of the first text vector. The first pooling process is specifically: using the main keyword evaluation model to obtain the weight values corresponding to each of the multiple main keywords in the first main business, mapping the weight values to the multiple dimensions of data in the first text vector, and then performing a weighted average of the multiple dimensions of data to obtain the composite vector of the multiple dimensions of data, i.e., the second text vector. At this time, the second text vector represents the meaning of all the main keywords in the first main business.
[0039] For example, such as Figure 2As shown, the first main business includes four main keywords (w1, w2, w3, w4), and the pre-trained models include pre-trained model 1, pre-trained model 2, and pre-trained model 3. The first main business is input into the three pre-trained models respectively, resulting in the corresponding first text vectors [o1, o2, o3, o4], [p1, p2, p3, p4], and [q1, q2, q3, q4] for each model. The three representation vectors undergo a first pooling process to obtain the corresponding second text vectors [O], [P], and [Q].
[0040] However, since the first pooling process reduces the representational ability of the second text vector to the first main business, it is necessary to select multiple pre-trained models with better representational ability to represent the first main business. This mitigates the decrease in representational accuracy caused by the first pooling process. The specific process is as follows: Multiple word vector models are retrieved from a pre-set word vector model library, which includes several pre-trained word vector models. Then, the main businesses of multiple companies are used to construct a training sample library. The data in the training sample library is input into the multiple word vector models to obtain multiple training text vectors, where one main business corresponds to multiple training text vectors. Then, based on the multiple training text vectors, the representational ability of the multiple word vector models is evaluated to obtain evaluation values for the multiple word vector models. The calculation method uses a vector space distribution evaluation function, specifically: Where T is the evaluation value, Wxi is the training text vector corresponding to the i-th main word of the x-th main business category, Wyj is the training text vector corresponding to the i-th main word of the y-th main business category, n is the number of main business categories, m is the number of main words in the n-th main business category, the numerator is used to represent the average similarity between multiple main words of the same main business, and the denominator is used to represent the average similarity value between multiple main words corresponding to different main businesses.
[0041] Finally, the evaluation values of multiple word vector models are sorted in descending order to generate a ranking table. Multiple word vector models with rankings greater than or equal to a preset ranking are selected as pre-trained models. At this point, using these pre-trained models with better representation capabilities to perform vector representation of the first main business segment reduces the accuracy loss caused by dimensionality reduction of the second text vector.
[0042] Since the representation capabilities of multiple pre-trained models differ, a second pooling process is performed on the multiple second text vectors corresponding to the first main business. This merges the representation capabilities of the multiple pre-trained models for the first main business, further enhancing the representation capability of the first main business's representation vectors. However, different pre-trained models represent the main business with different dimensions, necessitating a unified data dimension across the multiple pre-trained models. To reduce data processing, the smallest word vector dimension among the multiple word vector dimensions is selected as the standard vector dimension. Taking the first and second word vector dimensions as an example, if the first word vector dimension is less than or equal to the second word vector dimension, then the first word vector dimension is determined as the standard vector dimension, compressing the word vector dimensions of the multiple word vector models to the standard vector dimension. Of course, the standard vector dimension is not limited to the smallest word vector dimension. The standard vector dimension is the vector dimension whose representation capability of the main business can meet the minimum representation requirements. Therefore, any word vector dimension from the smallest to the largest word vector dimension can be used as the standard vector dimension. It should be noted that the more standard vector dimensions there are, the more accurate the representation capability will be, but the higher the computing power required. Therefore, when selecting multiple pre-trained models, this application selects the smallest word vector dimension as the standard vector dimension, which can ensure the accuracy of word vector model representation and improve data processing efficiency.
[0043] The second pooling process is as follows: the weighted average of multiple second text vectors corresponding to the first main business is performed to obtain a third text vector, and the third text vector is stored in the preset vector representation database as the representation vector corresponding to the first main business.
[0044] When using a pre-defined vector representation database, the target company's main business is matched against the database. Based on the correspondence between the representation vectors and the main business, a first representation vector corresponding to the target company's main business is obtained. This first representation vector contains a first company cluster number, which is specific vector data. Its original text data can be numbers, letters, symbols, etc., converted through a word vector model. Each type of main business corresponds to a unique company cluster number. It should be further noted that the first representation vector contains vector data of the target company's main business and vector data of the first company cluster number. For example, vector [O, p], where O is the vector data corresponding to the first company cluster number, and p is the vector data of the main business.
[0045] S103. Match the first enterprise cluster number with the preset enterprise cluster library to obtain the cluster corresponding to the first enterprise cluster number. The preset enterprise cluster library includes the correspondence between cluster numbers and clusters. The cluster corresponding to the first enterprise cluster number includes the main business documents of multiple enterprises with the same main business type as the target enterprise.
[0046] In the above steps, the first enterprise cluster number represents the main business type of the target enterprise. According to the correspondence between cluster numbers and clusters stored in the preset enterprise clustering library, the first enterprise cluster number is matched with the preset enterprise clustering library to obtain the cluster corresponding to the main business type of the target enterprise. At this time, the cluster corresponding to the main business type of the target enterprise includes the main business documents of multiple enterprises with the same main business type as the target enterprise.
[0047] S104. Based on the clustering cluster corresponding to the first enterprise cluster number, obtain multiple enterprises with the same main business type as the target enterprise.
[0048] In the above steps, by matching the target company's main business with the cluster corresponding to the first company's cluster number, multiple companies with the same main business type as the target company are obtained. The information of these multiple companies is then displayed on the user's device as output. A cluster can be understood as a dataset that aggregates information on the same main business type. For example, if the main business type of a cluster is wheat, then this cluster includes hard wheat, soft wheat, and other types of wheat. Due to the large number of main business types, clusters categorize and summarize the massive amount of main business data, grouping data with high similarity into the same cluster and separating data with low similarity into different clusters, thereby reducing the amount of data processing during data matching. The specific process of constructing the enterprise cluster library is as follows: First, obtain the main business classification tree. The main business classification tree stores detailed data of all main business types and the enterprise cluster number for each main business type. Then, divide the main business types into a preset number of product classification levels. The product classification levels reflect the product range of the main business type. In this embodiment, it is preferred to have 5 product classification levels. For example, level 1 product classification can be agricultural products, level 2 product classification can be grains, level 3 product classification can be rice, level 4 product classification can be japonica rice, and level 5 product classification can be seed japonica rice. Of course, the number of product classification levels depends on the actual situation and is not limited here.
[0049] Then, using the multiple enterprise cluster numbers stored in the main business classification tree, the multiple main businesses in the pre-defined vector representation database are clustered to obtain multiple clusters, where one enterprise cluster number corresponds to one cluster. The specific process is as follows: Taking the clustering process of the second main business as an example, the second main business is any one of multiple main businesses in the database represented by a preset vector. Then, the center vectors of the representation vector of the second main business and the cluster numbers of multiple enterprises are obtained. The center vector of the enterprise cluster number can be understood as the cluster center of the cluster. Within a preset range of the cluster center, all data belong to the same cluster. The selection of the cluster center can be based on the product classification of the main business type. This application preferably uses the vector of the main business type with a 3-level product classification as the center vector of the cluster center. It should be explained that the representation vector of the second main business and the center vector of the enterprise cluster number are vectors in the same vector space. Then, the cosine distance between the center vectors of the second main business and the cluster numbers of multiple enterprises is calculated. The cosine distance reflects the similarity between the main business type of the second main business and the cluster.
[0050] In one possible implementation, if the cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is greater than or equal to a preset threshold, then the representation vector of the second main business and the second enterprise cluster number are established as a correspondence, that is, the second main business is assigned to the cluster corresponding to the second enterprise cluster number, wherein the second enterprise cluster number is any one of multiple enterprise cluster numbers.
[0051] In another possible implementation, if the first cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is equal to the second cosine distance between the representation vector of the second main business and the center vector of the third enterprise cluster number, and both the first cosine distance and the second cosine distance are greater than or equal to a preset threshold, then the second main business is simultaneously associated with both the second enterprise cluster number and the third enterprise cluster number to ensure the data integrity of each cluster. The third enterprise cluster number is any one of multiple enterprise cluster numbers.
[0052] Finally, the cluster numbers of multiple enterprises are associated with their respective clusters and stored in a pre-defined enterprise cluster library.
[0053] This application also provides a rapid retrieval system for searching similar companies, the system being a server, such as... Figure 3 As shown, the server includes an acquisition module 1 and a processing module 2, wherein: Module 1 is used to obtain the main business of the target company as input by the user; Processing module 2 is used to match the main business with a preset vector representation database to obtain a first representation vector. The first representation vector includes a first enterprise cluster number, which represents the vector number of the main business type of the target enterprise. The preset vector representation database includes the correspondence between the main business and its corresponding representation vector. The first enterprise cluster number is matched with the preset enterprise cluster database to obtain the cluster corresponding to the first enterprise cluster number. The preset enterprise cluster database includes the correspondence between cluster numbers and clusters. The cluster corresponding to the first enterprise cluster number includes the main business documents of multiple enterprises with the same main business type as the target enterprise. Based on the cluster corresponding to the first enterprise cluster number, multiple enterprises with the same main business type as the target enterprise are obtained.
[0054] In one possible implementation, before matching the main business with a preset vector representation database to obtain a first representation vector, the process includes: Module 1 acquires brief introduction texts of multiple companies; it uses a preset rule filtering model to extract the main business from the multiple brief introduction texts. The preset rule filtering model defines multiple information filtering rules, wherein one brief introduction text corresponds to one main business, and one main business includes multiple main keywords. Processing module 2 inputs the first main business into multiple pre-trained models to obtain multiple first text vectors, where the first main business is any one of the multiple main businesses; performs a first pooling process on each of the multiple first text vectors to generate multiple second text vectors; performs a second pooling process on the multiple second text vectors to obtain a third text vector; and stores the third text vector as the representation vector corresponding to the first main business in the preset vector representation database.
[0055] In one possible implementation, before matching the main business with a preset vector representation database to obtain a first representation vector, the method further includes: obtaining module 1 retrieving multiple word vector models from a preset word vector model library; constructing a training sample library from the main businesses of the multiple enterprises; processing module 2 inputting data from the training sample library into the multiple word vector models to obtain multiple training text vectors; calculating the evaluation value corresponding to each of the multiple word vector models based on the multiple training text vectors using a vector space distribution evaluation function; sorting the evaluation values corresponding to each of the multiple word vector models from largest to smallest to generate a ranking table; and using the multiple word vector models ranked in the ranking table that are greater than or equal to a preset ranking as pre-trained models.
[0056] In one possible implementation, based on multiple training text vectors, the evaluation values corresponding to each of the multiple word vector models are calculated using a vector space distribution evaluation function, specifically as follows: Where T is the evaluation value, Wxi is the training text vector corresponding to the i-th main word of the x-th main business category, Wyj is the training text vector corresponding to the i-th main word of the y-th main business category, n is the number of main business categories, m is the number of main words in the n-th main business category, the numerator is used to represent the average similarity between multiple main words of the same main business, and the denominator is used to represent the average similarity value between multiple main words corresponding to different main businesses.
[0057] In one possible implementation, the processing module 2 iterates through the word vector dimensions of multiple word vector models; if the first word vector dimension is less than or equal to the second word vector dimension, then the first word vector dimension is determined to be the standard vector dimension, and the first word vector dimension and the second word vector dimension are any two word vector dimensions among the multiple word vector dimensions; the word vector dimensions corresponding to each of the multiple word vector models are compressed to the standard vector dimension respectively.
[0058] In one possible implementation, before matching the first enterprise cluster number with a preset enterprise clustering library to obtain the cluster corresponding to the first enterprise cluster number, the method further includes: obtaining module 1 determining multiple enterprise cluster numbers in the preset enterprise clustering library based on the main business classification tree; processing module 2 clustering the representation vectors of multiple main businesses in the preset vector representation database based on the multiple enterprise cluster numbers to obtain multiple clusters, wherein one enterprise cluster number corresponds to one cluster; constructing a correspondence between the multiple enterprise cluster numbers and the clusters corresponding to each of the multiple enterprise cluster numbers, and storing it in the preset enterprise clustering library.
[0059] In one possible implementation, the acquisition module 1 acquires the representation vector of the second main business and the center vector of multiple enterprise cluster numbers. The second main business is any one of the multiple main businesses in the preset vector representation database. When the cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is greater than or equal to a preset threshold, the processing module 2 constructs a correspondence between the representation vector of the second main business and the second enterprise cluster number. The second enterprise cluster number is any one of the multiple enterprise cluster numbers.
[0060] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0061] This application also provides an electronic device. (See reference...) Figure 4 ,Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, a memory 405, and at least one communication bus 402.
[0062] The communication bus 402 is used to enable communication between these components.
[0063] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0064] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0065] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 401.
[0066] The memory 405 may include random access memory (RAM) or read-only memory. Optionally, the memory 405 may include a non-transitory computer-readable storage medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401. (Refer to...) Figure 4 The memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a quick retrieval method for searching similar companies.
[0067] exist Figure 4 In the illustrated electronic device 400, the user interface 403 is mainly used to provide an input interface for the user and to obtain user input data; while the processor 401 can be used to call an application stored in the memory 405 for a fast retrieval method for querying similar companies. When executed by one or more processors 401, the electronic device 400 performs one or more of the methods described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0068] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0069] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0073] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and the disclosure of practical truths.
[0074] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A rapid retrieval system for finding similar companies, characterized in that, The system is a server, including: The acquisition module is used to acquire the main business of the target company as input by the user; Processing module, used for: The main business is matched with a preset vector representation database to obtain a first representation vector. The first representation vector includes a first enterprise cluster number, which represents the vector number of the main business type of the target enterprise. The preset vector representation database includes the correspondence between the main business and its corresponding representation vector. The first enterprise cluster number is matched with the preset enterprise clustering library to obtain the cluster corresponding to the first enterprise cluster number. The preset enterprise clustering library includes the correspondence between cluster numbers and clusters. The cluster corresponding to the first enterprise cluster number includes the main business documents of multiple enterprises with the same main business type as the target enterprise. Based on the cluster cluster corresponding to the first enterprise cluster number, multiple enterprises with the same main business type as the target enterprise are obtained; The acquisition module acquires the representation vector of the second main business and the center vector of multiple enterprise cluster numbers. The second main business is any one of the multiple main businesses in the preset vector representation database. When the cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is greater than or equal to a preset threshold, the processing module constructs a correspondence between the representation vector of the second main business and the second enterprise cluster number. The second enterprise cluster number is any one of the multiple enterprise cluster numbers. Based on the cosine distance between the representation vector of the second main business and the center vector of the multiple enterprise cluster numbers, the most similar cluster cluster corresponding to the second main business and the enterprise cluster number is determined. If the first cosine distance between the representation vector of the second main business and the center vector of the second enterprise cluster number is equal to the second cosine distance between the representation vector of the second main business and the center vector of the third enterprise cluster number, and both the first and second cosine distances are greater than or equal to a preset threshold, then the second main business is simultaneously associated with both the second and third enterprise cluster numbers to ensure the data integrity of each cluster. The third enterprise cluster number is any one of the multiple enterprise cluster numbers. The multiple enterprise cluster numbers are then associated with their respective clusters and stored in a preset enterprise cluster library.
2. The rapid retrieval system for querying similar enterprises according to claim 1, characterized in that, Before matching the main business with the preset vector representation database to obtain the first representation vector, the acquisition module acquires the brief introduction texts of multiple enterprises; and uses a preset rule filtering model to extract the main business from the multiple brief introduction texts. The preset rule filtering model defines multiple information filtering rules, wherein one brief introduction text corresponds to one main business, and one main business includes multiple main keywords. The processing module inputs the first main business into multiple pre-trained models to obtain multiple first text vectors, where the first main business is any one of the multiple main businesses; performs a first pooling process on each of the multiple first text vectors to generate multiple second text vectors; performs a second pooling process on the multiple second text vectors to obtain a third text vector; and stores the third text vector as the representation vector corresponding to the first main business in the preset vector representation database.
3. The rapid retrieval system for querying similar enterprises according to claim 2, characterized in that, The first pooling process specifically involves: using the main keyword evaluation model to obtain the weight values corresponding to each of the multiple main keywords in the first main business, mapping the weight values to multiple dimensions of data in the first text vector, and then performing a weighted average of the multiple dimensions of data to obtain a comprehensive vector of multiple dimensions of data, namely the second text vector; the second text vector represents the meaning of all the main keywords in the first main business.
4. The rapid retrieval system for querying similar enterprises according to claim 3, characterized in that, The second pooling process specifically involves: taking a weighted average of multiple second text vectors corresponding to the first main business to obtain a third text vector, and storing the third text vector as the representation vector corresponding to the first main business in a preset vector representation database.
5. The rapid retrieval system for querying similar enterprises according to claim 1, characterized in that, Before matching the main business with the preset vector representation database to obtain the first representation vector, the acquisition module retrieves multiple word vector models from the preset word vector model library; and constructs a training sample library from the main businesses of the multiple companies. The processing module inputs the data from the training sample library into multiple word vector models to obtain multiple training text vectors. Based on the multiple training text vectors, the evaluation values corresponding to each of the multiple word vector models are calculated using the vector space distribution evaluation function; The evaluation values corresponding to each of the multiple word vector models are sorted from largest to smallest to generate a sorting table; the multiple word vector models with a ranking greater than or equal to a preset ranking in the sorting table are used as pre-trained models.
6. The rapid retrieval system for querying similar enterprises according to claim 5, characterized in that, The evaluation values for each of the multiple word vector models are calculated using the vector space distribution evaluation function, specifically as follows: Where T is the evaluation value, W xi W is the training text vector corresponding to the i-th main keyword of the x-th main business category. yj Let be the training text vector corresponding to the i-th main word of the y-th main business category, n be the number of main business categories, m be the number of main words in the n-th main business category, the numerator is used to represent the average similarity between multiple main words of the same main business, and the denominator is used to represent the average similarity value between multiple main words corresponding to different main businesses.
7. The rapid retrieval system for querying similar enterprises according to claim 5, characterized in that, The word vector model is also used for: Iterate through the word vector dimensions of multiple word vector models described above; If the first word vector dimension is less than or equal to the second word vector dimension, then the first word vector dimension is determined to be the standard vector dimension, and the first word vector dimension and the second word vector dimension are any two word vector dimensions among the multiple word vector dimensions; The word vector dimensions corresponding to each of the multiple word vector models are compressed to the standard vector dimension.
8. The rapid retrieval system for querying similar enterprises according to claim 1, characterized in that, Before matching the first enterprise cluster number with the preset enterprise clustering library to obtain the cluster corresponding to the first enterprise cluster number, the acquisition module determines multiple enterprise cluster numbers in the preset enterprise clustering library based on the main business classification tree. The processing module clusters the representation vectors of multiple main businesses in the preset vector representation database based on multiple enterprise cluster numbers, resulting in multiple clusters, where one enterprise cluster number corresponds to one cluster.
9. A fast retrieval method for finding similar companies, characterized in that, According to any one of claims 1-8, the rapid retrieval system for querying similar enterprises includes the following rapid retrieval method: Obtain user input regarding the target company's main business; The main business is matched with a preset vector representation database to obtain a first representation vector. The first representation vector includes a first enterprise cluster number, which represents the vector number of the main business type of the target enterprise. The preset vector representation database includes the correspondence between the main business and its corresponding representation vector. The first enterprise cluster number is matched with a preset enterprise clustering library to obtain the cluster corresponding to the first enterprise cluster number. The preset enterprise clustering library includes the correspondence between cluster numbers and clusters. The cluster corresponding to the first enterprise cluster number includes the main business documents of multiple enterprises with the same main business type as the target enterprise. Based on the cluster corresponding to the first enterprise cluster number, multiple enterprises with the same main business type as the target enterprise are obtained.
10. An electronic device, characterized in that, The device includes a processor (401), a memory (405), a user interface (403), and a network interface (404). The memory (405) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (405) to cause the electronic device (400) to perform the method as described in claim 9.