Policy enterprise association relationship extraction method and device, and medium
By using multi-dimensional and multi-weighted calculation methods and Elasticsearch in policy enterprise association relationship extraction, combined with preset filtering rules and aggregation types, the problem of insufficient accuracy and comprehensiveness in association relationship extraction in the existing technology is solved, and the Efficient association relationship extraction under low computing power.
Patent Information
- Application Number
- CN202410793815.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology relies on human experience to determine policy-enterprise relationships, which lacks accuracy and comprehensiveness, and methods based on large models require a large amount of historical data and powerful computing power support.
By extracting enterprise metadata and policy metadata based on historical data, Elasticsearch is used to perform multi-dimensional and multi-weighted correlation calculations, and combined with preset filtering rules and aggregation types, the policy enterprise correlation degree and relationship frequency are calculated to realize the extraction of correlation relationships.
Under the condition of low computing power, it achieves accurate and comprehensive extraction of policy enterprise relationships, improves the flexibility and accuracy of calculations, and ensures the accuracy and near-real-time nature of the relationship extraction process.
Smart Images

Figure CN118656409A
Abstract
Description
Technical Field
[0001] This document relates to the technical field of policy-enterprise association relations, and in particular to a policy-enterprise association extraction method, device and medium. Background Art
[0002] Policy-enterprise association extraction refers to extracting the association between policy metadata value information and enterprise metadata value information from policy-enterprise association data. Currently, most of the extraction of policy-enterprise associations is done by manually marking enterprise-related metadata after the policy is created to establish the association. Establishing the association between policies and enterprises through manual labeling strongly relies on human experience judgment, and the corresponding accuracy and comprehensiveness are insufficient. The extraction of associations between policies and enterprises based on large models and natural language processing technology often requires a large amount of historical data and powerful computing power as support. Summary of the invention
[0003] The present invention provides a policy-enterprise association extraction method, device and medium, which accurately and comprehensively extract the association between policies and enterprises under low computing power.
[0004] The embodiment of the present invention provides a method for extracting policy-enterprise association relationships, including:
[0005] S1. Extract enterprise metadata and policy metadata based on historical data, obtain enterprise user primary key and policy primary key, and obtain interaction data based on the interaction between the enterprise and the policy platform;
[0006] S2. Set a first query condition according to the policy metadata, and deduplicate the first query condition according to the enterprise user primary key and the policy primary key to obtain a second query condition;
[0007] S3, setting an aggregation type according to the enterprise metadata, aggregating the enterprise metadata according to the second query condition and the aggregation type, and obtaining a first aggregation result;
[0008] S4. Filter the first aggregation result according to a preset filtering rule to obtain a second aggregation result;
[0009] S5. Calculate the policy-enterprise correlation according to the second aggregation result;
[0010] S6. Calculate the policy-enterprise relationship frequency according to the second query condition and the preset filtering rule;
[0011] S7. Extract the policy-enterprise association relationship based on the policy-enterprise association degree and the policy-enterprise relationship frequency.
[0012] An embodiment of the present invention provides an electronic device, including:
[0013] processor; and,
[0014] A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps of the above-mentioned policy-enterprise association extraction method.
[0015] An embodiment of the present invention provides a storage medium for storing computer executable instructions, which, when executed, implement the steps of the above-mentioned policy-enterprise association extraction method.
[0016] The embodiment of the present invention effectively utilizes the historical behavior data of policies and enterprises, and then develops a multi-dimensional, multi-weighted calculation method for measuring the policy-enterprise association relationship. It effectively utilizes Elasticsearch to more accurately and comprehensively extract the association relationship between policies and enterprises under low computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 This is a flow chart of a method for extracting policy-enterprise association relationships according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0020] Method Embodiment
[0021] According to an embodiment of the present invention, a method for extracting policy-enterprise association relationships is provided. Figure 1 Flow chart of the policy-enterprise association relationship extraction method according to an embodiment of the present invention. Figure 1 As shown, the policy-enterprise association relationship extraction method of the embodiment of the present invention specifically includes:
[0022] S1. Extract enterprise metadata and policy metadata based on historical data, obtain enterprise user primary key and policy primary key, and obtain interaction data based on the interaction between the enterprise and the policy platform;
[0023] S1 specifically includes:
[0024] Extract valuable enterprise metadata and policy metadata:
[0025] You can use rule-based, natural language processing or manual extraction methods to extract valuable metadata for policies and enterprises;
[0026] Utilize the policy platform to establish interactive relationships between enterprises and policies:
[0027] Based on policy metadata, the policy platform can formulate, publish and start applying for corresponding policies. Corporate legal persons can log in to the policy platform, view policy content, follow policies of interest and apply for corresponding policies.
[0028] Collect and store enterprise historical behavior data:
[0029] By leveraging the interaction between enterprises and the policy platform, we collect and store enterprise policy declaration data D1, enterprise policy attention data D2, and enterprise policy detail data D3. We create a corresponding Elasticsearh index structure based on the storage type, and use logstash to synchronize incremental data.
[0030] Furthermore, the calculation weights corresponding to D1, D2, and D3 are set to W1, W2, and W3 respectively, where W1>W2>W3 and W1+W2+W3=1. If D1, D2, and D3 all exist, the default weights are set to 0.7, 0.2, and 0.1. For the case where only D2 and D3 exist, the weights are set to 0.66 and 0.34. For the case where only D3 data exists, the weight is set to 1. The specific weight value can be adjusted according to demand.
[0031] S2. Set a first query condition according to the policy metadata, and deduplicate the first query condition according to the enterprise user primary key and the policy primary key to obtain a second query condition;
[0032] Set query conditions based on the policy metadata type. Policy metadata is divided into drop-down type and text type. For the drop-down type, you need to use the drop-down values as query conditions in turn. If the type is text type, first manually collect common terms in the policy text, then synchronize the terms to the IK word segmentation plug-in thesaurus in elasticsearch to improve the accuracy of word segmentation. Finally, use the text metadata value as the query condition to perform elasticsearch word segmentation query.
[0033] The policy tag metadata value P iV j The information is used as the first query condition of elasticsearch, and the enterprise user primary key + policy primary key is used as the unique information and then deduplicated as the second query condition.
[0034] S3, setting an aggregation type according to the enterprise metadata, aggregating the enterprise metadata according to the second query condition and the aggregation type, and obtaining a first aggregation result;
[0035] Aggregation type is set according to enterprise metadata type. Enterprise metadata fields have the following types: drop-down type, date type, and numeric type. For drop-down type, es's terms aggregation is used; for date type, es's Datehistogram aggregation is used; for numeric type, es's Range aggregation is used. The grouping range of date type values and the grouping range of numeric type values use the Strud formula to calculate the number of groups by default, and then calculate the corresponding grouping range based on the maximum and minimum values in the data. At the same time, the date and numeric grouping ranges also support manual dynamic modification of configuration.
[0036] S4. Filter the first aggregation result according to a preset filtering rule to obtain a second aggregation result;
[0037] During the calculation process, the association between the policy metadata value information and the enterprise metadata value information is sought. The specific process is as follows: each value information of the policy metadata is used as a query condition of elasticsearch, and each item of enterprise metadata is used as an aggregation field. The aggregated content is the distribution of the proportion of enterprise metadata value information.
[0038] The calculation filtering rules are set as follows: the total number of aggregate query results is greater than the set N, and the corresponding metadata value ratio should be greater than p% to be considered valid data. The default values of N and p are 100 and 20 respectively, and the corresponding thresholds can be set as needed.
[0039] S5. Calculate the policy-enterprise relevance according to the second aggregation result and the frequency ratio of the second aggregation result;
[0040] Aggregate all metadata E of the enterprise based on S3, filter the aggregation results according to the rules set in S4, and record the filtered result set values as Or The maximum value is recorded as A max , the calculation formula of aggregate statistical association is as follows:
[0041]
[0042] The purpose of deduplication query is to consider the comprehensiveness of the distribution of policy-enterprise associations and to avoid enterprises declaring policies too frequently, which would interfere with the accuracy of statistical results. i V j Where P represents policy metadata, V represents the current policy metadata value information, and the overall meaning is the jth value corresponding to the i-th policy metadata. k V l Indicates the lth value information corresponding to the kth enterprise metadata. and Both represent the statistical correlation between the j-th value information corresponding to the i-th policy metadata and the l-th value information corresponding to the k-th enterprise metadata. Formula Middle W c1 , W c2 , W c3 Represent the calculation weights of the two items respectively, and C represents the normalization of the calculation items; the first item is the calculation item The numerator and denominator are respectively for the query item P i V j Corresponding result item E k V l The frequency percentage and the maximum frequency. The second calculation item The denominator represents the clustering field value E k V l , under different query conditions P i V j The sum of the proportions under different query conditions P i V j The higher the corresponding denominator value, the worse the discrimination of this clustering field value in the vertical comparison of the query. The larger the denominator is in the formula, the closer the corresponding inverse statistical frequency is to 0. The third item is calculated The denominator represents the query condition P i V J , the sum of the proportions of different clustering item values, the numerator represents the clustering value E k V l The larger the overall ratio is, the higher the discrimination of the cluster value in the horizontal comparison of the query is. In the overall policy-enterprise relationship calculation process, the frequency ratio of cluster values and the differentiation of the horizontal and vertical ratios of cluster values are fully considered.
[0043] S6. Calculate the policy-enterprise relationship frequency according to the second query condition and a preset filtering rule;
[0044] Set the policy metadata value P i V jThe information is used as the elasticsearch query condition to count the number of companies and filter them according to the total number set in step 4. The corresponding results are recorded as C max Indicates different P i V j Under the query conditions, the maximum number of enterprises, the frequency statistics calculation formula is as follows:
[0045]
[0046] It represents the normalized frequency information of the enterprise data corresponding to the jth value corresponding to the i-th policy metadata. The higher the frequency of the historical data corresponding to the clustering field, the greater the correlation between the query condition value and the clustering field value.
[0047] S7. Extract the policy-enterprise association relationship based on the policy-enterprise association degree and the policy-enterprise relationship frequency.
[0048] The calculation formula for policy-enterprise relationship extraction is as follows:
[0049]
[0050] Where R means the policy metadata value P i V j With enterprise metadata value E k V l The relationship between them, W b Indicates the service weight set in S1, W c4 It is the weight value information of the frequency statistics item in S6.
[0051] In order to obtain more comprehensive policy data and enterprise data, the embodiment S1 of the present invention can also collect data on public government policies and enterprise industrial and commercial information, news information, etc. to improve the data of policy data and enterprise data. In a specific embodiment, in order to improve the efficiency of obtaining policy data and enterprise data, the policy data and enterprise data are processed according to the crawler algorithm, and the public government policies and enterprise industrial and commercial information, news information, etc. can also be processed according to the crawler algorithm. In another specific embodiment, the information of policy data and enterprise data can also be obtained by manual input, which can better ensure the acquisition accuracy of policy data and enterprise data. After that, the policy data and enterprise data are segmented respectively to determine the policy metadata and enterprise metadata. In order to improve the efficiency of the word segmentation of policy data and enterprise data, the jieba word segmentation technology is used to segment the policy data and enterprise data respectively to determine the corresponding policy metadata and enterprise metadata.
[0052] In S1, each policy and its corresponding basic information as well as the basic information of each registered enterprise are extracted from the background of the policy publishing platform, and each registered enterprise is numbered in a set order, marked as 1, 2, ...j, ...m in sequence. The corresponding associated browsing information of each registered enterprise in the policy platform is extracted from the background of the policy platform, which specifically includes the number of browsed policies, the subject corresponding to each browsed policy, the number of views corresponding to each browsed policy, and the browsing time.
[0053] The specific steps for the policy platform described in the embodiment of the present invention to release policy information are as follows: based on the policy information entered in the editing interface, determine the preset declaration materials and declaration information corresponding to the policy information; in response to a request to release the policy, associate the policy information with the declaration URL address of the policy information, the declaration materials and the declaration information to generate the policy information to be released; based on the policy content of the policy information to be released, determine the category of the policy to be released; in response to the policy information to be released being reviewed and approved, send the policy information to the information service platform, obtain user data in the database, determine users who meet the declaration conditions based on the policy information to be released, and push the policy information to the user; the information service platform displays the policy to be released in the corresponding area according to the category of the policy to be released.
[0054] In one embodiment, the policy platform monitors the number of clicks on each policy, obtains the associated number of declarations from the declaration system, and associates the number of clicks and the number of declarations with the policy information. Enterprise users can click on the declaration status after each policy to view the declaration status of a single policy, including statistics on various types of applications such as not accepted, being processed, unable to be processed, and completed. They can also view the detailed form of a single application project, and the form content includes application time, application process, application progress, application funds, application type, and accepting department.
[0055] In S2 of the embodiment of the present invention, the text is subjected to the IK word segmenter to remove stop words, perform part-of-speech recognition and word segmentation, and perform synonym search operations.
[0056] The embodiment of the present invention has the following beneficial effects: in the process of extracting the policy-enterprise association relationship, the different metadata types of policies and enterprises are fully considered, and a better way is adopted to perform filtering conditions and aggregate field processing.
[0057] Full consideration is given to calculating business data weights, setting calculation item weights, and setting filter conditions, which effectively improves the flexibility of use and the accuracy of calculations.
[0058] In the process of extracting policy-enterprise association relationships, the relationship extraction calculation granularity is fine-grained to extract value relationships. In the process of extraction, the frequency proportion of cluster values, the differentiation of the proportion of cluster values in the horizontal and vertical directions, and the frequency of cluster value data are fully considered. Through multi-dimensional considerations, the accuracy of the calculation is effectively improved.
[0059] By effectively utilizing the computing power of elasticsearch, the accuracy and near real-time performance of policy-enterprise relationship extraction are guaranteed under low computing power conditions.
[0060] Device Example 1
[0061] An embodiment of the present invention provides an electronic device, including:
[0062] processor; and,
[0063] A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps as described in the above method embodiment.
[0064] Device Example 2
[0065] An embodiment of the present invention provides a storage medium for storing computer-executable instructions, which, when executed, implement the steps described in the above method embodiment.
[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A policy-enterprise association extraction method, characterized in that: include: S1. Extract enterprise metadata and policy metadata based on historical data, obtain enterprise user primary key and policy primary key, and obtain interaction data based on the interaction between the enterprise and the policy platform; S2. Setting a first query condition according to the policy metadata, and deduplicating the first query condition according to the enterprise user primary key and the policy primary key to obtain a second query condition; S3, setting an aggregation type according to the enterprise metadata, aggregating the enterprise metadata according to the second query condition and the aggregation type, and obtaining a first aggregation result; S4. Filter the first aggregation result according to a preset filtering rule to obtain a second aggregation result; S5. Calculate the policy-enterprise relevance according to the second aggregation result and the frequency ratio of the second aggregation result; S6. Calculate the policy-enterprise relationship frequency according to the second query condition and a preset filtering rule; S7. Extract the policy-enterprise association relationship based on the policy-enterprise association degree and the policy-enterprise relationship frequency.
2. The method according to claim 1, characterized in that The acquisition of interactive data based on the interaction between the enterprise and the policy platform specifically includes: Interaction data is collected based on the interaction between enterprises and the policy platform. The interaction data includes: storage of enterprise policy declaration data D1, enterprise policy attention data D2, and enterprise policy detail viewing data D3. Association calculation weights are set for the interaction data, and a corresponding Elasticsearch index structure is created based on the storage type of the interaction data. Logstash is used for incremental data synchronization.
3. The method according to claim 1, characterized in that The S2 specifically includes: The first query condition is set according to the data type of the policy metadata, including: If the data type of the policy metadata is a drop-down type, the drop-down value is used as the first query condition; If the data type of the policy metadata is a text type, then obtaining common terms in the policy text in the historical data, synchronizing the common terms to the word segmentation word library, and then using the text metadata value as the first query condition; The enterprise user primary key and the policy primary key are used as unique information to deduplicate the first query condition.
4. The method according to claim 1, characterized in that: The S3 specifically includes: Set the aggregation type according to the set aggregation type of enterprise metadata; If the data type of the enterprise metadata is a drop-down type, terms aggregation is used; If the data type of the enterprise metadata is date type, Date histogram aggregation is used; If the data type of the enterprise metadata is numeric, Range aggregation is used.
5. The method according to claim 1, characterized in that: The pre-set filtering rules specifically include: If the total number of the first aggregation results is greater than the preset N, and the corresponding enterprise metadata value accounts for more than p%, the first aggregation result is used as the second aggregation result, otherwise the first aggregation result is filtered as invalid data.
6. The method according to claim 1, characterized in that The S5 specifically includes: The policy-enterprise correlation is obtained through formula 1: Among them, P represents policy metadata, V represents the current policy metadata value information, and P i V j represents the jth value corresponding to the i-th policy metadata, E k V l Indicates the lth value information corresponding to the kth enterprise metadata, and W represents the statistical correlation between the jth value information corresponding to the i-th policy metadata and the lth value information corresponding to the k-th enterprise metadata, c1 , W c2 , W c3 represents the calculation weight, C represents the normalization of the calculation item, and A max Represents the query item P i V j The maximum frequency of the corresponding result, Indicates the clustering field value E k V l Under different query conditions P i V j The sum of the following proportions, Indicates that under different query conditions P i V j The sum of the maximum values of the lower cluster field values; Indicates that for the query condition P i V j The sum of the proportions of different cluster item values.
7. The method according to claim 1, characterized in that The S6 specifically includes: Set the policy metadata value P i V j The information is used as the query condition, the number of enterprises is counted and filtered according to the preset filtering rules, and the result is recorded as Obtain frequency statistics items according to formula 2: in, represents the normalized frequency information of the enterprise data corresponding to the jth value of the i-th policy metadata, C max Indicates different P i V j The maximum number of companies under the query conditions.
8. The method according to claim 2, characterized in that: The S7 specifically includes: Calculate the policy-enterprise relationship extraction according to formula 3: Where R represents the policy metadata value P i V j With enterprise metadata value E k V l The relationship between them, W b Indicates the weight of the association calculation, W c4 Indicates the weight value information of the frequency statistics item.
9. An electronic device, comprising: processor; as well as, A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps of the policy-enterprise association relationship extraction method as described in any one of claims 1-8.
10. A storage medium for storing computer executable instructions, which, when executed, implement the steps of the policy-enterprise association extraction method as described in any one of claims 1 to 8.
