A policy analysis method, apparatus, device, medium, and program product

By combining large language models and target knowledge graphs, the evolution patterns of policies in specific time and space are generated, solving the problem that existing technologies cannot analyze the evolution patterns of policies and achieving a deep and comprehensive understanding of policy evolution.

CN121032342BActive Publication Date: 2026-02-27SHENZHEN SMARTCITY TECH DEV GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511569301.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-27
Estimated Expiration
2045-10-30

AI Technical Summary

Technical Problem

Existing technologies are insufficient to comprehensively and accurately analyze the patterns of policy evolution, cannot track the trajectory of policy evolution over long periods and across multiple regions, and cannot adapt to data changes during the policy evolution process.

Method used

By generating keyword sets and semantic query requests through a large language model, and combining the spatiotemporal information of policy entities in the target knowledge graph, the target policy entity set is obtained, and the evolution pattern of the policy in a specific spatiotemporal context is generated based on community analysis.

Benefits of technology

It enables comprehensive and in-depth analysis of policies within a specific time and space, uncovering policy evolution patterns and trends, and meeting the needs for analyzing the laws governing policy evolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121032342B_ABST
    Figure CN121032342B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a policy analysis method, device, equipment, medium and program product. The method comprises: if a first user prompt word containing spatio-temporal information and policy information is received, controlling a large language model to generate a first semantic query request according to the spatio-temporal information and a keyword set generated according to the policy information; controlling a graph retrieval model to find policy entities in a target knowledge graph according to the first semantic query request to obtain a target policy entity set; taking each policy entity in the target policy entity set as a starting node in the target knowledge graph, matching nodes of a preset hop number from each starting node to obtain a target subgraph corresponding to each policy entity in the target policy entity set; and controlling the large language model to generate an evolution rule of a policy described by the policy information according to the target subgraph corresponding to each policy entity in the target policy entity set and summary information of a community to which each target subgraph belongs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and in particular to a policy analysis method and device, equipment, medium and program product. BACKGROUND

[0002] Currently, there are mainly two types of technical solutions in the field of public policy research:

[0003] One type is a policy research method based on text research and field research. This method collects and combs policy texts, academic literature, reports and other materials through manual collection, understands the policy background, historical evolution, theoretical basis and existing research results, and provides a basis for subsequent analysis. At the same time, through interviews, focus groups, case analysis and other methods, social factors, cultural background and other factors behind the policy are deeply excavated, and the influence of policy formulation and implementation is analyzed. The advantage of this solution is that it fully integrates the experience and wisdom of experts in the field, avoiding policy research from being divorced from existing theories and actual situations. However, this method has significant defects: policy research involves a large number of theoretical literature and policy texts, and this solution mainly relies on manual reading comprehension and summary to extract key information, which is time-consuming and inefficient, and for complex policy work, it is time-consuming and prone to omissions or inconsistencies. Manual work is difficult to track the evolution of policies in a long period and in multiple regions, and it is difficult to form a comprehensive and accurate understanding of the evolution of policies.

[0004] Another approach is a large-scale model-based enterprise information policy recommendation method. In the preprocessing stage, this method combines a time-weighted algorithm and expert scoring to calculate matching weights for several policy documents and determine their corresponding matching attributes and document indexes for more accurate screening of basic information. The matching attributes, document indexes, and matching weights are stored in a pre-defined policy knowledge base. Using aggregated data query technology, combined with enterprise information and the pre-defined policy knowledge base, the range of policy entries meeting the criteria is quickly identified. Based on the target enterprise information and its location, target policy entries are determined. Through a multimodal functional model and interactive summarization technology, the visual information and textual content corresponding to the target policies are processed simultaneously, ultimately generating policy results tailored to the enterprise. The advantages of this approach are that the time-weighted algorithm gives more weight to new policies, the expert scoring strategy makes policy matching more accurate, and the aggregated data query technology significantly shortens the policy matching time, avoiding the tedious manual screening by enterprises. However, this scheme also has significant drawbacks: First, it is only applicable to policy matching analysis at the policy implementation level and cannot be used for general policy research such as policy spatiotemporal comparison, correlation impact analysis, and post-implementation evaluation, thus failing to support the discovery of policy evolution patterns. Second, once the expert scores for policy matching weights are determined, the algorithm can only match according to the predetermined scores, making it difficult to automatically learn and update scores based on new situations and data. It has poor adaptability and cannot adapt to data changes during policy evolution, thus failing to uncover the deep-seated patterns of policy elements changing over time and space.

[0005] In summary, existing technical solutions are insufficient for analyzing the patterns of policy evolution and cannot meet the urgent needs of the public policy research field. There is an urgent need for a technical solution that can analyze the patterns of policy evolution. Summary of the Invention

[0006] The purpose of this application is to provide a policy analysis method, apparatus, device, medium, and program product that can analyze the patterns of policy evolution to a certain extent.

[0007] A first aspect of this application provides a policy analysis method, the method comprising:

[0008] If a first user prompt word containing spatiotemporal information and policy information is received, the large language model is controlled to generate a keyword set based on the policy information, and the large language model is controlled to generate a first semantic query request for knowledge graph query based on the spatiotemporal information and the keyword set.

[0009] The control graph retrieval model finds, according to the first semantic query request, policy entities that are respectively hit by each keyword in the keyword set and are published within the time and space described by the time and space information in a target knowledge graph, to obtain a target policy entity set; the target knowledge graph is a knowledge graph created by the graph retrieval model according to target entities and target entity relationships extracted from target knowledge data, the target knowledge data is knowledge data related to policies, the target entities include policy entities, and the attributes of the policy entities and the attributes of the target entity relationships each include respective corresponding time and space information;

[0010] Each policy entity in the target policy entity set is taken as a starting node in the target knowledge graph, and nodes matching a preset number of hops from each starting node along edges respectively connected to the starting node are obtained, to obtain a target subgraph corresponding to each policy entity in the target policy entity set;

[0011] The summary information of a community to which each target subgraph belongs is obtained; the summary information is information generated by the graph retrieval model to describe each community after community analysis of the target knowledge graph;

[0012] The large language model is controlled to generate, according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs, an evolution rule of the policy described by the policy information within the time and space described by the time and space information.

[0013] A second aspect of an embodiment of the present application provides a policy analysis device, and the device includes:

[0014] A first generation module is configured to, if a first user prompt word containing time and space information and policy information is received, control a large language model to generate a keyword set according to the policy information, and control the large language model to generate a first semantic query request for querying a knowledge graph according to the time and space information and the keyword set;

[0015] A first finding module is configured to control a graph retrieval model to find, according to the first semantic query request, policy entities that are respectively hit by each keyword in the keyword set and are published within the time and space described by the time and space information in a target knowledge graph, to obtain a target policy entity set; the target knowledge graph is a knowledge graph created by the graph retrieval model according to target entities and target entity relationships extracted from target knowledge data, the target knowledge data is knowledge data related to policies, the target entities include policy entities, and the attributes of the policy entities and the attributes of the target entity relationships each include respective corresponding time and space information;

[0016] The first matching module is configured to take each node where each policy entity in the target policy entity set is located in the target knowledge graph as a starting point, match nodes with a preset number of hops from each starting point along edges connected to the starting point, and obtain a target subgraph corresponding to each policy entity in the target policy entity set.

[0017] The first obtaining module is configured to obtain summary information of a community to which each target subgraph belongs, wherein the summary information is information generated by the graph retrieval model to describe each community after community analysis of the target knowledge graph.

[0018] The second generating module is configured to control the large language model to generate an evolution rule of the policy described in the policy information description within the time and space described in the time and space information description according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs.

[0019] A third aspect of the embodiments of the present application provides an electronic device, which includes a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the policy analysis method according to the first aspect.

[0020] A fourth aspect of the embodiments of the present application provides a readable storage medium, which stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the policy analysis method according to the first aspect.

[0021] A fifth aspect of the embodiments of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is configured to run programs or instructions to implement the steps of the policy analysis method according to the first aspect.

[0022] A sixth aspect of the embodiments of the present application provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the policy analysis method according to the first aspect.

[0023] In the embodiment of the present application, the user inputs the prompt word containing the space-time and policy information, the large language model is used to generate the keyword set and the semantic query request, and based on the generated semantic query request, the related policy entities are searched in the target knowledge graph which has been constructed and contains space-time information, and the target policy entity set is obtained. Taking the node corresponding to the target policy entity as the starting point, the target subgraph is obtained by matching the related nodes according to the preset hop number. This way can extract the local structure information closely related to the policy entity from the knowledge graph. The summary information of the community to which the target subgraph belongs is obtained. The summary information is the description of each community after the analysis of the knowledge graph community, which can help the large language model to understand the overall knowledge background of the subgraph, so that the large language model can combine the community background knowledge when analyzing the evolution rule of the policy, thereby generating a more comprehensive and deeper analysis result. Finally, the large language model is used to generate the evolution rule of the policy in a specific space-time by combining the target subgraph and the community summary information. The large language model can effectively mine the evolution mode, trend and other rules of the policy in the space-time dimension based on the precise information and background knowledge obtained in the foregoing, so as to meet the analysis demand of the evolution rule of the policy. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 FIG. 1 is a flowchart of a policy analysis method provided by an embodiment of the present application;

[0025] Figure 2 FIG. 1 is a flowchart of a policy analysis method provided by an embodiment of the present application;

[0026] Figure 3 FIG. 2 is a structural schematic diagram of a policy analysis device provided by an embodiment of the present application;

[0027] Figure 4 FIG. 3 is a hardware structure schematic diagram of an electronic device for implementing an embodiment of the present application;

[0028] Figure 5 FIG. 4 is another hardware structure schematic diagram of an electronic device for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a class and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the objects before and after are in a "or" relationship.

[0031] The policy analysis method, device, equipment, storage medium, chip and computer program product provided by the embodiments of the present application can effectively solve the above technical problems. The policy analysis method, device, equipment, storage medium, chip and computer program product provided by the embodiments of the present application will be described in detail below in combination with the drawings and specific embodiments and their application scenarios.

[0032] As shown in Figure 1 , Figure 1 is a flowchart of the policy analysis method provided by the embodiments of the present application. The policy analysis method can be applied to electronic devices, which can be computers, smart phones, tablet computers, wearable smart devices, etc. It can also be a server of a distributed system, a cloud server, an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology, etc. It can also be applied to Figure 3 the policy analysis device shown in Figure 4 or Figure 5 the electronic device shown in the following description. Please refer to Figure 1 , the policy analysis method comprises the following steps S11 to S15:

[0033] S11, if a first user prompt word containing spatio-temporal information and policy information is received, controlling a large language model to generate a keyword set according to the policy information, and controlling the large language model to generate a first semantic query request for querying a knowledge graph according to the spatio-temporal information and the keyword set.

[0034] In the information interaction system, the user conveys his own needs by inputting prompt words, and the system makes corresponding processing according to the prompt words. The first user prompt word input by the user needs to contain spatio-temporal information (such as time range, geographical location, etc.) and policy information (such as specific policy name, category, etc.), which is used to define a specific spatio-temporal and policy category for subsequent policy analysis. For example, the user inputs "A city environmental protection policy from 2010 to 2020", which determines the time span of 10 years, the location of A city, and the policy field of environmental protection for subsequent analysis.

[0035] The large language model generates a keyword set according to the policy information in the first prompt word input by the user, which helps to accurately locate the related policy entity in the knowledge graph, such as generating keywords such as "subsidy standard" and "new energy vehicle type" for "new energy vehicle subsidy policy".

[0036] The semantic query request is constructed based on the given information, which is used to find the data that meets the conditions in the structured data such as knowledge graph. The large language model generates a first semantic query request in combination with the spatio-temporal information and the keyword set, making the query more targeted and accurate, for example, in combination with "A city environmental protection policy from 2010 to 2020" and the generated keyword set, a query request is generated that can accurately find related environmental protection policies in the knowledge graph within the spatio-temporal range.

[0037] S12, the control graph retrieval model finds the policy entity in the target knowledge graph that is hit by each keyword in the keyword set and is published within the spatio-temporal range described by the spatio-temporal information according to the first semantic query request, to obtain a target policy entity set; the target knowledge graph is a knowledge graph created by the graph retrieval model according to the target entities and the relationships between the target entities extracted from the target knowledge data, the target knowledge data is knowledge data related to policy, and the target entity includes policy entity, the attributes of the policy entity and the attributes of the relationships between the target entities each include the corresponding spatio-temporal information.

[0038] The graph retrieval model is used to retrieve data in the knowledge graph according to specific conditions. The graph retrieval model finds the policy entity that meets the keyword hit and the specific spatio-temporal range at the same time in the target knowledge graph according to the first semantic query request, so as to obtain the target policy entity set, and ensure that the found policy entity meets the policy related keywords and is within the specified spatio-temporal range.

[0039] S13, taking each node in the target policy entity set as a starting point, starting from each starting point to match the nodes of a preset number of hops along each edge connected to each other, to obtain the target subgraph corresponding to each policy entity in the target policy entity set.

[0040] In the structure of the knowledge graph, starting from a certain node, other related nodes are found through edges, and a local subgraph can be constructed to analyze the relationship between nodes. Starting from the node corresponding to the target policy entity, the target subgraph is obtained by matching the nodes according to the preset number of hops, which facilitates in-depth analysis of the relationship between the policy entity and other related entities, for example, the preset number of hops is 3, 2 or 5, which can find the related entities directly and indirectly connected to the policy entity to form a subgraph.

[0041] S14, obtain summary information of each target subgraph belonging to a community; the summary information is information generated by the graph retrieval model for describing each community after community analysis of the target knowledge graph.

[0042] The community analysis and the generation of the summary information can provide a general description of the related groups in the knowledge graph, helping to understand the characteristics of the groups. By obtaining the summary information of the community to which the target subgraph belongs, background knowledge is provided for subsequent large language model analysis, making the analysis more comprehensive. For example, the summary information of the community may include common characteristics of policy entities in the community.

[0043] S15, controlling the large language model to generate the evolution rule of the policy described in the policy information description within the time and space described in the time and space information description according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of each target subgraph belonging to a community.

[0044] The large language model has strong semantic analysis and generation capabilities. Based on the target subgraph and the summary information of the community, the large language model generates the evolution rule of the policy within a specific time and space, realizing the analysis of the evolution of the policy.

[0045] For example, assume that the user inputs "A city environmental protection policy from 2010 to 2020" as the first user prompt word. The system controls the large language model to generate a keyword set such as "subsidy standard" and "new energy vehicle type" according to "environmental protection policy", and generates a semantic query request in combination with "2010-2020" and the keyword set. The graph retrieval model searches for environmental protection policy entities that hit the keywords and were released in A city during 2010-2020 in the target knowledge graph according to the request, obtaining a target policy entity set. Taking the nodes of these policy entities in the knowledge graph as the starting point, a preset hop number is 3, and the target subgraph is obtained by matching the connected nodes. The summary information of each target subgraph belonging to a community is obtained, and finally the large language model generates the evolution rule of the environmental protection policy in A city from 2010 to 2020 according to the target subgraph and the summary information of the community, such as the change of environmental protection focus from urban environmental protection to wild ecological environmental protection.

[0046] In this embodiment, through the accurate input of the user prompt word, the analysis of the policy is ensured to be targeted, and the specific time and space and the policy field (such as a certain type of policy in a certain region and a certain period of time) can be focused on; the large language model generates a keyword set and a semantic query request, improving the accuracy of knowledge graph retrieval, which is helpful for quickly positioning the related policy entities; the target subgraph and the summary information of the community to which it belongs are obtained, providing a rich and comprehensive information basis for the large language model, so that the large language model can deeply mine the evolution rule of the policy within a specific time and space, and finally realize the accurate analysis of the evolution rule of the policy.

[0047] In the embodiments of the present application, the user inputs a prompt word containing spatio-temporal and policy information, a large language model is used to generate a keyword set and a semantic query request, and based on the generated semantic query request, relevant policy entities are searched in a target knowledge graph that has been constructed and contains spatio-temporal information to obtain a target policy entity set. Taking the node corresponding to the target policy entity as a starting point, relevant nodes are matched according to a preset hop number to obtain a target subgraph, which can extract local structural information closely related to the policy entity from the knowledge graph. The summary information of the community to which the target subgraph belongs is obtained, which is a description of each community after analyzing the knowledge graph community and can help the large language model understand the overall knowledge background of the subgraph, so that the large language model can combine the community background knowledge when analyzing the policy evolution rule, thereby generating a more comprehensive and in-depth analysis result. Finally, the large language model generates the evolution rule of the policy in a specific spatio-temporal space by combining the target subgraph and the community summary information. With its powerful semantic understanding and analysis capabilities, the large language model can effectively mine the evolution mode, trend and other rules of the policy in the spatio-temporal dimension based on the precise information and background knowledge obtained in the foregoing, thereby meeting the analysis demand for the policy evolution rule.

[0048] In some embodiments, the step S15 includes steps y and z as follows:

[0049] Step y, generating a target natural language context corresponding to the target policy entity set according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs, and embedding the first user prompt word and the output requirement in the target natural language context to obtain an evolution rule analysis prompt word;

[0050] Step z, controlling the large language model to generate the evolution rule of the policy described by the policy information in the spatio-temporal space described by the spatio-temporal information according to the evolution rule analysis prompt word.

[0051] In the field of natural language processing, integrating various types of related information to generate a natural language context can provide the model with more rich and coherent information to better understand the task. Integrating the target subgraph corresponding to the target policy entity and the summary information of the community to which the subgraph belongs to generate a target natural language context is like building a comprehensive information framework for policy evolution rule analysis. Embedding the first user prompt word ensures that the analysis is closely related to the user's needs and clearly defines the policy scope and spatio-temporal conditions for analysis. Embedding the output requirement standardizes the content form and focus of the large language model output, such as requiring the output of the time trend and key turning points of policy evolution. The evolution rule analysis prompt word generated in this way can guide the large language model to generate policy evolution rule content that meets the requirements.

[0052] After receiving explicit and targeted prompt words, the large language model can analyze and reason based on the provided information to generate corresponding content by virtue of its strong language understanding and generation capabilities. The large language model analyzes the prompt words according to the evolution law, extracts key information from the target natural language context, and generates the evolution law of the policy in a specific space-time by using its semantic understanding and logical reasoning capabilities, thus meeting the user's demand for policy evolution law analysis.

[0053] For example, assume that the target policy entity set is related to the "2015-2020 education reform policy of a certain city". The target subgraph contains the relationship information between the policy and entities such as schools, teachers, and students, and the community summary information describes the discussion focus and characteristics of the policy in different groups in the education field. These information is integrated to generate the target natural language context, such as "During the period of 2015-2020, the city implemented education reform policy, involving multiple relationships with schools, teachers, students, and other parties. Different communities focus on teaching method improvement, teacher training, and other aspects……”. Then, the first user prompt word "2015-2020 education reform policy of a certain city" and the output requirement "analyze the time trend of policy evolution, policy content changes, and key influencing factors" are embedded to obtain the evolution law analysis prompt word. According to this prompt word, the large language model generates evolution law of the education reform policy in a specific space-time, such as "2015-2017 focused on teaching method reform pilot, 2018-2020 gradually promoted and deepened reform, key influencing factors include the need for teacher level improvement……” and other aspects.

[0054] In this embodiment, by generating the target natural language context and embedding the key information to obtain the evolution law analysis prompt word, comprehensive and targeted input information is provided for the large language model, enabling the large language model to more accurately and efficiently generate the evolution law of the policy. This not only ensures that the generated evolution law closely meets the user's demand, but also improves the accuracy and professionalism of the analysis, providing valuable reference for policy makers and researchers, and helping them to better understand the development and changes of the policy in a specific space-time.

[0055] In some optional embodiments, the target entities include a subject entity, an event entity, and a feedback entity, the subject entity is a subject to which a published policy is directed, the event entity is an event caused by the published policy, and the feedback entity is feedback of people on the published policy, the target entity inter-relationship includes a first relationship between the policy entity and the subject entity, a second relationship between the subject entity and the event entity, and a third relationship between the feedback entity and the policy entity, the attributes of the policy entity further include a number, a title, an issuance time, an issuance department, a clause content, and a validity period, the attributes of the subject entity further include a name, a type, and a publication time, the attributes of the event entity further include a type, an occurrence time, and a description, and the attributes of the feedback entity further include a data source and a translated text, the attributes of the first relationship include an influence and a specification, the attributes of the second relationship include a participation and a cause, and the third relationship includes a mention and a discussion.

[0056] In the field of policy research and analysis, the subject, event, and feedback are common elements related to policies. The subject participates in the implementation of the policy and is affected by the policy, the event is a situation caused in the process of policy implementation, and the feedback reflects people's views on the policy. Defining these target entities helps to build a comprehensive knowledge graph and provides a multi-dimensional data basis for analyzing the impact of policy implementation. For example, the subject entity can be an enterprise, an individual, etc., the event entity can be that an enterprise expands its production scale due to a certain tax preferential policy, and the feedback entity can be people's evaluation of a certain education policy through a network platform.

[0057] The relationship between entities is used to describe the connection between different elements, which helps to understand the interaction of things. These relationships respectively reflect the effect of the policy on the subject, the association between the subject and the event, and the connection between the feedback and the policy. For example, the first relationship can be "influence", indicating the effect of the policy on the subject, the second relationship can be "cause", reflecting the causal relationship between the subject and the event, and the third relationship can be "mention", reflecting the relevance of the feedback and the policy.

[0058] In policy-related management and analysis, the attributes of a policy entity are the basic elements for a comprehensive description of a policy. The number is used to uniquely identify the policy, facilitating the retrieval and management of the policy; the title briefly summarizes the policy theme; the issuance time specifies the time point of the policy, which is crucial for analyzing the timeliness and coherence of the policy; the issuing department reflects the policy-making subject, and policies issued by different departments have different emphases and authority; the provisions detail the specific provisions and requirements of the policy; and the effective period defines the applicable time period of the policy. Clarifying these attributes of the policy entity makes the description of the policy entity in the knowledge graph more accurate and comprehensive, and helps subsequent precise policy retrieval, analysis of policy evolution, and evaluation of policy impact based on these attributes. For example, through the issuance time and effective period, the role and impact of the policy at different time stages can be clearly understood.

[0059] In the policy implementation scenario, the subject is the object of the policy action or the relevant party participating in the policy implementation. In the attributes of the subject entity: the name is used to specify the specific subject; the type classifies the subject, facilitating the analysis of policy impact from different categories of subjects - such as subject types including enterprises, individuals, etc.; and the release time records the release time of the subject-related information, which helps to track the subject's response and participation in the policy at different times. These attributes provide detailed information for the characterization of the subject entity in the knowledge graph, enabling a better understanding of the relationship between the policy and the subject and the dynamic changes of the subject in the policy implementation process. For example, by analyzing the differences in the impact of different types of subjects on the policy through the subject name and type.

[0060] In the attributes of the event entity: in various situation analysis triggered by the policy, the type of event helps to classify the event, such as economic events, social events, etc.; the occurrence time determines the time node of the event in the policy implementation process, which is crucial for analyzing the time sequence changes of the policy implementation effect; and the description details the specific content of the event. In this application, these attributes enrich the information of the event entity in the knowledge graph, enabling in-depth analysis of various situations triggered by the policy implementation and their association with the policy from the event perspective. For example, according to the comparison of the event occurrence time and the policy implementation time, the triggering effect of the policy on the event can be determined.

[0061] In the attributes of the feedback entity: in the processing of policy feedback information, the data source indicates the source channel of the feedback information, and feedback from different sources has different credibility and representativeness, such as government reports, social media, etc.; and the translated text is the original feedback information converted into a text form for easy analysis, especially for some non-text form feedback (such as voice, image, etc.). Clarifying these attributes of the feedback entity helps to filter, evaluate, and analyze the feedback information, thereby more accurately understanding the views and attitudes of the public and relevant parties towards the policy. For example, feedback information from authoritative data sources is preferred for policy evaluation.

[0062] In describing the connection between different entities, attributes are used to refine the nature and characteristics of the relationship. The "influence" and "regulation" attributes of the first relationship (between the policy entity and the subject entity) clearly indicate the way the policy acts on the subject; the "participation" and "trigger" attributes of the second relationship (between the subject entity and the event entity) describe the causal and participation relationship between the subject and the event; the "mention" and "discussion" attributes of the third relationship (between the feedback entity and the policy entity) reflect the degree of association between the feedback and the policy. These relationship attributes provide more specific information for the description of the relationships between entities in the knowledge graph, and help to analyze the interaction between various elements in the policy implementation process.

[0063] For example, assume that there is a "certain region new energy industry support policy" as a policy entity, with the number "NY202301", the title "certain region new energy industry support policy", the issue time "January 2023", the issuing department "certain region energy bureau", the clause content including the subsidy standard for new energy enterprises, and the effective period until "December 2025". The subject entity is "a new energy enterprise", with a clear name and a type of enterprise, and the publication time is the time when the enterprise's relevant information is disclosed after the policy is published. The event entity is "the enterprise expands production scale", which belongs to the enterprise development event, and the occurrence time is "June 2023". The description is that the enterprise decides to expand production scale due to policy subsidies. The feedback entity is a comment from a certain industry forum, the data source is the industry forum, and the translated text is the analysis-friendly text converted from the forum comment content. There is an "influence" relationship between the policy entity and the subject entity, an "trigger" relationship between the subject entity and the event entity, and a "discussion" relationship between the feedback entity and the policy entity. Through these entities, attributes and relationships, a knowledge graph fragment about the new energy industry support policy is constructed, which can be used to analyze the impact of the policy on the enterprise, the events caused by the policy impact on the enterprise, and the feedback of all parties to the policy, etc.

[0064] In this embodiment, the attributes of various entities and the attributes of the relationships between entities are defined in detail, enriching the information dimension of the knowledge graph. The knowledge graph can more accurately reflect the complex relationships between various elements in the policy implementation process, providing a more detailed and accurate data basis for policy spatiotemporal evolution analysis and policy impact assessment based on the knowledge graph. It helps policy analysts to deeply analyze the policy from multiple angles, fully understand the implementation effect, impact range and feedback of the policy, and thus provides strong support for the optimization and adjustment of the policy.

[0065] Correspondingly, as shown in Figure 2 the policy analysis method further includes:

[0066] S21, if a second user prompt word containing policy attribute information is received, controlling the large language model to generate a second semantic query request for a knowledge graph query according to the second user prompt word.

[0067] In an information retrieval system, a user inputs specific information, and the system generates a corresponding query request to obtain relevant data. The user inputs a prompt word containing policy attribute information (such as policy name, number, specific clause, etc.), and the large language model generates a second semantic query request based on this to accurately find the relevant policy entity in the knowledge graph. For example, the user inputs "information about the implementation effect of the environmental protection policy with a specific number", and the large language model generates a corresponding query request.

[0068] S22, controlling the graph retrieval model to find the target policy entity hit by the policy attribute information in the target knowledge graph according to the second semantic query request.

[0069] The graph retrieval model searches for entities that meet the conditions in the knowledge graph according to the given query request. In this application, the graph retrieval model finds the target policy entity that matches the policy attribute information in the target knowledge graph according to the second semantic query request, which determines the target object for subsequent analysis of the impact of policy implementation.

[0070] S23, taking the target node where the target policy entity is located in the knowledge graph as the starting point, matching the target subject entity that has a first relationship with the target node, the target event entity that has a second relationship with the target subject entity, and the target feedback entity that has a third relationship with the target node, to obtain the target subgraph corresponding to the target policy entity.

[0071] In the knowledge graph structure, starting from a specific node, relevant nodes are matched according to the relationship between entities to construct a subgraph, which can deeply analyze the association between related entities. Starting from the target policy entity node, other related entity nodes are matched according to the defined relationship to obtain the target subgraph, which provides a specific data structure for analyzing the impact of policy implementation. For example, a subgraph constructed in this way can show which subjects are affected by a certain policy, what events are triggered, and what feedback is received.

[0072] S24, controlling the large language model to generate the governance impact of the policy matched by the policy attribute information after the policy is implemented according to the target subgraph.

[0073] The large language model has the ability to analyze data and generate conclusions. In this application, the large language model generates an analysis of the governance impact after the implementation of the policy based on the information about the policy, subject, event, and feedback contained in the target subgraph, which realizes the evaluation of the effect of the policy

[0074] Exemplarily, it is assumed that a user inputs "information about the implementation effect of a certain university's talent introduction policy" as the second user prompt word. The large language model generates a second semantic query request for knowledge graph query according to the prompt word. The graph retrieval model searches for a target policy entity matching the university's talent introduction policy in the target knowledge graph according to the request. Taking the target policy entity node as the starting point, a target subject entity (such as a university teacher, a scientific research team, etc.) having a first relationship with the target policy entity, a target event entity (such as an increase in university scientific research achievements, an increase in academic exchange activities, etc.) having a second relationship with the target subject entity, and a target feedback entity (such as a teacher's satisfaction evaluation of the policy, a society's evaluation of the university's talent attraction, etc.) having a third relationship with the target policy entity are matched to obtain a target subgraph. The large language model generates the governance impact of the university's talent introduction policy after implementation according to the target subgraph, such as how many high-level talents are attracted, specific performance of the policy on the improvement of the university's scientific research level, etc.

[0075] In this embodiment, by explicitly defining the target entity and its relationship, a knowledge graph structure reflecting the policy implementation process and impact is constructed, providing a rich data source for analyzing the impact of policy implementation; the user inputs policy attribute information and generates a query request, which can accurately locate the target policy entity; by constructing a target subgraph, multiple aspects of information related to the impact of policy implementation are integrated; the large language model generates the governance impact based on the target subgraph, which realizes effective evaluation of the implementation effect of the policy, and helps to understand the actual role and impact of the policy.

[0076] In some optional embodiments, the above step S24 includes the following steps a and b:

[0077] Step a, controlling the large language model to analyze the target event entity and the target feedback entity in the target subgraph to obtain the views, sentiments and attitudes towards the target policy entity involved in the target event entity and the target feedback entity;

[0078] Step b, controlling the large language model to generate the governance impact of the policy matched by the policy attribute information after implementation according to the analyzed views, sentiments and attitudes towards the target policy entity.

[0079] The large language model has strong semantic understanding and text analysis capabilities, and can extract key elements such as views, sentiment tendencies and attitudes from text information. By analyzing the target event entity and the target feedback entity in the target subgraph, the key opinions and attitudes about the target policy entity are refined from these specific information related to the policy, providing micro-level basis for subsequent accurate evaluation of the impact of policy implementation. For example, from the feedback text of the public on a certain medical policy, the public's support or opposition attitude towards the policy, and the views on the positive or negative impact of the policy are analyzed.

[0080] The large language model can conduct comprehensive analysis and induction based on the extracted relevant information, and thus obtain a summary and guiding conclusion. In this application, based on the information of viewpoints, sentiments and attitudes obtained by the previous analysis, the large language model generates the policy implementation impact, integrates the micro-level analysis into the macro policy impact evaluation, and comprehensively understands the effect and impact of the policy in the actual implementation process.

[0081] For example, assuming that the target event entity in the target subgraph is "some area builds new libraries in many schools due to the education subsidy policy", and the target feedback entity is the comments of parents on the network forum, such as "this education subsidy policy is really too good, and it really improves the learning environment of children". The large language model analyzes these information, obtains the viewpoint that the policy promotes the construction of education infrastructure from the target event entity, and obtains the information that the parents have a positive attitude towards the policy and the sentiment tends to be positive from the target feedback entity. Then the large language model generates the policy implementation impact, such as the education subsidy policy improves the allocation of education resources and improves the satisfaction of the public after implementation.

[0082] In this embodiment, through the analysis of the large language model on the target event entity and the target feedback entity, the views on the policy contained in the specific events and the public feedback in the policy implementation process can be deeply mined, and the policy impact can be accurately grasped from the micro perspective. Then, the policy implementation impact is generated according to the analysis results, which realizes the transformation from specific information to macro evaluation, comprehensively and accurately presents the effect of the policy in the actual application, provides detailed and targeted policy evaluation for policy makers, and helps to further optimize the policy.

[0083] In some optional embodiments, the above step S24 comprises the following step c:

[0084] Step c: according to the publishing time of the target event entity and the target feedback entity in the target subgraph, the viewpoints, sentiments and attitudes towards the target policy entity analyzed are sorted in chronological order;

[0085] Step b comprises:

[0086] Step e: controlling the large language model to generate the causal relationship between each target event entity and the target policy entity in the target subgraph according to the sorted viewpoints, sentiments and attitudes towards the target policy entity.

[0087] Time sequence is an important way of data organization, which can clearly present the development of things. In the context of policy analysis, sorting the opinions, sentiments and attitudes related to the policy according to time can intuitively show the changes of the policy's impact at different time stages. For example, when analyzing a long-term environmental protection policy, people's views and attitudes towards the policy may change as the policy is implemented. Through time sorting, we can clearly see this dynamic change.

[0088] Large language models can find potential causal relationships in ordered data based on their strong reasoning and analysis capabilities. Based on the sorted relevant information, large language models can mine the causal relationship between target event entities and target policy entities, thereby deeply understanding the internal logic between policy implementation and the events it triggers, and providing a stronger basis for policy evaluation.

[0089] For example, suppose there is relevant information about an employment support policy in the target subgraph. The target event entities include "some enterprises began to expand recruitment after the first year of policy implementation" and "unemployment rate decreased significantly after the third year of policy implementation", and the target feedback entities include "employees felt optimistic about job prospects after the first year of policy implementation" and "employers believed that the policy was very helpful to business development after the third year of policy implementation". First, sort the parsed opinions, sentiments and attitudes according to the release time of these events and feedbacks. Then, based on the sorted information, the large language model analyzes and concludes that "the employment support policy prompted enterprises to expand recruitment, which in turn led to a decrease in unemployment rate".

[0090] In this embodiment, by sorting the relevant opinions, sentiments and attitudes in chronological order, we provide a time dimension clue for analyzing the impact of the policy, which can clearly present the evolution of the policy's effect over time. The large language model generates causal relationships between target event entities and target policy entities based on the sorted information, which helps to deeply understand the chain reaction and internal logic of policy implementation, making policy evaluation more in-depth and comprehensive, and providing a more in-depth reference for policy adjustment and optimization.

[0091] In some optional embodiments, the policy analysis method further comprises steps f to j:

[0092] Step f, obtaining target knowledge data;

[0093] Step g, controlling the large language model to extract target entities and target entity relationships from the target knowledge data, as well as the spatio-temporal information of the target entities and the spatio-temporal information of the target entity relationships;

[0094] Step h, controlling the graph retrieval model to create a target knowledge graph according to the extracted target entities and the relationships between the target entities, and to store the spatio-temporal information of the target entities and the spatio-temporal information of the relationships between the target entities as attribute information of the corresponding nodes in the target knowledge graph;

[0095] Step i, controlling the graph retrieval model to perform community analysis on the target knowledge graph to obtain at least one community;

[0096] Step j, controlling the graph retrieval model to generate summary information for each community in the at least one community, and to store the at least one community and the respective summary information of each community in association.

[0097] Target knowledge data is the source of information for the entire analysis process. Target knowledge data specifically refers to policy-related knowledge data, which includes various raw information required for subsequent knowledge graph construction and policy analysis, such as policy documents, related reports, research materials, etc., providing a material basis for subsequent operations.

[0098] The large language model identifies and extracts policy-related target entities (such as policy entities, subject entities, etc.), relationships between them (such as the influence relationship between policy and subject, etc.), and corresponding spatio-temporal information from the target knowledge data. These information is crucial for constructing a knowledge graph that accurately reflects the actual situation of the policy, such as extracting information such as the release of a certain policy at a specific time and place and the activities of the subjects affected by the policy within the corresponding spatio-temporal information.

[0099] The graph retrieval model constructs a target knowledge graph based on the target entities and relationships extracted by the large language model, and stores the spatio-temporal information as node attributes in the knowledge graph. The knowledge graph constructed in this way not only contains entities and relationships, but also integrates the spatio-temporal dimension, making the knowledge graph more meaningful and valuable for analysis, facilitating subsequent retrieval and analysis of policy-related information based on spatio-temporal conditions.

[0100] Community analysis is a method of studying the structure of a knowledge graph, aiming to discover tightly connected node groups in the graph. The graph retrieval model performs community analysis on the constructed target knowledge graph to find node sets with similar characteristics or tight connections forming communities. These communities reflect different forms of aggregation of policy-related information, such as communities formed around a certain type of policy or policies in a specific region, providing different dimensions of perspective for subsequent analysis.

[0101] Generating summary information is a way of abstracting and summarizing complex information. The graph retrieval model generates summary information for each community, which briefly describes the main characteristics and key content of the community. Storing the community in association with the summary information facilitates subsequent quick access to the core information of the community, providing important background knowledge support for large language models when analyzing policy evolution rules or implementation impacts.

[0102] For example, assume that a batch of target knowledge data about the industrial development policies of a province is obtained, including policy documents, enterprise feedback reports, etc. The large language model extracts target entities such as "certain industrial support policy" (policy entity), "related enterprises" (subject entity), and "enterprise expansion due to policy" (event entity) from these data, as well as target entity relationship such as "policy-enterprise (impact)" and "enterprise-expansion (trigger)", and extracts temporal and spatial information such as policy release time and enterprise expansion location. The graph retrieval model creates a target knowledge graph based on these extraction results and stores the temporal and spatial information as node attributes. Then, the graph retrieval model performs community analysis on the knowledge graph and finds that multiple communities have formed around the industrial policies of different regions in the province. For each community, the graph retrieval model generates summary information, such as "the certain regional industrial policy community mainly focuses on electronic information industry policy and involves development support measures and feedback of related enterprises", and stores the community in association with the summary information.

[0103] In this embodiment, the target knowledge data obtained provides rich materials for policy analysis; the large language model extracts key information to lay the foundation for constructing an accurate knowledge graph; the creation of a knowledge graph that integrates temporal and spatial information enables policy analysis to be carried out in the temporal and spatial dimensions, improving the accuracy and comprehensiveness of the analysis; community analysis and the generation of summary information provide different perspectives and key background knowledge for policy analysis, which helps to deeply mine the internal relationships between policy-related information, and ultimately provides strong support for accurately analyzing policy evolution rules and implementation impacts.

[0104] The policy analysis method provided in the embodiments of the present application can be executed by a policy analysis device. In the embodiments of the present application, the method of executing policy analysis by a policy analysis device is taken as an example to illustrate the policy analysis device provided in the embodiments of the present application.

[0105] As shown in Figure 3 , a structural schematic diagram of the policy analysis device provided in the embodiments of the present application is shown. Please refer to Figure 3 , the policy analysis device 30 comprises:

[0106] The first generation module 301 is configured to, if a first user prompt word containing temporal and spatial information and policy information is received, control the large language model to generate a keyword set based on the policy information, and control the large language model to generate a first semantic query request for querying the knowledge graph based on the temporal and spatial information and the keyword set;

[0107] The first search module 302 is configured to control the graph search model to search, according to the first semantic query request, a policy entity in a target knowledge graph, which is hit by each keyword in the keyword set and is published within the time and space described by the time and space information, to obtain a target policy entity set; the target knowledge graph is a knowledge graph created by the graph search model according to target entities and target entity relationships extracted from target knowledge data; the target knowledge data is knowledge data related to policies; the target entities include policy entities; and the attributes of the policy entities and the attributes of the target entity relationships each include respective time and space information;

[0108] The first matching module 303 is configured to take each node in which a policy entity in the target policy entity set is located in the target knowledge graph as a starting point, and match nodes with a preset hop number from each starting point along each edge connected to the starting point, to obtain a target subgraph corresponding to each policy entity in the target policy entity set;

[0109] The first obtaining module 304 is configured to obtain summary information of a community to which each target subgraph belongs; the summary information is information generated by the graph search model to describe each community after community analysis of the target knowledge graph is performed on each community identified;

[0110] The second generation module 305 is configured to control the large language model to generate an evolution rule of the policy described in the policy information within the time and space described by the time and space information, according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs.

[0111] The policy analysis apparatus 30 in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiments of the present application are not limited in this regard.

[0112] The policy analysis apparatus 30 in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.

[0113] The policy analysis apparatus 30 provided in the embodiments of the present application can implement the method embodiments of the above-described method, and each process of the method embodiments is not repeated here. Figure 1 to Figure 2

[0114] In some optional embodiments, as shown in Figure 4 The embodiments of the present application further provide an electronic device 1300, which includes a processor 1301 and a memory 1302, and the memory 1302 stores a program or instructions which can run on the processor 1301. When the program or instructions are executed by the processor 1301, each step of the above-described policy analysis method embodiments is implemented, and the same technical effects are achieved, and each step is not repeated here.

[0115] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.

[0116] Figure 5 A hardware structure schematic diagram of an electronic device for implementing the embodiments of the present application.

[0117] ​The electronic device 170 includes, but is not limited to, a radio frequency unit 1701, a network module 1702, an audio output unit 1703, an input unit 1704, a sensor 1705, a display unit 1706, a user input unit 1707, an interface unit 1708, a memory 1709, and a processor 17010, and the like. Those skilled in the art can understand that the electronic device 170 can also include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 17010 through a power management system, so as to realize the functions of power management, such as charging, discharging, and power consumption management, through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than the figure, or combine certain components, or different component arrangements, which are not described here.

[0118] The processor 17010 is configured to:

[0119] If the first user prompt word containing the spatiotemporal information and the policy information is received, the large language model is controlled to generate a keyword set according to the policy information, and the large language model is controlled to generate a first semantic query request for querying a knowledge graph according to the spatiotemporal information and the keyword set;

[0120] The graph retrieval model is controlled to find, according to the first semantic query request, policy entities in a target knowledge graph that are respectively hit by each keyword in the keyword set and are published within the time and space described by the spatiotemporal information, to obtain a target policy entity set; the target knowledge graph is a knowledge graph created by the graph retrieval model according to target entities and target entity relationships extracted from target knowledge data; the target knowledge data is knowledge data related to policies; the target entities include policy entities; the attributes of the policy entities and the attributes of the target entity relationships each include respective spatiotemporal information;

[0121] Each policy entity in the target policy entity set is taken as a starting node in the target knowledge graph, and nodes matching a preset number of hops from each starting node are obtained along each edge connected to the starting node, to obtain a target subgraph corresponding to each policy entity in the target policy entity set;

[0122] The summary information of each target subgraph is obtained; the summary information is information generated by the graph retrieval model to describe each community after community analysis of the target knowledge graph;

[0123] The large language model is controlled to generate an evolution rule of the policy described by the policy information description in the space-time described by the space-time information description according to the target subgraph corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs.

[0124] It should be understood that in the embodiments of the present application, the input unit 1704 can include a graphics processor (GPU) 17041 and a microphone 17042. The graphics processor 17041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1706 can include a display panel 17061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1707 includes at least one of a touch panel 17071 and other input devices 17072. The touch panel 17071 is also called a touch screen. The touch panel 17071 can include two parts of a touch detection device and a touch controller. The other input devices 17072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, and the like, which will not be described here.

[0125] The memory 1709 can be used to store software programs and various data. The memory 1709 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 1709 can include a volatile memory or a non-volatile memory, or the memory 1709 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1709 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.

[0126] The processor 17010 can include one or more processing units; optionally, the processor 17010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 17010.

[0127] Any of the product embodiments described above can run through its own processor to realize each process of the policy analysis method embodiments described above, and can achieve the same technical effects. To avoid repetition, they will not be described one by one.

[0128] The embodiment of the present application further provides a readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to realize the processes of the policy analysis method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein. The processor is the processor in the electronic device or electronic system in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

[0129] The embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a program or instructions to realize the processes of the policy analysis method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0130] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip, and the like.

[0131] The embodiment of the present application provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to realize the processes of the policy analysis method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0132] In the embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the modules or units is only a logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0133] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0134] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0135] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0136] The above is only an embodiment of the present application, and does not limit the patent scope of the present application. The above specific embodiments are only illustrative, not restrictive. Any equivalent structure or equivalent process transformation based on the content of the present application specification and drawings, or direct or indirect application in other related technical fields, without departing from the purpose of the present application and the scope of the claims, can also be made in many forms, which are also included in the patent protection scope of the present application.

Claims

1. A policy analysis method, characterized in that, The method includes: If a first user prompt word containing spatiotemporal information and policy information is received, the large language model is controlled to generate a keyword set based on the policy information, and the large language model is controlled to generate a first semantic query request for knowledge graph query based on the spatiotemporal information and the keyword set. The control graph retrieval model searches the target knowledge graph for policy entities that are matched by each keyword in the keyword set and published within the spatiotemporal space described by the spatiotemporal information, based on the first semantic query request, to obtain a target policy entity set. The target knowledge graph is a knowledge graph created by the graph retrieval model based on the target entities and relationships between target entities extracted from the target knowledge data. The target knowledge data is knowledge data related to policies. The target entities include policy entities, and the attributes of the policy entities and the attributes of the relationships between target entities all include their corresponding spatiotemporal information. Among them, the target entities include: subject entities, event entities, and feedback entities. The subject entity is the subject targeted by the published policy, the event entity is the event triggered by the published policy, and the feedback entity is people's feedback on the published policy. The relationships between target entities include: a first relationship between the policy entity and the subject entity, a second relationship between the subject entity and the event entity, and a third relationship between the feedback entity and the policy entity. Starting from the node in the target knowledge graph where each policy entity in the target policy entity set is located, and matching nodes with a preset number of hops along each edge connected to it, the target subgraph corresponding to each policy entity in the target policy entity set is obtained. Obtain summary information of the community to which each target subgraph belongs; the summary information is information generated by the graph retrieval model after performing community analysis on the target knowledge graph to describe each identified community; The large language model is controlled to generate the evolution pattern of the policy described by the policy information within the spatiotemporal space described by the spatiotemporal information, based on the target subgraphs corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs. If a second user prompt word containing policy attribute information is received, the large language model is controlled to generate a second semantic query request for the knowledge graph query based on the second user prompt word. The graph retrieval model is controlled to search for the target policy entity matched by the policy attribute information in the target knowledge graph according to the second semantic query request. Starting from the target node where the target policy entity is located in the knowledge graph, starting from the target node, target subject entities that have a first relationship with the target node, target event entities that have a second relationship with the target subject entity, and target feedback entities that have a third relationship with the target node are matched to obtain the target subgraph corresponding to the target policy entity. The large language model is controlled to generate the policy impact of the policy matched with the policy attribute information after its implementation, based on the target subgraph.

2. The method according to claim 1, characterized in that, The control of the large language model to generate the policy impact of the policy matched by the policy attribute information after its implementation, based on the target subgraph, includes: The large language model is controlled to parse the target event entities and target feedback entities in the target subgraph to obtain the viewpoints, sentiments and attitudes towards the target policy entities involved in the target event entities and the target feedback entities; The large language model is controlled to generate the policy impact of the policy after its implementation, based on the parsed views, sentiments and attitudes toward the target policy entities.

3. The method according to claim 2, characterized in that, The control of the large language model to generate the policy impact of the policy attribute information matched by the target subgraph after its implementation also includes: Based on the release time of the target event entity and the target feedback entity in the target subgraph, the parsed views, sentiments and attitudes towards the target policy entity are sorted in chronological order. The controlled large language model generates the policy impact of the policy matched with the policy attribute information after its implementation, based on the parsed views, sentiments, and attitudes towards the target policy entities. This impact includes: The large language model is controlled to generate causal relationships between each target event entity and the target policy entity in the target subgraph based on the sorted views, sentiments and attitudes toward the target policy entities.

4. The method according to claim 1, characterized in that, The method further includes: Acquire target knowledge data; The large language model is controlled to extract target entities and relationships between target entities, as well as spatiotemporal information of target entities and spatiotemporal information of relationships between target entities from the target knowledge data. The graph retrieval model is controlled to create a target knowledge graph based on the extracted target entities and the relationships between them, and the spatiotemporal information of the target entities and the spatiotemporal information of the relationships between them are stored as attribute information of the corresponding nodes in association with the target knowledge graph. The graph retrieval model is controlled to perform community analysis on the target knowledge graph to obtain at least one community. The graph retrieval model is controlled to generate summary information for each community in the at least one community, and the at least one community and the summary information corresponding to each community are associated and stored.

5. The method according to claim 1, characterized in that, The control mechanism of the large language model generates the evolution pattern of the policy described by the policy information within the spatiotemporal description of the spatiotemporal information based on the target subgraphs corresponding to each policy entity in the target policy entity set and the summary information of the communities to which each target subgraph belongs, including: Based on the target subgraphs corresponding to each policy entity in the target policy entity set and the summary information of the communities to which each target subgraph belongs, a target natural language context corresponding to the target policy entity set is generated, and the first user prompt word and output requirements are embedded in the target natural language context to obtain the evolution law analysis prompt word; The large language model is controlled to analyze prompt words according to the evolution rules, and generate the evolution rules of the policy described by the policy information within the spatiotemporal space described by the spatiotemporal information.

6. The method according to claim 1, characterized in that, The attributes of the policy entity also include: number, title, issuance time, issuing department, clause content, and effective period; the attributes of the subject entity also include: name, type, and release time; the attributes of the event entity also include: type, occurrence time, and description; the attributes of the feedback entity also include: data source and translated text; the attributes of the first relationship include: impact and norm; the attributes of the second relationship include: participation and initiation; and the attributes of the third relationship include: mention and discussion.

7. A policy analysis device, characterized in that, The device includes: The first generation module is used to, if a first user prompt word containing spatiotemporal information and policy information is received, control the large language model to generate a keyword set based on the policy information, and control the large language model to generate a first semantic query request for knowledge graph query based on the spatiotemporal information and the keyword set; The first search module is used to control the graph retrieval model to search the target knowledge graph for policy entities that are matched by each keyword in the keyword set and published within the spatiotemporal space described by the spatiotemporal information, based on the first semantic query request, to obtain a target policy entity set. The target knowledge graph is a knowledge graph created by the graph retrieval model based on target entities and relationships between target entities extracted from target knowledge data. The target knowledge data is knowledge data related to policies. The target entities include policy entities, and the attributes of the policy entities and the attributes of the relationships between target entities all include their corresponding spatiotemporal information. The target entities include: subject entities, event entities, and feedback entities. The subject entity is the subject targeted by the published policy, the event entity is the event triggered by the published policy, and the feedback entity is people's feedback on the published policy. The relationships between target entities include: a first relationship between policy entities and subject entities, a second relationship between subject entities and event entities, and a third relationship between feedback entities and policy entities. The first matching module is used to start from the node where each policy entity in the target policy entity set is located in the target knowledge graph, and match nodes with a preset number of hops along each edge connected to it to obtain the target subgraph corresponding to each policy entity in the target policy entity set. The first acquisition module is used to acquire the summary information of the community to which each target subgraph belongs; the summary information is information generated by the graph retrieval model after performing community analysis on the target knowledge graph to describe each community; The second generation module is used to control the large language model to generate the evolution pattern of the policy described by the policy information in the spatiotemporal space described by the spatiotemporal information, based on the target subgraphs corresponding to each policy entity in the target policy entity set and the summary information of the community to which each target subgraph belongs. The first control module is used to control the large language model to generate a second semantic query request for the knowledge graph query based on the second user prompt word containing policy attribute information if a second user prompt word containing policy attribute information is received. The second control module is used to control the graph retrieval model to search for the target policy entity matched by the policy attribute information in the target knowledge graph according to the second semantic query request. The second matching module is used to start from the target node where the target policy entity is located in the knowledge graph, and match the target subject entity that has a first relationship with the target node, the target event entity that has a second relationship with the target subject entity, and the target feedback entity that has a third relationship with the target node, to obtain the target subgraph corresponding to the target policy entity. The third generation module is used to control the large language model to generate the policy impact of the policy matched by the policy attribute information after its implementation, based on the target subgraph.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the policy analysis method as described in any one of claims 1 to 6.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the policy analysis method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program includes programs or instructions that, when executed by a processor, implement the steps of the policy analysis method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Index system creation method and device, equipment, medium and program product

    CN120822883A

  • Government affair policy question and answer method based on knowledge graph and related equipment

    CN120849569A