Policy resource recommendation method and device, computer equipment and storage medium
By acquiring and preprocessing enterprise and policy data, and using the FAISS index library to calculate and weight processing, the problem of inaccurate policy resource recommendation in the existing technology is solved, and the most appropriate policy resources are recommended based on the enterprise portraits is improved. Efficiency and effectiveness of policy utilization.
Patent Information
- Application Number
- CN202411335191.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-17
AI Technical Summary
The existing policy resource recommendation methods rely on keyword matching or fixed patterns, and cannot deeply understand corporate needs, resulting in insufficient recommendation results and difficult to adapt to changes in corporate needs and the subtle relationship between policies and corporate situations.
By obtaining and preprocessing enterprise and policy data, text vectorization is performed, and similarity calculation and classification are calculated and weighted to filter out policy resources that best meet the needs of enterprises.
It has achieved accurate policy resources recommended based on corporate portraits, improved policy utilization efficiency and effectiveness, and helped enterprises to select options that best meet their actual needs from many policies.
Smart Images

Figure CN119322884A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computers, and more specifically to a policy resource recommendation method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of information technology, a large amount of text data has been widely disseminated on the Internet. For enterprises, it is necessary to quickly and accurately find policy information related to themselves from massive text data. However, current policy resource recommendations usually rely on keyword matching or fixed patterns. These traditional methods compare the needs of enterprises with the entries in the policy database based on preset keywords or templates. Although this method is simple and easy to implement, it has obvious limitations. Because they only focus on direct matching of keywords, they cannot deeply understand the actual needs of enterprises or the complex content of policies, which often leads to inaccurate and individuated recommendation results. In addition, these methods cannot flexibly adapt to changes in enterprise needs, and it is difficult to capture the subtle relationship between policies and specific situations of enterprises. Therefore, enterprises often cannot obtain the most suitable policy recommendations for themselves, which affects the effective use of policy resources.
[0003] Therefore, it is necessary to design a new method to recommend accurate policy resources based on the company's own portrait, which will help the company select the policies that best meet its actual needs from a large number of policies, thereby improving the efficiency and effectiveness of policy utilization. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a policy resource recommendation method, device, computer equipment and storage medium.
[0005] To achieve the above purpose, the present invention adopts the following technical solution: a policy resource recommendation method, comprising:
[0006] Obtain enterprise data and policy data, and pre-process the policy data to obtain initial data;
[0007] Performing text vectorization on the initial data to obtain an enterprise data vector and a policy data vector;
[0008] Input the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file;
[0009] Calculate the similarity between the enterprise data vector file and the policy data vector file to determine a candidate policy set;
[0010] Performing weighted processing on the candidate policy set to obtain a processing result;
[0011] Filtering target policy resources from the processing results;
[0012] The target policy resource is sent to the enterprise terminal.
[0013] A further technical solution is: the acquisition of enterprise data and policy data and preprocessing to obtain initial data includes:
[0014] Obtain corporate data and policy receipts;
[0015] Performing text structuring on the policy data to obtain a preprocessing result;
[0016] The enterprise data and the preprocessing results are combined to form initial data.
[0017] A further technical solution is: the text vectorization of the initial data to obtain the enterprise data vector and the policy data vector includes:
[0018] Identifying key features from the enterprise data of the initial data and converting them into vector form to obtain a first vector;
[0019] Converting the policy data into a vector form to obtain a second vector;
[0020] Normalizing the first vector and the second vector;
[0021] An offset of a fixed value is added to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
[0022] A further technical solution is: the enterprise data vector and the policy data vector are input into the FAISS index library to classify the vectors, and obtain an enterprise data vector file and a policy data vector file, including:
[0023] The enterprise data vector and the policy data vector are written into the FAISS index library, and the enterprise data vector and the policy data vector are trained using the clustering algorithm in FAISS, divided into several classes, and saved into a file to obtain an enterprise data vector file and a policy data vector file.
[0024] A further technical solution is: the calculating the similarity between the enterprise data vector file and the policy data vector file to determine the candidate policy set includes:
[0025] The Euclidean distance is used to calculate the similarity between the enterprise data vector file and the policy data vector file, and the policy data vector files whose similarity meets the requirements are screened to determine the candidate policy set.
[0026] A further technical solution is: the weighted processing of the candidate policy set to obtain a processing result includes:
[0027] The candidate policy set is subjected to industry-weighted processing to obtain a processing result.
[0028] A further technical solution is: the candidate policy set is weighted by the same industry to obtain a processing result, including:
[0029] Perform the most granular industry matching on enterprise data to obtain matching results;
[0030] Determine a weighting rule based on the matching results;
[0031] The candidate policy set is processed according to the weighted rule to obtain a processing result.
[0032] The present invention also provides a policy resource recommendation method, comprising:
[0033] An acquisition unit, used for acquiring enterprise data and policy data, and preprocessing the policy data to obtain initial data;
[0034] A vectorization unit, used for performing text vectorization on the initial data to obtain an enterprise data vector and a policy data vector;
[0035] A clustering unit, used for inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file;
[0036] A similarity calculation unit, used for calculating the similarity between the enterprise data vector file and the policy data vector file to determine a candidate policy set;
[0037] A weighted processing unit, used for performing weighted processing on the candidate policy set to obtain a processing result;
[0038] A screening unit, used for screening out target policy resources from the processing results;
[0039] The sending unit is used to send the target policy resource to the enterprise terminal.
[0040] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.
[0041] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0042] Compared with the prior art, the present invention has the following beneficial effects: the present invention obtains and preprocesses enterprise and policy data, vectorizes them, uses the FAISS index library to perform similarity calculation and classification, and then performs weighted processing on the candidate policy set to screen out the policy resources that best meet the needs of the enterprise and send them to the enterprise terminal. This process aims to accurately recommend policies, improve the efficiency of policy utilization, and recommend accurate policy resources based on the enterprise's own portrait, which helps enterprises to screen out the policies that best meet their actual needs from a large number of policies, thereby improving the efficiency and effectiveness of policy utilization.
[0043] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of an application scenario of the policy resource recommendation method provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a process flow of a policy resource recommendation method provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a sub-process of a policy resource recommendation method provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a sub-process of a policy resource recommendation method provided by an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of a sub-process of a policy resource recommendation method provided by an embodiment of the present invention;
[0050] Figure 6 A schematic diagram of forming an enterprise data vector and a policy data vector provided by an embodiment of the present invention;
[0051] Figure 7 A schematic block diagram of a policy resource recommendation device provided by an embodiment of the present invention;
[0052] Figure 8 A schematic block diagram of an acquisition unit of a policy resource recommendation device provided in an embodiment of the present invention;
[0053] Fig. 9A schematic block diagram of a vectorization unit of a policy resource recommendation device provided in an embodiment of the present invention;
[0054] Fig.10 A schematic block diagram of a weighted processing unit of a policy resource recommendation device provided in an embodiment of the present invention;
[0055] Fig.11 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0059] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0060] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the policy resource recommendation method provided in an embodiment of the present invention. Figure 2A schematic flow chart of a policy resource recommendation method provided in an embodiment of the present invention. The policy resource recommendation method is applied in a server. The server interacts with a terminal for data, and the method of this embodiment focuses on the field of text data recommendation, with the main goal of providing enterprises with policy resource recommendations related to them, so as to help enterprises better utilize appropriate policy resources. The server recommends policy resources based on enterprise portraits. Enterprise portraits are a way of comprehensively and deeply describing an enterprise, covering aspects such as the enterprise's basic information, industry affiliation, and business scope. Using enterprise portraits for recommendations can better understand the specific needs of enterprises, thereby providing more accurate policy recommendations.
[0061] Figure 2 FIG. 1 is a flow chart of a policy resource recommendation method provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S170.
[0062] S110: Acquire enterprise data and policy data, and pre-process the policy data to obtain initial data.
[0063] In this embodiment, the initial data refers to the enterprise data and the pre-processed policy data.
[0064] In one embodiment, see Figure 3 , the above-mentioned step S110 may include steps S111 to S113.
[0065] S111. Obtain enterprise data and policy receipts.
[0066] In this embodiment, basic information of enterprises will be collected from various public channels. The specific operations are as follows:
[0067] Data source:
[0068] Official website of a company: usually contains the company's basic information, business scope, business activities, etc.
[0069] Government databases: such as the Industrial and Commercial Registration Information System, which provides legal registration information of enterprises.
[0070] Industry associations: Industry association websites may provide detailed information about member companies.
[0071] Other channels: including news reports, corporate credit information websites, etc.
[0072] Collection content:
[0073] Company name: As the unique identifier of the company, it is easy to distinguish different companies.
[0074] Business registration region: The geographical location of the business, which helps recommend policies related to the region.
[0075] Industry: The industry sector in which the enterprise operates, used to recommend policies related to its business.
[0076] Business scope: The specific business activities of an enterprise, used to provide more precise policy recommendations.
[0077] Sales: reflects the economic size of the enterprise and helps recommend policies appropriate to its size.
[0078] Data processing:
[0079] Cleaning: Remove duplicate records and erroneous information.
[0080] Deduplication: Ensure that each piece of information is unique.
[0081] Formatting: Convert data into a unified format to facilitate subsequent processing and analysis.
[0082] Ultimately forming enterprise data.
[0083] For policy data, the latest policy text data will be collected from various channels, including:
[0084] Data source:
[0085] Official government websites: such as people's governments at all levels across the country, finance bureaus, rural revitalization bureaus, agriculture and rural affairs bureaus, etc.
[0086] Industry association website: provides policy information related to the industry.
[0087] News Reports: Follow the latest policy developments.
[0088] Other channels: such as the Government Service Network, State Administration of Taxation, etc.
[0089] Collection content:
[0090] Policy Title: The name of the policy document.
[0091] Policy Number: The official number of the policy.
[0092] Policy text: the specific content of the policy.
[0093] Department: The department that issued the policy.
[0094] Support policies: policy support measures and preferential content.
[0095] Update strategy: Set up an automatic update mechanism to ensure the timeliness of policy data.
[0096] S112: text-structure the policy data to obtain a preprocessing result.
[0097] In this embodiment, the preprocessing result refers to the result formed after text structuring of the policy data.
[0098] Specifically, advanced large model technologies (such as ChatGPT, Gemini, Baichuan, Qwen, ChatGLM, etc.) are used to analyze and extract policy texts. The specific operations include:
[0099] Extract structured information:
[0100] Policy File Name: The name of the policy file.
[0101] Policy Item Name: Summarize the main content or objectives of the policy.
[0102] Policy type: such as financial subsidies, tax incentives, etc., the nature of the classified policy.
[0103] Benefit content: Clarify the specific benefits that the enterprise can obtain from the policy.
[0104] Conditions for enjoying the policy: List the basic conditions for enterprises to enjoy the policy.
[0105] Support content: Describe the specific support measures provided by the policy.
[0106] Region: The geographic area to which the policy applies.
[0107] Industry: The industry classification to which the policy applies, which can be referenced by the National Economic Industry Classification or the Global Industry Classification (GICS), etc.
[0108] In this embodiment, selected example samples are added to the prompt template, and the Few Shot Learning method is adopted to significantly improve the effect and performance of information extraction.
[0109] The prompt template is as follows: Your goal is to extract structured information from the user input that matches the form described below. When extracting information, make sure it matches the type information exactly. Do not add any attributes that do not appear in the schema shown below.
[0110] TypeScript:
[0111] taxpolicyproject:Array<{ / / Split into different support or subsidy projects, and extract project information, including title, support object, support conditions, preferential content, maximum support amount, operating time, industry, and entity classification.
[0112] project_name: string / / Title of the supported or subsidized project;
[0113] enjoy:string / / support or subsidy recipient;
[0114] enjoy_conditions: string / / The conditions to be met for support or subsidy;
[0115] preferential:string / / Specific preferential content of support or subsidy;
[0116] start_end_time: string / / Start date and end date, answer in the following format: Start date: 2022-01-01; End date: 2023-01-01;
[0117] money: string / / The maximum amount of support or subsidy, in ten thousand yuan;
[0118] department:string / / The issuing department of the support or subsidy project may appear at the end of the text. The standard Chinese answer is the full name and abbreviation of the issuing department. Answer in the following format: Full name of the issuing department: Zhejiang Provincial Department of Economy and Information Technology; Abbreviation of the issuing department: Provincial Department of Economy and Information Technology;
[0119] enjoy_operating_time: string / / Operating time, the operating time range that the support object needs to meet, the time ranges include: operating time within 1 year (inclusive), operating time 1-3 years (inclusive), operating time 3-5 years (inclusive), operating time 5-10 years (inclusive), operating time 10-15 years (inclusive), operating time more than 15 years;
[0120] project_industry: string / / Which of the following industry labels does it belong to: Finance, Agriculture, Healthcare, Biomedicine, Medical Devices, Internet of Things, Cultural Creativity, Integrated Circuits, High-end Equipment, Energy Conservation and Environmental Protection, Construction, Tourism, New Energy Vehicles, New Energy Trade, E-commerce, Mining, Artificial Intelligence, 5G / Mobile Communications;
[0121] enjoy_cate:string / / Subject classification, which type of institution does the support target belong to: scientific research institutes, colleges and universities, financial institutions, cultural institutions, libraries, enterprises;}>
[0122] Please output the extracted information in JSON format. Do not output anything other than the extracted information. Do not add any clarifying information. Do not add any fields that are not in the schema. If the text contains attributes that do not appear in the schema, ignore them. All output must be in JSON format and follow the schema specified above. Enclose the JSON in <json> tags.
[0123] Through the above steps, a comprehensive policy recommendation system can be built, which can provide accurate and real-time policy information according to the specific characteristics and needs of enterprises, thereby helping enterprises to better utilize policy resources.
[0124] S113: Combining the enterprise data and the preprocessing result to form initial data.
[0125] S120, performing text vectorization on the initial data to obtain an enterprise data vector and a policy data vector.
[0126] In this embodiment, the enterprise data vector refers to a vector formed by text vectorization of enterprise data; the policy data vector refers to a vector formed by text vectorization of preprocessing results.
[0127] In one embodiment, see Figure 4 , the above-mentioned step S120 may include steps S121 to S124.
[0128] S121. Identify key features from the enterprise data of the initial data and convert them into vector form to obtain a first vector.
[0129] In this embodiment, the first vector refers to a vector representing key features of the enterprise data.
[0130] Specifically, natural language processing and machine learning technologies such as TF-IDF, Word2Vec, Doc2Vec, BERT and BECOM are used on enterprise data, combined with vector models such as BGE, M3E, Text2Vec, etc., to identify the key features of the enterprise and convert these features into vector form for subsequent matching and calculation.
[0131] TF-IDF: used to measure the importance of words in enterprise documents.
[0132] Word2Vec / Doc2Vec: Convert business descriptions into word vectors or document vectors to capture the semantic relationship between words.
[0133] BERT and variants: Obtain context-sensitive enterprise feature representations through pre-trained models.
[0134] BGE, M3E, Text2Vec: modern vectorization models that obtain richer enterprise feature vectors by processing complex language structures.
[0135] Different technologies can capture the subtle semantics in corporate documents and provide more accurate feature representation; vectorization converts corporate information into a machine-processable form to facilitate subsequent analysis and matching.
[0136] S122. Convert the policy data into a vector form to obtain a second vector.
[0137] In this embodiment, the second vector refers to the result formed after the policy data is converted into a vector.
[0138] Specifically, the same method as enterprise data vectorization (such as TF-IDF, Word2Vec, BERT, etc.) is used to process the policy text and convert the policy information into vector form.
[0139] The same vectorization technology is used to ensure that the policy vector and the enterprise vector are in the same space, making subsequent matching more accurate; the standardized processing of the policy vector facilitates the calculation and comparison of similarities with the enterprise vector.
[0140] S123: Normalize the first vector and the second vector.
[0141] In this embodiment, the first vector and the second vector are each divided by their modulus (L2 norm), that is, Among them, u is the normalized result; v refers to the first vector or the second vector.
[0142] After normalization, the scales of the vectors are consistent, which facilitates similarity calculation and avoids the influence of vector length differences on similarity calculation results.
[0143] S124. Add a fixed value offset to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
[0144] In this embodiment, a fixed slot value (such as beta=10) is added to the processed first vector and the processed second vector in the same region to adjust the vector position. Figure 6 As shown, specifically, f(V 政策 , region = f(V 企业 , region = A) = [x1, x2...(x i +beta A )..x n ]A)=[x1,x2...(x i +beta A )..x n ];; Recall the nearest neighbor with constraints in the vector library, find the distance measurement and coordinate transformation method for each vector, so that the distance of all vectors of the target industry is much smaller than the distance of other industries. Compared with the direct collaborative filtering between industries, this vector recall method has greatly improved the effect. Through offset processing, the impact of regional factors on matching can be highlighted and regional relevance can be improved; optimize the vector matching effect, so that enterprises and policies in the same region can be matched more accurately.
[0145] S130, inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors, and obtaining an enterprise data vector file and a policy data vector file.
[0146] In this embodiment, the enterprise data vector file and the policy data vector file refer to the clustered enterprise data vectors and policy data vectors.
[0147] Specifically, the enterprise data vector and the policy data vector are written into the FAISS index library, and the enterprise data vector and the policy data vector are trained using the clustering algorithm in FAISS, divided into several classes, and saved into a file to obtain an enterprise data vector file and a policy data vector file.
[0148] Write the enterprise data vector and policy data vector separately to the FAISS index repository. This involves creating two separate indexes (one for the enterprise vector and the other for the policy vector) and adding these vectors to their respective indexes.
[0149] Leverage FAISS's efficient storage and retrieval capabilities to ensure that vector data can be quickly accessed and processed. FAISS supports multiple index types, such as IVF (inverted file) and PQ (product quantization), which can be selected according to specific needs.
[0150] Apply FAISS's clustering algorithm (such as K-means) to train enterprise data vectors and policy data vectors, and divide these vectors into several classes. The clustering algorithm automatically groups similar vectors into the same class. Clustering brings similar vectors together, simplifying subsequent similarity calculations and retrieval. For large-scale data sets, clustering can significantly improve processing efficiency and accuracy.
[0151] Save the trained FAISS index and clustering results to a file. This usually includes the index structure, clustering model and its parameters, etc. Saved indexes and models can be reused in subsequent queries without retraining, thus saving time and computing resources.
[0152] Through this process, enterprise data vectors and policy data vectors can be efficiently organized, retrieved and analyzed, making the matching and recommendation systems more accurate and efficient.
[0153] S140: Calculate the similarity between the enterprise data vector file and the policy data vector file to determine a candidate policy set.
[0154] In this embodiment, V1=[x1,x2......x n]; V2 = [y1,y2......y n ]; Inner product: V1·V2=∑x i *y i =||V1||*||V2||*cos<V1,V2> ; V1 and V2: These two represent vectors and can be in multi-dimensional space.
[0155] (xi) and (yi): corresponding components in V1 and V2 vectors.
[0156] Cosine distance: 1-cos<V1,V2> ;
[0157] Euclidean distance:
[0158] In this embodiment, the candidate policy set refers to the enterprise data vector files and the policy data vector files whose similarity meets the requirements.
[0159] Specifically, the Euclidean distance is used to calculate the similarity between the enterprise data vector file and the policy data vector file, and the policy data vector files whose similarity meets the requirements are screened to determine the candidate policy set.
[0160] In this embodiment, the cosine distance is to calculate the cosine value of the angle between two vectors to measure their similarity. The Euclidean distance is to calculate the Euclidean distance between vectors. In the case of normalization (i.e., the vector length is normalized to 1), the cosine distance and the Euclidean distance can be converted to each other. Specifically, when the vector has been normalized to a unit vector, the calculation of the cosine distance is equivalent to the calculation of the Euclidean distance.
[0161] The vectors of enterprise and policy data are normalized and the length of each vector is adjusted to 1. The normalized vectors can be divided by simple vector division; in FAISS, Euclidean distance is used as the similarity calculation method, so that the efficient indexing and search functions provided by FAISS can be utilized. Since the Euclidean distance of the normalized vector is equivalent to the cosine distance, FAISS can effectively perform similarity calculation without directly supporting the cosine distance.
[0162] Search in the FAISS index library to obtain the top N (e.g., N=100) policy vectors closest to the given enterprise vector. FAISS returns the index and distance value of the N policy vectors most similar to the enterprise vector; by using the index and search capabilities of FAISS, the most similar policy vectors can be efficiently retrieved, thereby achieving fast and accurate matching and recommendation.
[0163] Using FAISS's Euclidean distance calculation can significantly improve the speed and efficiency of similarity retrieval with its optimized index structure and search algorithm; by converting cosine distance to Euclidean distance, the existing functions of FAISS can be utilized without additional customization or modification of FAISS; keeping the vector normalized ensures the accuracy of the calculation results. The normalized vector is suitable for the equivalence between Euclidean distance and cosine distance; normalization simplifies the calculation process and reduces the demand for computing resources, especially when dealing with large-scale data sets.
[0164] Through the above steps and transformations, FAISS can effectively perform similarity retrieval, provide results consistent with the original cosine distance calculation, and improve performance by leveraging FAISS's efficient search algorithm.
[0165] S150: Perform weighted processing on the candidate policy set to obtain a processing result.
[0166] In this embodiment, the processing result refers to the result obtained after weighted processing of the candidate policy set.
[0167] Specifically, the candidate policy set is subjected to same industry weighting processing to obtain a processing result.
[0168] In this embodiment, the industry includes the national economic industry classification or GICS (Global Industry Classification), and the most fine-grained industry matching is prioritized. Specific rules: If the fourth-level industry exists, the fourth-level industry is compared, and the first, second, and third-level industries are not considered. If the fourth-level industry is empty, the third-level industry is compared, and the first and second-level industries are not considered, as shown in Table 1.
[0169] Table 1. Industry classification
[0170]
[0171]
[0172] In one embodiment, see Figure 5 , the above-mentioned step S150 may include steps S151 to S153.
[0173] S151. Perform the most fine-grained industry matching on enterprise data to obtain matching results.
[0174] In this embodiment, the matching result refers to the specific industry corresponding to the enterprise data.
[0175] Start the comparison from the most detailed industry classification. For example, if you use the National Economic Industry Classification or GICS (Global Industry Classification), give priority to using the four-level industry classification for matching.
[0176] S152: Determine a weighting rule according to the matching result.
[0177] In this embodiment, the weighting rule is:
[0178] Level 4 industry: If the enterprise and the policy are in the same level 4 industry, the matching score of the policy will be multiplied by a fixed coefficient in the system (such as alpha = 1.2) to increase the recommendation priority of the policy.
[0179] Level 3 industry: If the level 4 industry cannot be matched, then the level 3 industry will be used for comparison. If the enterprise and policy are matched to the same level 3 industry, the same weighting coefficient will be applied.
[0180] Secondary and primary industries: If the third-level industry does not match, continue to move up to the second-level or first-level industry for comparison. Each matched industry will affect the weighting, but the fine-grained industry that is matched first will have a higher weight.
[0181] S153: Process the candidate policy set according to the weighted rule to obtain a processing result.
[0182] According to the matching industry level, the corresponding weighting coefficient is applied to the policy score. The final recommendation score is determined by the weighted result and is used to sort and recommend the top M most relevant policies.
[0183] Specifically, the same industry is weighted and multiplied by a fixed system alpha (for example, alpha = 1.2) to obtain the final result.
[0184] In the project, the actual dimension of the vector is 128 or 768. The examples use 3 dimensions for illustration.
[0185] Example of vector offset in the same region: Enterprise vector = (0.1, 0.2, 0.7), policy vector = (0.2, 0.3, 0.5). Then the similarity between enterprise and policy is 0.1*0.2+0.2*0.3+0.7*0.5=0.43; let's assume that the enterprise is registered in a certain district, and the policy is issued by Xihu District, and Xihu District belongs to the second slot, so beta is fixed (for example, beta=10). The beta values of different regions are different. The beta values are dynamically trained based on the samples manually annotated by the annotators, such as beta=10 in Xihu District and beta=7 in Binjiang District.
[0186] At this time, the enterprise vector = (0.1, 0.2+10, 0.7), and the policy vector = (0.2, 0.3+10, 0.5). The similarity is 0.1*0.2+(0.2+10)*(0.3+10)+0.7*0.5=105.43, so the similarity will be greatly improved, and the distance in three-dimensional space will be significantly widened.
[0187] By analogy, 128 dimensions means 128 slots, 768 dimensions means 768 slots, and each slot code represents a specific area.
[0188] Example of weighting the same industry and multiplying by a fixed system alpha: Assuming that the enterprise and the policy are not in the same region, but in the same industry, multiply the previous 0.43 by alpha (for example, alpha = 1.2), the similarity becomes 0.516, and the similarity will also increase.
[0189] S160: Filter out target policy resources from the processing results.
[0190] In this embodiment, the target policy resource refers to the policy resource that best suits the enterprise.
[0191] Specifically, the weighted processing results are sorted from large to small, and the topM (for example, M=10) are taken to obtain the tax incentives and financial subsidy policies that the enterprise is most likely to apply for.
[0192] The weighted policy resources are sorted from high to low according to their weights. This ensures that the most valuable and applicable policy resources are ranked first; the first M (for example, M=10) policy resources are selected from the sorting results, which are the policy resources that best meet the needs of the enterprise. In this way, enterprises can more accurately obtain the tax incentives and fiscal subsidy policies that are most suitable for them.
[0193] S170: Send the target policy resource to the enterprise terminal.
[0194] The selected Top M policy resources are sent electronically to the enterprise's terminal devices. This can be done through email, notification system or enterprise management platform.
[0195] Through weighted sorting and screening, enterprises are ensured to obtain the most relevant policy resources, which improves the accuracy of policy recommendations. Enterprises do not have to screen a large amount of policy information on their own, saving time and energy, and can quickly obtain the most suitable policies. Enterprises can make more targeted decisions based on recommended policy resources, optimize resource allocation and application strategies; automated screening and sending processes simplify the policy acquisition process, enabling enterprises to use policy support more efficiently.
[0196] The method of this embodiment converts enterprise data and policy data into vector form, which helps to capture their characteristics and relationships; uses vector classification technology for efficient matching, compares enterprise data with policy data, and obtains candidate policies with high similarity; calculates similarity and weights them to ensure that the recommended policies match the needs of the enterprise more closely; finally, selects the policies that best meet the needs of the enterprise and sends them to the enterprise terminal to improve the efficiency and effectiveness of policy utilization. This method can accurately recommend the most appropriate policy resources and help enterprises select the options that best meet their actual needs from a large number of policies.
[0197] The above-mentioned policy resource recommendation method obtains and preprocesses enterprise and policy data, vectorizes them, uses the FAISS index library to calculate and classify similarities, and then weights the candidate policy set to select the policy resources that best meet the needs of the enterprise and send them to the enterprise terminal. This process aims to accurately recommend policies, improve the efficiency of policy utilization, and recommend accurate policy resources based on the company's own portrait, which helps companies select the policies that best meet their actual needs from a large number of policies, thereby improving the efficiency and effectiveness of policy utilization.
[0198] Figure 7 is a schematic block diagram of a policy resource recommendation device 300 provided in an embodiment of the present invention. Figure 7 As shown, corresponding to the above policy resource recommendation method, the present invention also provides a policy resource recommendation device 300. The policy resource recommendation device 300 includes a unit for executing the above policy resource recommendation method, and the device can be configured in a server. Figure 7 The policy resource recommendation device 300 includes an acquisition unit 301, a vectorization unit 302, a clustering unit 303, a similarity calculation unit 304, a weighted processing unit 305, a screening unit 306 and a sending unit 307.
[0199] The acquisition unit 301 is used to acquire enterprise data and policy data, and pre-process the policy data to obtain initial data; the vectorization unit 302 is used to perform text vectorization on the initial data to obtain enterprise data vectors and policy data vectors; the clustering unit 303 is used to input the enterprise data vectors and the policy data vectors into the FAISS index library to classify the vectors and obtain enterprise data vector files and policy data vector files; the similarity calculation unit 304 is used to calculate the similarity between the enterprise data vector files and the policy data vector files to determine the candidate policy set; the weighted processing unit 305 is used to perform weighted processing on the candidate policy set to obtain a processing result; the screening unit 306 is used to screen out target policy resources from the processing result; the sending unit 307 is used to send the target policy resources to the enterprise terminal.
[0200] In one embodiment, if Figure 8 As shown, the acquisition unit 301 includes a data acquisition subunit 3011 , a text structuring subunit 3012 and a combining subunit 3013 .
[0201] The data acquisition subunit 3011 is used to acquire enterprise data and policy receipts; the text structuring subunit 3012 is used to text-structure the policy data to obtain preprocessing results; the combination subunit 3013 is used to combine the enterprise data and the preprocessing results to form initial data.
[0202] In one embodiment, if Fig. 9 As shown, the vectorization unit 302 includes an identification subunit 3021 , a conversion subunit 3022 , a normalization subunit 3023 and an offset subunit 3024 .
[0203] The identification subunit 3021 is used to identify key features from the enterprise data of the initial data and convert them into vector form to obtain a first vector; the conversion subunit 3022 is used to convert the policy data into vector form to obtain a second vector; the normalization subunit 3023 is used to normalize the first vector and the second vector; the offset subunit 3024 is used to add a fixed value offset to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
[0204] In one embodiment, the clustering unit 303 is used to write the enterprise data vector and the policy data vector into the FAISS index library, and use the clustering algorithm in FAISS to train the enterprise data vector and the policy data vector, divide them into several classes, and save them into a file to obtain an enterprise data vector file and a policy data vector file.
[0205] In one embodiment, the similarity calculation unit 304 is used to calculate the similarity between the enterprise data vector file and the policy data vector file using the Euclidean distance, and screen the policy data vector files whose similarity meets the requirements to determine the candidate policy set.
[0206] In one embodiment, the weighted processing unit 305 is used to perform industry-weighted processing on the candidate policy set to obtain a processing result.
[0207] In one embodiment, if Fig.10 As shown, the weighted processing unit 305 includes a matching subunit 3051 , a rule determination subunit 3052 and a processing subunit 3053 .
[0208] The matching subunit 3051 is used to perform the most fine-grained industry matching on the enterprise data to obtain the matching results; the rule determination subunit 3052 is used to determine the weighted rules according to the matching results; the processing subunit 3053 is used to process the candidate policy set according to the weighted rules to obtain the processing results.
[0209] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned policy resource recommendation device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0210] The policy resource recommendation device 300 can be implemented in the form of a computer program. Fig.11 Runs on the computer device shown.
[0211] See also Fig.11 , Fig.11 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0212] See also Fig.11 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0213] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a policy resource recommendation method.
[0214] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0215] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a policy resource recommendation method.
[0216] The network interface 505 is used to communicate with other devices over the network. Fig.11The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0217] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0218] Acquire enterprise data and policy data, and pre-process the policy data to obtain initial data; perform text vectorization on the initial data to obtain enterprise data vectors and policy data vectors; input the enterprise data vectors and the policy data vectors into the FAISS index library to classify the vectors and obtain enterprise data vector files and policy data vector files; calculate the similarity between the enterprise data vector files and the policy data vector files to determine a candidate policy set; perform weighted processing on the candidate policy set to obtain a processing result; filter out target policy resources from the processing result; and send the target policy resources to the enterprise terminal.
[0219] In one embodiment, when the processor 502 implements the step of acquiring enterprise data and policy data and performing preprocessing to obtain initial data, the processor 502 specifically implements the following steps:
[0220] Acquire enterprise data and policy receipts; text-structure the policy data to obtain preprocessing results; and combine the enterprise data and the preprocessing results to form initial data.
[0221] In one embodiment, when the processor 502 implements the step of performing text vectorization on the initial data to obtain the enterprise data vector and the policy data vector, the processor 502 specifically implements the following steps:
[0222] Key features are identified from the enterprise data of the initial data and converted into vector form to obtain a first vector; the policy data is converted into vector form to obtain a second vector; the first vector and the second vector are normalized; and a fixed value offset is added to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
[0223] In one embodiment, when the processor 502 implements the step of inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain the enterprise data vector file and the policy data vector file, the processor 502 specifically implements the following steps:
[0224] The enterprise data vector and the policy data vector are written into the FAISS index library, and the enterprise data vector and the policy data vector are trained using the clustering algorithm in FAISS, divided into several classes, and saved into a file to obtain an enterprise data vector file and a policy data vector file.
[0225] In one embodiment, when the processor 502 implements the step of calculating the similarity between the enterprise data vector file and the policy data vector file to determine the candidate policy set, the processor 502 specifically implements the following steps:
[0226] The Euclidean distance is used to calculate the similarity between the enterprise data vector file and the policy data vector file, and the policy data vector files whose similarity meets the requirements are screened to determine the candidate policy set.
[0227] In one embodiment, when the processor 502 implements the step of performing weighted processing on the candidate policy set to obtain a processing result, the processor 502 specifically implements the following steps:
[0228] The candidate policy set is subjected to industry-weighted processing to obtain a processing result.
[0229] In one embodiment, when the processor 502 implements the step of performing the same industry weighted processing on the candidate policy set to obtain the processing result, the processor 502 specifically implements the following steps:
[0230] Perform the finest-grained industry matching on the enterprise data to obtain a matching result; determine a weighting rule based on the matching result; and process the candidate policy set based on the weighting rule to obtain a processing result.
[0231] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0232] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0233] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0234] Acquire enterprise data and policy data, and pre-process the policy data to obtain initial data; perform text vectorization on the initial data to obtain enterprise data vectors and policy data vectors; input the enterprise data vectors and the policy data vectors into the FAISS index library to classify the vectors and obtain enterprise data vector files and policy data vector files; calculate the similarity between the enterprise data vector files and the policy data vector files to determine a candidate policy set; perform weighted processing on the candidate policy set to obtain a processing result; filter out target policy resources from the processing result; and send the target policy resources to the enterprise terminal.
[0235] In one embodiment, when the processor executes the computer program to implement the step of acquiring enterprise data and policy data and performing preprocessing to obtain initial data, the processor specifically implements the following steps:
[0236] Acquire enterprise data and policy receipts; text-structure the policy data to obtain preprocessing results; and combine the enterprise data and the preprocessing results to form initial data.
[0237] In one embodiment, when the processor executes the computer program to implement the step of text vectorizing the initial data to obtain an enterprise data vector and a policy data vector, the processor specifically implements the following steps:
[0238] Key features are identified from the enterprise data of the initial data and converted into vector form to obtain a first vector; the policy data is converted into vector form to obtain a second vector; the first vector and the second vector are normalized; and a fixed value offset is added to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
[0239] In one embodiment, when the processor executes the computer program to implement the step of inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file, the processor specifically implements the following steps:
[0240] The enterprise data vector and the policy data vector are written into the FAISS index library, and the enterprise data vector and the policy data vector are trained using the clustering algorithm in FAISS, divided into several classes, and saved into a file to obtain an enterprise data vector file and a policy data vector file.
[0241] In one embodiment, when the processor executes the computer program to implement the step of calculating the similarity between the enterprise data vector file and the policy data vector file to determine the candidate policy set, the processor specifically implements the following steps:
[0242] The Euclidean distance is used to calculate the similarity between the enterprise data vector file and the policy data vector file, and the policy data vector files whose similarity meets the requirements are screened to determine the candidate policy set.
[0243] In one embodiment, when the processor executes the computer program to implement the step of weighting the candidate policy set to obtain a processing result, the processor specifically implements the following steps:
[0244] The candidate policy set is subjected to industry-weighted processing to obtain a processing result.
[0245] In one embodiment, when the processor executes the computer program to implement the step of performing the same industry weighted processing on the candidate policy set to obtain the processing result, the processor specifically implements the following steps:
[0246] Perform the finest-grained industry matching on the enterprise data to obtain a matching result; determine a weighting rule based on the matching result; and process the candidate policy set based on the weighting rule to obtain a processing result.
[0247] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0248] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0249] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0250] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention 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.
[0251] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0252] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A policy resource recommendation method, characterized in that: include: Obtain enterprise data and policy data, and pre-process the policy data to obtain initial data; Performing text vectorization on the initial data to obtain an enterprise data vector and a policy data vector; Input the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file; Calculate the similarity between the enterprise data vector file and the policy data vector file to determine a candidate policy set; Performing weighted processing on the candidate policy set to obtain a processing result; Filtering target policy resources from the processing results; The target policy resource is sent to the enterprise terminal.
2. The policy resource recommendation method according to claim 1, characterized in that: The acquisition of enterprise data and policy data and preprocessing to obtain initial data includes: Obtain corporate data and policy receipts; Performing text structuring on the policy data to obtain a preprocessing result; The enterprise data and the preprocessing results are combined to form initial data.
3. The policy resource recommendation method according to claim 1, characterized in that: The text vectorization of the initial data to obtain an enterprise data vector and a policy data vector includes: Identifying key features from the enterprise data of the initial data and converting them into vector form to obtain a first vector; Converting the policy data into a vector form to obtain a second vector; Normalizing the first vector and the second vector; An offset of a fixed value is added to the processed first vector and the processed second vector according to the region to obtain an enterprise data vector and a policy data vector.
4. The policy resource recommendation method according to claim 3, characterized in that: The step of inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file comprises: The enterprise data vector and the policy data vector are written into the FAISS index library, and the enterprise data vector and the policy data vector are trained using the clustering algorithm in FAISS, divided into several classes, and saved into a file to obtain an enterprise data vector file and a policy data vector file.
5. The policy resource recommendation method according to claim 1, characterized in that: The calculating the similarity between the enterprise data vector file and the policy data vector file to determine the candidate policy set includes: The Euclidean distance is used to calculate the similarity between the enterprise data vector file and the policy data vector file, and the policy data vector files whose similarity meets the requirements are screened to determine the candidate policy set.
6. The policy resource recommendation method according to claim 1, characterized in that: The weighted processing of the candidate policy set to obtain a processing result includes: The candidate policy set is subjected to industry-weighted processing to obtain a processing result.
7. The policy resource recommendation method according to claim 6, characterized in that: The process of performing the same industry weighted processing on the candidate policy set to obtain the processing result includes: Perform the most granular industry matching on enterprise data to obtain matching results; Determine a weighting rule based on the matching results; The candidate policy set is processed according to the weighted rule to obtain a processing result.
8. A policy resource recommendation method, characterized in that: include: An acquisition unit, used for acquiring enterprise data and policy data, and preprocessing the policy data to obtain initial data; A vectorization unit, used for performing text vectorization on the initial data to obtain an enterprise data vector and a policy data vector; A clustering unit, used for inputting the enterprise data vector and the policy data vector into the FAISS index library to classify the vectors and obtain an enterprise data vector file and a policy data vector file; A similarity calculation unit, used for calculating the similarity between the enterprise data vector file and the policy data vector file to determine a candidate policy set; A weighted processing unit, used for performing weighted processing on the candidate policy set to obtain a processing result; A screening unit, used for screening out target policy resources from the processing results; The sending unit is used to send the target policy resource to the enterprise terminal.
9. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Text classification method and device, equipment and storage medium
CN114003682A
Policy matching system based on NLP text multi-label classification
CN116108160A
Precise policy recommendation method and system and medium
CN116775851A