Semantic analysis method and device based on multi-source heterogeneous government affair data
By conducting sentiment analysis at the data point and aspect levels on government data and combining it with time trend factors, a comprehensive sentiment score is generated, which solves the problems of real-time performance and accuracy in semantic analysis of government data, and enables efficient and accurate policy response strategy formulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies cannot effectively and accurately perform semantic analysis on massive amounts of multi-source heterogeneous government data in real time, and cannot meet the government's need for real-time and accurate perception of policy and public opinion.
By acquiring government data in real time from multiple data sources, conducting sentiment analysis at the data point and aspect levels, and combining it with time trend factors, a comprehensive sentiment score is generated and a response strategy is formulated.
It enables comprehensive and accurate sentiment analysis of government data, improves the efficiency of policy response strategy formulation and its alignment with public sentiment, and ensures the efficient and precise implementation of response strategies.
Smart Images

Figure CN121659031A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and specifically to a semantic analysis method and apparatus based on multi-source heterogeneous government data. Background Technology
[0002] With the deepening of e-government digital transformation, governments face the challenge of processing massive amounts of heterogeneous data from multiple sources. The public expresses their opinions on policies through various channels such as social media, news media, and government portals, and traditional manual analysis methods can no longer meet the needs for real-time and accurate public opinion perception. Therefore, how to conduct real-time and accurate semantic analysis of massive amounts of heterogeneous data from multiple sources has become an urgent problem to be solved. Summary of the Invention
[0003] In view of the above-mentioned defects or deficiencies in the existing technology, it is desirable to provide a semantic analysis method and device based on multi-source heterogeneous government data, so as to realize real-time and accurate semantic analysis of massive multi-source heterogeneous data.
[0004] In a first aspect, embodiments of this application provide a semantic analysis method based on multi-source heterogeneous government data, including: Initial government data corresponding to the target policy to be analyzed is obtained in real time from multiple data source channels, and the initial government data is standardized to obtain the government data to be analyzed. For each government data point in the government data to be analyzed, perform data point-level sentiment analysis to obtain the data sentiment score corresponding to the government data; Multiple attribute aspects corresponding to the target policy are obtained. For each attribute aspect, aspect-level sentiment analysis is performed based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data. Based on the data sentiment score and the aspect sentiment score, a comprehensive sentiment score corresponding to the target policy is determined; Based on the comprehensive sentiment score, a response strategy corresponding to the target policy is generated.
[0005] In some embodiments, performing data point-level sentiment analysis for each government data point in the government data to be analyzed includes: Each of the aforementioned government data points is input into a trained sentiment analysis model to obtain a sentiment score corresponding to each component of the government data point. Based on the sentiment score corresponding to each component, the sentiment score of the data point corresponding to the government data point is obtained.
[0006] In some embodiments, the step of performing aspect-level sentiment analysis based on the government data to be analyzed for each of the attribute aspects to obtain the aspect sentiment score corresponding to the government data includes: For each of the aforementioned attributes, a data fragment related to the aforementioned attribute is obtained, wherein the data fragment is at least a portion of the government data; Based on the sentiment score corresponding to the data segment and the sentiment weight of the data segment for the attribute, the sentiment score of the government data for the attribute is determined.
[0007] In some embodiments, determining the comprehensive sentiment score corresponding to the target policy based on the data sentiment score and the aspect sentiment score includes: Obtain the time window corresponding to the current stage of the target policy, and obtain the current sentiment score of the target policy in the current time window and the previous sentiment score in the previous time window; Based on the current sentiment score and the previous sentiment score, determine the time sentiment trend factor; Based on the data sentiment score, the aspect sentiment score, and the time sentiment trend factor, the comprehensive sentiment score corresponding to the target policy is determined.
[0008] In some embodiments, generating a response strategy corresponding to the target policy based on the comprehensive sentiment score includes: Based on the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined; Determine the initial response strategy corresponding to the emotion type based on the emotion type; Based on the initial response strategy and the comprehensive sentiment score, a response strategy corresponding to the target policy is generated.
[0009] In some embodiments, determining the sentiment type corresponding to the target policy based on the comprehensive sentiment score includes: Obtain aspect sentiment comparison values and overall correlations among multiple attribute aspects of the target policy; Based on the comparison values among the various attribute aspects of the target policy, the overall correlation, and the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined.
[0010] Secondly, embodiments of this application provide a semantic analysis device based on multi-source heterogeneous government data, including: The acquisition module is used to acquire the initial government data corresponding to the target policy to be analyzed from multiple data source channels in real time, and to standardize the initial government data to obtain the government data to be analyzed. The first analysis module is used to perform data point-level sentiment analysis on each government data point in the government data to be analyzed, and to obtain the data sentiment score corresponding to the government data. The second analysis module is used to obtain multiple attribute aspects corresponding to the target policy, and for each attribute aspect, perform aspect-level sentiment analysis based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data. The comprehensive analysis module is used to determine the comprehensive sentiment score corresponding to the target policy based on the data sentiment score and the aspect sentiment score; The response module is used to generate a response strategy corresponding to the target policy based on the comprehensive sentiment score.
[0011] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in embodiments of this application.
[0012] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in embodiments of this application.
[0013] Fifthly, embodiments of this application provide a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the method described in embodiments of this application.
[0014] This application proposes a semantic analysis method and apparatus based on multi-source heterogeneous government data. It acquires initial government data corresponding to a target policy from multiple data source channels in real time, and performs point-level sentiment analysis on each data point in the government data to obtain a data sentiment score. It then performs aspect-level sentiment analysis on the government data to obtain aspect sentiment scores. Finally, based on the data sentiment scores and aspect sentiment scores, it determines the comprehensive sentiment score corresponding to the target policy, achieving multi-faceted sentiment score analysis of the target policy and improving the comprehensiveness, accuracy, and reliability of semantic analysis of multi-source heterogeneous government data. Furthermore, based on the comprehensive sentiment score, it generates response strategies corresponding to the target policy, realizing an integrated process for target policy analysis and response, improving the efficiency of policy response strategy formulation and the matching degree with the target policy, and effectively improving the sentiment score of the target strategy through high-quality response strategies.
[0015] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0016] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 The implementation environment architecture diagram of the semantic analysis method based on multi-source heterogeneous government data provided in the embodiments of this application is shown; Figure 2 A flowchart illustrating a semantic analysis method based on multi-source heterogeneous government data provided in an embodiment of this application is shown. Figure 3 This illustration shows a schematic diagram of the structure of a semantic analysis device based on multi-source heterogeneous government data according to an embodiment of this application; Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device or server according to embodiments of this application is shown. Detailed Implementation
[0017] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0019] For the specific implementation environment of the semantic analysis method based on multi-source heterogeneous government data proposed in this application, please refer to [link to relevant documentation]. Figure 1 . Figure 1 The implementation environment architecture diagram of the semantic analysis method based on multi-source heterogeneous government data provided in the embodiments of this application is shown.
[0020] like Figure 1 As shown, the implementation environment architecture includes: terminal device 101 and server 102.
[0021] Terminal device 101 is used to run application clients from multiple data source channels, display target policies provided by the application clients to users, and obtain data information published by public users on target policies to form government data. Terminal device 101 may be a desktop computer, laptop computer, smartphone, tablet computer, e-book reader, smart glasses, smartwatch, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR), virtual reality (VR) device, etc., but is not limited to these.
[0022] Server 102 is used to execute the semantic analysis method based on multi-source heterogeneous government data provided in the embodiments of this application. Server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0023] Terminal device 101 and server 102 are connected directly or indirectly via wired or wireless communication. Optionally, the aforementioned wireless or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to any combination of Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless network, private network, or virtual private network.
[0024] also, Figure 1 The number of terminal devices and servers shown is merely exemplary, and may actually include other numbers of terminal devices and servers, which are not specifically limited in this application.
[0025] The semantic analysis method based on multi-source heterogeneous government data proposed in this application can be implemented by a semantic analysis device based on multi-source heterogeneous government data, which can be installed on a terminal device or a server.
[0026] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation instruction steps as shown in the following embodiments or drawings, the method may include more or fewer operation instruction steps based on conventional or non-creative effort. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0027] It should be noted that the acquisition or use of data in the embodiments of this application requires the user's consent. The relevant data can only be obtained after the user's authorization and permission, and the acquisition or use of the data complies with the laws and regulations of the relevant regions.
[0028] Please refer to Figure 2 , Figure 2This illustration shows a flowchart of a semantic analysis method based on multi-source heterogeneous government data provided in an embodiment of this application. Figure 2 As shown, the method includes: Step 201: Obtain the initial government data corresponding to the target policy to be analyzed in real time from multiple data source channels, and standardize the initial government data to obtain the government data to be analyzed.
[0029] It should be noted that the target policy refers to policy data that has been released or is yet to be released by government agencies. Multiple data channels are included, but are not limited to, official or unofficial government social media channels, news reports, policy documents, public comments, and other initial government data, encompassing structured, semi-structured, and unstructured data. It should be understood that the initial government data includes public feedback on the target policy, including but not limited to public comments, media articles, media comments, and media videos. It should also be understood that the sentiment of the initial government data can be positive (e.g., in favor), negative (e.g., against), or neutral (e.g., temporarily observing), and can be specifically set according to the government's sentiment analysis needs regarding the target policy; this application does not impose specific limitations.
[0030] After obtaining the initial government data, it is necessary to standardize the initial government data, including but not limited to data filtering and data cleaning, to obtain the government data to be analyzed.
[0031] Step 202: For each government data point in the government data to be analyzed, perform data point-level sentiment analysis to obtain the corresponding data sentiment score.
[0032] It should be noted that the government data to be analyzed includes multiple government data points, where each government data point is the smallest unit of government data. A government data point can be a comment, a message, a media article, a media video, a news article, etc., and this application does not impose specific limitations. The data sentiment score corresponding to the government data is used to characterize the degree of sentiment of the government data towards the target policy, such as the degree of support. In the embodiments of this application, the data sentiment score corresponding to the government data takes the value [-1, 1], and the higher the data sentiment score, the higher the degree of support for the target policy.
[0033] In other words, in this embodiment of the application, after obtaining the government data to be analyzed, data point-level sentiment analysis is performed for each government data point, that is, sentiment analysis is performed on each government data point to obtain the data point sentiment score corresponding to the government data point, and then the data sentiment score corresponding to the government data is obtained based on the data point sentiment scores corresponding to multiple government data points, such as the weighted sum of the data point sentiment scores of multiple government data points.
[0034] It should be understood that data point-level sentiment analysis refers to conducting sentiment analysis on government data at the smallest granularity from various data source channels to obtain a data sentiment score that can characterize the sentiment of that government data point.
[0035] In a feasible embodiment, for each government data point in the government data to be analyzed, data point-level sentiment analysis is performed, including: inputting each government data point into a trained sentiment analysis model to obtain the sentiment score corresponding to each component of the government data point; and obtaining the data point sentiment score corresponding to the government data point based on the sentiment score corresponding to each component.
[0036] The components of government data points can be broken down according to their type. For example, when a government data point is a media article, press release, public comment, or message, its components are each sentence in the media article, press release, public comment, or message. When a government data point is a media video, its components include audio and images.
[0037] In other words, in this application, when performing sentiment scoring at the smallest granularity of channel data, the smallest granularity of government data is further broken down into its internal components to conduct sentiment analysis at an even lower granularity, thereby obtaining sentiment scores. This achieves a comprehensive and detailed sentiment evaluation of government data, improves the accuracy and reliability of sentiment scores for individual data points, and thus enhances the accuracy and reliability of sentiment scoring for government data.
[0038] Specifically, the components of the standardized government data points can be pieced together and input into a trained sentiment analysis model one by one to obtain the sentiment score of each component. Then, the weighted average of the sentiment scores of each component is used as the sentiment score of the data point corresponding to the government data point.
[0039] For example, the sentiment score for a government data point can be expressed using the following formula: in, For the i-th government data point, The total number of components in the government data points. For the number of emotion categories, For the xth component, Weights for sentiment categories, As the importance weight of the components, For the xth component The probability of belonging to category y.
[0040] It should be understood that the number of sentiment categories is set for sentiment analysis of the target policy; that is, the number of sentiment categories corresponding to different target policies can be the same or different, and this application does not impose a specific limitation. In other words, for different target policies, sentiment analysis models can be trained separately according to the needs of sentiment analysis, so that the sentiment analysis models analyze the corresponding sentiment categories in accordance with the sentiment analysis needs of the target policies.
[0041] It should also be understood that in the above formula, For the xth component The emotional rating.
[0042] Step 203: Obtain multiple attribute aspects corresponding to the target policy. For each attribute aspect, perform aspect-level sentiment analysis based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data.
[0043] It should be noted that the multiple attribute aspects corresponding to the target policy are specific components of the target policy that can be independently evaluated, including but not limited to aspects such as funding, implementation, effectiveness, and fairness. The sentiment score of the aspect corresponding to the government data is used to characterize the degree of support of the government data for that attribute aspect. In the embodiments of this application, the sentiment score of the aspect corresponding to the government data takes the value [-1, 1], and the higher the sentiment score, the greater the degree of support for the target policy.
[0044] In other words, after obtaining the target policy, it is necessary to acquire multiple attribute aspects of the target policy for sentiment analysis. These multiple attribute aspects can be obtained through attribute analysis of the target policy itself, or they can be selected and set according to the implementation requirements of the target policy. Then, sentiment analysis is performed on each attribute aspect based on government data to obtain the sentiment score for each attribute aspect of the target policy. Finally, the sentiment scores of the policy data on each aspect of the target policy are used to determine the aspect sentiment score of the target policy.
[0045] Therefore, the embodiments of this application can perform sentiment evaluation on target policies from multiple attributes, thereby achieving multi-angle and multi-faceted assessment of target policies, effectively improving the accuracy and reliability of sentiment scoring of target policies, and providing rich information and data support for subsequent generation of response strategies, thereby improving the matching degree between response strategies and public sentiment.
[0046] In a feasible embodiment, for each attribute aspect, aspect-level sentiment analysis is performed based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data, including: for each attribute aspect, obtaining data fragments related to the attribute aspect, wherein the data fragments are at least a part of the government data; and determining the sentiment score of the government data for the attribute aspect based on the sentiment score corresponding to the data fragments and the sentiment weight of the data fragments for the attribute aspect.
[0047] In other words, in this embodiment, after determining the attribute to be evaluated, data segments related to that attribute are identified for each policy data item. It should be understood that the data segments related to the attribute are components of the policy data that have a high degree of matching with that attribute, and their adjacent components within a preset range. For example, taking a media article as the policy data, if a sentence in the media article contains a keyword related to that attribute, or if feature matching determines that the feature matching degree between the sentence and the attribute is greater than or equal to a preset matching degree threshold, then L sentences before and L sentences after that sentence are obtained, resulting in 2L+1 sentences as data segments related to that attribute. It should be understood that the policy data may only evaluate one or more attribute aspects, i.e., sentiment exists. By obtaining data segments related to the attribute aspect to calculate the sentiment score of that attribute aspect, the relevance between the data segments used to calculate the sentiment score and the attribute aspect can be effectively guaranteed, thereby effectively avoiding the additional decrease in the sentiment score corresponding to the attribute aspect caused by using a large amount of irrelevant policy data to evaluate the attribute aspect.
[0048] In one feasible embodiment, the sentiment weight of the data fragment on the attribute is the attention weight of the data fragment on the attribute, which can be obtained when acquiring data fragments related to the attribute. This application does not specifically limit this.
[0049] For example, aspect-level sentiment scores for government data regarding attributes can be obtained using the following formula: in, For policy data targeting attributes Aspect-level emotional score, For attributes The relevant k-th data segment, For the sentiment weights of data fragments on attributes, For attributes The number of related data fragments.
[0050] Step 204: Based on the data sentiment score and aspect sentiment score, determine the comprehensive sentiment score corresponding to the target policy.
[0051] In other words, after obtaining data sentiment scores and aspect sentiment scores by conducting data-level sentiment evaluation of the target policy using policy data, the target policy is comprehensively analyzed using the data sentiment scores and aspect sentiment scores to obtain the comprehensive sentiment score corresponding to the target policy, thereby improving the accuracy and reliability of sentiment evaluation of the target policy based on policy data.
[0052] In one feasible embodiment, as the disclosure, dissemination, promotion, and explanation of the details of the target policy may change the public's sentiment towards the target policy, this application further proposes to add time trend analysis to the comprehensive sentiment evaluation of the target policy.
[0053] Specifically, based on data sentiment scores and aspect sentiment scores, the comprehensive sentiment score corresponding to the target policy is determined, including: obtaining the time window corresponding to the current stage of the target policy, and obtaining the current sentiment score of the target policy in the current time window and the previous sentiment score in the previous time window; determining the time sentiment trend factor based on the current sentiment score and the previous sentiment score; and determining the comprehensive sentiment score corresponding to the target policy based on data sentiment scores, aspect sentiment scores, and time sentiment trend factors.
[0054] It should be understood that the size of the time window is related to the current stage of the target policy. For example, before the target policy is announced, the time window can be relatively large to give the public sufficient time to learn about and understand relevant information about the target policy, such as the draft of the target policy and the draft for comments. After the target policy is announced, the time window can be relatively small to understand the public's sentiment during the promotion and implementation of the target policy in a timely manner, so as to facilitate the timely introduction of supplementary plans for the target policy.
[0055] For example, the comprehensive sentiment score corresponding to the target policy can be calculated using the following formula: in, The overall sentiment score corresponding to the target policy. Let A be the sentiment score for the data point corresponding to the i-th government data point, and A be the total number of government data points in the government data. For policy data regarding the j-th attribute The aspect-level sentiment score, where B represents the total number of attribute aspects corresponding to the target policy. The current sentiment score for the current time window. The previous sentiment score for the previous time window. For time window interval, , and Weighting for sentiment scores.
[0056] Therefore, the embodiments of this application can fully consider the sentiment scores of policy data related to the target policy and the attributes of the target policy itself, and propose the correlation between the public's sentiment towards the target policy and the stage and time, thereby improving the comprehensiveness of the comprehensive sentiment analysis of the target policy and ensuring the reliability of the response strategy generated by the comprehensive sentiment score.
[0057] Step 205: Based on the comprehensive sentiment score, generate the response strategy corresponding to the target policy.
[0058] In other words, in this embodiment of the application, the purpose of conducting sentiment evaluation on the target strategy is to analyze the public's sentiment towards the target strategy, and then generate a reasonable response strategy to ensure that the target strategy is implemented reasonably and effectively, and to improve the public's satisfaction or support for the target strategy.
[0059] In some embodiments, generating a response strategy corresponding to the target policy based on a comprehensive sentiment score includes: determining the rating level to which the comprehensive sentiment score belongs, obtaining the response strategy corresponding to the rating level, and using the response strategy corresponding to the rating level as the response strategy corresponding to the target policy.
[0060] In other words, the overall sentiment score has multiple levels, for example: Strongly support: General support: neutral: General objection: Strongly opposed: .
[0061] Therefore, by determining the level of the comprehensive sentiment score, the public's sentiment towards the target strategy can be determined, and then the response strategy corresponding to that level can be obtained, and the response strategy corresponding to the level can be used as the response strategy corresponding to the target policy.
[0062] In other embodiments, a response strategy corresponding to the target policy is generated based on a comprehensive sentiment score, including: determining the sentiment type corresponding to the target policy based on the comprehensive sentiment score; determining an initial response strategy corresponding to the sentiment type based on the sentiment type; and generating a response strategy corresponding to the target policy based on the initial response strategy and the comprehensive sentiment score.
[0063] Specifically, determining the sentiment type corresponding to the target policy based on the comprehensive sentiment score includes: obtaining the aspect sentiment comparison values and overall relevance among multiple attributes of the target policy; and determining the sentiment type corresponding to the target policy based on the comparison values, overall relevance, and comprehensive sentiment score among multiple attributes of the target policy.
[0064] In other words, in this embodiment of the application, the sentiment type corresponding to the target policy is determined by the sentiment differences between the attributes of the target policy. For example, if the comparison values between multiple attributes of the target policy are small, the overall correlation is high, and the comprehensive sentiment score is high, then the sentiment type corresponding to the target policy is determined to be consistent supportive; if the comparison values between multiple attributes of the target policy are large, the overall correlation is low, and the comprehensive sentiment score is moderate, then the sentiment type corresponding to the target policy is determined to be partially supportive.
[0065] For example, the aspect sentiment contrast value can be calculated using the following formula: in, For the aspect of emotional contrast value, The maximum value of the emotion score. This represents the minimum value of emotion in this aspect.
[0066] Aspect-related sentiment correlation can be calculated using the following formula: in, For attributes and The correlation, For attributes Sentiment rating, For attributes Sentiment rating, For attributes standard deviation For attributes standard deviation For attributes The covariance of the sum.
[0067] Furthermore, the overall relevance is calculated based on the aspect-based sentiment relevance: in, For the overall relevance of the attributes of the target policy, for For attributes and The correlation, This is the sum of the absolute values of the correlation coefficients for all different attribute aspects. Choose two attributes from B attributes to form an attribute pair, where B is the total number of attributes corresponding to the target policy.
[0068] In some embodiments, after determining the sentiment type of the target policy, an initial response strategy corresponding to the sentiment type can be determined according to a preset mapping relationship. That is, in this application embodiment, initial response strategies are preset for multiple sentiment types corresponding to the target policy. For example, if the sentiment type corresponding to the target policy is consistent support, there is a response strategy to expand the scope of support; if the sentiment type corresponding to the target policy is partial support, there is a response strategy to transform support, so as to transform neutral or unsupportive sentiment into supportive sentiment. It should be understood that sentiment type can only determine the overall level of public support and cannot determine the specific sentiment of the public towards each attribute of the target policy. Based on this, this application proposes to generate a response strategy corresponding to the target policy based on the initial response strategy and the comprehensive sentiment score, that is, to determine the details of the response strategy with a higher degree of matching with the target policy under the overall response strategy.
[0069] For example, for a target policy with a consistent support sentiment type, if the initial response strategy is determined to be to expand support, then the attribute aspect for expanding support is further determined based on the comprehensive sentiment score. For example, the attribute aspect with the highest sentiment score is determined as the attribute aspect for expanding support, so as to increase the public's support for that attribute aspect, or the attribute aspect with the lowest sentiment score is determined as the attribute aspect for expanding support, so as to reduce the shortcoming of the target policy in that attribute aspect.
[0070] Therefore, this application embodiment can determine the sentiment type corresponding to the target policy based on the obtained comprehensive sentiment score, and generate a two-stage response strategy according to the sentiment type. The initial response strategy determines the macro-level strategy of the response, and the specific implementation content of the response strategy is determined based on the comprehensive sentiment score, such as determining the attributes of the publicity in the response strategy for expanding publicity. This allows the method proposed in this application embodiment to generate a more accurate response strategy for the target policy, improving public satisfaction with the target policy.
[0071] Furthermore, since the comprehensive sentiment score incorporates the time trend factor of the target strategy, the response strategy of the target strategy can be dynamically adjusted according to the stage and time window of the target policy, so as to achieve a response that is highly consistent with the changes in public sentiment, thereby achieving efficient and accurate response adjustment, and effectively improving adjustment efficiency while improving public satisfaction with the target policy.
[0072] It should be noted that although the operation of the method of the present invention is described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed in order to achieve the desired result.
[0073] Figure 3A schematic diagram of the structure of a semantic analysis device based on multi-source heterogeneous government data provided in an embodiment of this application is shown.
[0074] like Figure 3 As shown, the semantic analysis device 10 based on multi-source heterogeneous government data includes: The acquisition module 11 is used to acquire the initial government data corresponding to the target policy to be analyzed from multiple data source channels in real time, and to standardize the initial government data to obtain the government data to be analyzed. The first analysis module 12 is used to perform data point-level sentiment analysis on each government data point in the government data to be analyzed, and to obtain the data sentiment score corresponding to the government data. The second analysis module 13 is used to obtain multiple attribute aspects corresponding to the target policy, and for each attribute aspect, perform aspect-level sentiment analysis based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data. The comprehensive analysis module 14 is used to determine the comprehensive sentiment score corresponding to the target policy based on the data sentiment score and the aspect sentiment score; The response module 15 is used to generate a response strategy corresponding to the target policy based on the comprehensive sentiment score.
[0075] In some embodiments, the first analysis module 12 is specifically used for: Each of the aforementioned government data points is input into a trained sentiment analysis model to obtain a sentiment score corresponding to each component of the government data point. Based on the sentiment score corresponding to each component, the sentiment score of the data point corresponding to the government data point is obtained.
[0076] In some embodiments, the second analysis module 13 is specifically used for: For each of the aforementioned attributes, a data fragment related to the aforementioned attribute is obtained, wherein the data fragment is at least a portion of the government data; Based on the sentiment score corresponding to the data segment and the sentiment weight of the data segment for the attribute, the sentiment score of the government data for the attribute is determined.
[0077] In some embodiments, the comprehensive analysis module 14 is specifically used for: Obtain the time window corresponding to the current stage of the target policy, and obtain the current sentiment score of the target policy in the current time window and the previous sentiment score in the previous time window; Based on the current sentiment score and the previous sentiment score, determine the time sentiment trend factor; Based on the data sentiment score, the aspect sentiment score, and the time sentiment trend factor, the comprehensive sentiment score corresponding to the target policy is determined.
[0078] In some embodiments, the response module 15 is specifically used for: Based on the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined; Determine the initial response strategy corresponding to the emotion type based on the emotion type; Based on the initial response strategy and the comprehensive sentiment score, a response strategy corresponding to the target policy is generated.
[0079] In some embodiments, the response module 15 is specifically used for: Obtain aspect sentiment comparison values and overall correlations among multiple attribute aspects of the target policy; Based on the comparison values among the various attribute aspects of the target policy, the overall correlation, and the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined.
[0080] It should be understood that the modules or modules recorded in the semantic analysis device 10 based on multi-source heterogeneous government data are related to the reference. Figure 2 The steps in the described method correspond accordingly. Therefore, the operations and features described above for the method are also applicable to the semantic analysis device 10 based on multi-source heterogeneous government data and its included modules, and will not be repeated here. The semantic analysis device 10 based on multi-source heterogeneous government data can be pre-implemented in the browser or other security applications of an electronic device, or it can be loaded into the browser or its security applications of an electronic device through download or other means. The corresponding modules in the semantic analysis device 10 based on multi-source heterogeneous government data can cooperate with the modules in the electronic device to implement the solution of the embodiments of this application.
[0081] The division of modules or units mentioned in the detailed description above is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units. See below for reference. Figure 4 , Figure 4 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application is shown. like Figure 4As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 402 or programs loaded from storage section 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the system's operating instructions. CPU 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0082] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from them can be installed into storage section 408 as needed.
[0083] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 2 The described process can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program contains program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the functions defined in the system of this application.
[0084] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two connected blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operational instructions, or using a combination of dedicated hardware and computer instructions.
[0086] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be housed in a processor; for example, a processor can be described as including an acquisition module, a first analysis module, a second analysis module, a comprehensive analysis module, and a response module. The names of these units or modules do not necessarily limit the specific unit or module itself. For example, the acquisition module can also be described as "acquiring in real time initial government data corresponding to the target policy to be analyzed from multiple data source channels, and standardizing the initial government data to obtain the government data to be analyzed."
[0087] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the semantic analysis method based on multi-source heterogeneous government data described in this application.
[0088] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A semantic analysis method based on multi-source heterogeneous government data, characterized in that, include: Initial government data corresponding to the target policy to be analyzed is obtained in real time from multiple data source channels, and the initial government data is standardized to obtain the government data to be analyzed. For each government data point in the government data to be analyzed, perform data point-level sentiment analysis to obtain the data sentiment score corresponding to the government data; Multiple attribute aspects corresponding to the target policy are obtained. For each attribute aspect, aspect-level sentiment analysis is performed based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data. Based on the data sentiment score and the aspect sentiment score, a comprehensive sentiment score corresponding to the target policy is determined; Based on the comprehensive sentiment score, a response strategy corresponding to the target policy is generated.
2. The semantic analysis method based on multi-source heterogeneous government data according to claim 1, characterized in that, The step of performing data point-level sentiment analysis for each government data point in the government data to be analyzed includes: Each of the aforementioned government data points is input into a trained sentiment analysis model to obtain a sentiment score corresponding to each component of the government data point. Based on the sentiment score corresponding to each component, the sentiment score of the data point corresponding to the government data point is obtained.
3. The semantic analysis method based on multi-source heterogeneous government data according to claim 1, characterized in that, For each of the aforementioned attributes, aspect-level sentiment analysis is performed based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data, including: For each of the aforementioned attributes, a data fragment related to the aforementioned attribute is obtained, wherein the data fragment is at least a portion of the government data; Based on the sentiment score corresponding to the data segment and the sentiment weight of the data segment for the attribute, the sentiment score of the government data for the attribute is determined.
4. The semantic analysis method based on multi-source heterogeneous government data according to claim 1, characterized in that, The determination of the comprehensive sentiment score corresponding to the target policy based on the data sentiment score and the aspect sentiment score includes: Obtain the time window corresponding to the current stage of the target policy, and obtain the current sentiment score of the target policy in the current time window and the previous sentiment score in the previous time window; Based on the current sentiment score and the previous sentiment score, determine the time sentiment trend factor; Based on the data sentiment score, the aspect sentiment score, and the time sentiment trend factor, the comprehensive sentiment score corresponding to the target policy is determined.
5. The semantic analysis method based on multi-source heterogeneous government data according to claim 1, characterized in that, The step of generating a response strategy corresponding to the target policy based on the comprehensive sentiment score includes: Based on the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined; Determine the initial response strategy corresponding to the emotion type based on the emotion type; Based on the initial response strategy and the comprehensive sentiment score, a response strategy corresponding to the target policy is generated.
6. The semantic analysis method based on multi-source heterogeneous government data according to claim 5, characterized in that, The process of determining the sentiment type corresponding to the target policy based on the comprehensive sentiment score includes: Obtain aspect sentiment comparison values and overall correlations among multiple attribute aspects of the target policy; Based on the comparison values among the various attribute aspects of the target policy, the overall correlation, and the comprehensive sentiment score, the sentiment type corresponding to the target policy is determined.
7. A semantic analysis device based on multi-source heterogeneous government data, characterized in that, include: The acquisition module is used to acquire the initial government data corresponding to the target policy to be analyzed from multiple data source channels in real time, and to standardize the initial government data to obtain the government data to be analyzed. The first analysis module is used to perform data point-level sentiment analysis on each government data point in the government data to be analyzed, and to obtain the data sentiment score corresponding to the government data. The second analysis module is used to obtain multiple attribute aspects corresponding to the target policy, and for each attribute aspect, perform aspect-level sentiment analysis based on the government data to be analyzed to obtain the aspect sentiment score corresponding to the government data. The comprehensive analysis module is used to determine the comprehensive sentiment score corresponding to the target policy based on the data sentiment score and the aspect sentiment score; The response module is used to generate a response strategy corresponding to the target policy based on the comprehensive sentiment score.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the semantic analysis method based on multi-source heterogeneous government data as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the semantic analysis method based on multi-source heterogeneous government data as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the semantic analysis method based on multi-source heterogeneous government data as described in any one of claims 1-6.