News data classification method and apparatus, and electronic device

By extracting dialect, cultural, and policy features from news texts, constructing regional association features, and combining them with interactive data, the problems of regional adaptability and timeliness in news classification were solved, achieving accurate news classification and efficient matching.

CN120179823BActive Publication Date: 2025-11-18WEIFANG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510661148.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-11-18
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

Existing technologies are ill-suited to the regional cultural diversity and policy sensitivity of news content in news classification, leading to misjudgments of cultural events and an inability to quantify the degree to which news responds to local policies. Furthermore, traditional popularity calculation models fail to dynamically adjust classification weights based on regional attributes, affecting accuracy and timeliness.

Method used

By extracting dialect matching features, cultural matching features, and policy matching features from news texts, regional association features are constructed. A popularity index is built by combining the number of reposts, comments, and likes. The news category index is dynamically updated, and multi-dimensional features are integrated to improve classification accuracy and regional adaptability.

Benefits of technology

It significantly improves the accuracy, regional adaptability, and timeliness of news classification, ensuring that local events are not diluted, dynamically adjusts classification priorities, strengthens the identification of core issues, takes into account policy guidance and public concerns, and achieves efficient matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179823B_ABST
    Figure CN120179823B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, in particular to a news data classification method and device and electronic equipment, which comprises the following steps: dialect matching features, culture matching features and policy matching features of collected news texts are extracted; regional correlation features are constructed based on the dialect matching features, the culture matching features and the policy matching features of the news texts; the news texts are matched with four types of preset keywords, i.e. livelihood, infrastructure, culture and ecology, so as to determine news text categories and news text category indexes; a news text heat index is constructed based on the number of forwarding, commenting and liking of the news texts and the regional correlation features of the news texts, and the news text category indexes are updated according to the news text heat indexes; and the news text categories are updated based on the news text heat indexes, the news text category indexes and the policy matching features. The application effectively improves the classification efficiency of news data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a news data classification method and device and electronic equipment. BACKGROUND

[0002] With the rapid spread of Internet news, traditional news classification methods rely on basic keyword matching or general topic models (such as LDA), which are difficult to adapt to the regional cultural diversity and policy sensitivity of regional content.

[0003] Existing technologies often use single-dimensional feature extraction, such as analyzing news topics based only on word frequency, ignoring deep regional association information such as dialect expression, local cultural customs, and policy orientation. Especially when dealing with local news, such methods are prone to misjudgment of cultural event attribution due to the dominance of general words, and cannot quantify the degree of news response to local policies. In addition, traditional heat calculation models often simply add up indicators such as forwarding, comments, etc., without dynamically adjusting classification weights in combination with the regional attributes of news, resulting in news that is highly interactive but deviates from regional core issues occupying resources, affecting the accuracy of policy promotion or cultural transmission. The static classification logic and single data source dependence of current technologies make it difficult to meet the comprehensive needs of accuracy, timeliness, and adaptability in personalized recommendation scenarios for local news. SUMMARY

[0004] The present application aims to provide a news data classification method, device and electronic equipment to solve at least one of the problems existing in the prior art.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] A news data classification method, comprising:

[0007] extracting dialect matching features, cultural matching features, and policy matching features of the collected news text;

[0008] constructing regional association features based on the dialect matching features, cultural matching features, and policy matching features of the news text;

[0009] matching the news text with four types of preset keywords, namely livelihood, infrastructure, culture, and ecology, to determine the news text category and news text category index;

[0010] constructing a heat index of the news text based on the number of forwards, comments, and likes of the news text and the regional association features of the news text, and updating the news text category index according to the heat index of the news text;

[0011] updating the news text category based on the heat index of the news text, the news text category index, and the policy matching features.

[0012] Optionally, dialect words are extracted from the news text, the number of dialect words in the news text is counted as F, the total number of words in the news text is counted as Fz, and the dialect matching feature of the news text is set as Mf, where Mf is expressed as:

[0013] ;

[0014] In the formula, dk is the edit distance between the k-th dialect word and the corresponding standard word in the news text, and Dmax is the edit distance threshold.

[0015] Optionally, let Wj be the number of sentences in the news text containing the j-th cultural keyword, and Wz be the total number of sentences in the news text. Let Mh be the cultural matching feature, and the expression for Mh is: In the formula, α1 is the first weight, α2 is the second weight, α1+α2=1, J is the number of cultural keywords in the news text, and Jz is the preset number threshold.

[0016] Optionally, the relevance of the news text to each policy document in the target region's policy database is calculated, and the relevance Qi between the news text and the i-th policy document in the target region's policy database is expressed as:

[0017] ;

[0018] In the formula, Ti is the number of words in the i-th policy document in the target region policy library, tf(ti) is the number of times the ti-th word in the i-th policy document in the target region policy library appears in the news text, k1 is the saturation control factor, b is the length normalization factor, G is the average number of words in all policy documents in the target region policy library, N is the average number of words in all documents in the policy library, and df(ti) is the number of policy documents in the target region policy library that contain the ti-th word in the i-th policy document;

[0019] The ratio of the average relevance of each policy document in the target region's policy database to a preset relevance threshold is used as the policy matching feature, denoted as zf.

[0020] Optionally, the dialect matching feature Mf, cultural matching feature Mh, and policy matching feature zf of the news text are fused to construct a regional association feature Dy. The expression of Dy is: Dy=x1×Mf+x2×Mh+x3×zf; where x1 is the dialect weight, x2 is the cultural weight, and x3 is the policy weight.

[0021] Optionally, the news text is matched with preset keywords for each category, and a category score is calculated based on the matching results. The matching score of the news text with the preset keywords of category c is denoted as Sc, and the expression for Sc is: In the formula, Ca is the number of pre-defined keywords of category c in the news text, and Wca is the position weight of the ca-th pre-defined keyword of category c in the news text.

[0022] Optionally, a popularity index H for the news text is constructed based on the number of reposts, comments, and likes, as well as the geographical association features of the news text. The expression for the popularity index H of the news text is as follows:

[0023] H=ln(β1×r1 / u1+β2×r2 / u2+β3×r3 / u3+1)×tanh(3×Dy);

[0024] In the formula, H is the popularity index of the news text, β1 is the forwarding weight, β2 is the comment weight, β3 is the like weight, β1+β2+β3=1, r1 is the number of forwards, u1 is the forwarding threshold, r2 is the number of comments, u2 is the comment threshold, r3 is the number of likes, u3 is the like threshold;

[0025] The popularity index H of the news text is compared with the popularity threshold H0. When H is greater than or equal to H0, the news text category index is updated to Sg.

[0026] Optionally, the popularity index, category index, and policy matching characteristics of the news text are fused to construct a confidence index ZX for the news text. The expression for the confidence index ZX is as follows:

[0027] ZX = (2 × News Text Category Index × H) / {(News Text Category Index + H) × [1 + exp(-5 × zf)]};

[0028] The confidence index ZX is compared with the confidence threshold zx0. When ZX is less than zx0, the news text category is updated to no category; otherwise, the news text category is maintained.

[0029] According to another aspect of this application, a news data classification device is provided, comprising:

[0030] The feature extraction unit is used to extract dialect matching features, cultural matching features, and policy matching features from the collected news texts.

[0031] The association feature construction unit is used to construct regional association features based on dialect matching features, cultural matching features, and policy matching features of news text;

[0032] The classification unit is used to match news texts with four preset keywords: people's livelihood, infrastructure, culture, and ecology, in order to determine the news text category and the news text category index.

[0033] The popularity construction unit is used to construct a popularity index for news texts based on the number of reposts, comments, and likes, as well as the regional association features of news texts, and to update the news text category index based on the popularity index of news texts.

[0034] The category update unit is used to update the news text category based on the news text popularity index, news text category index and policy matching features.

[0035] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0036] One or more processors;

[0037] Storage device for storing one or more programs;

[0038] When the one or more programs are executed by the one or more processors, the one or more processors implement the news data classification method.

[0039] The beneficial effects of this invention are as follows: This solution significantly improves the accuracy, regional adaptability, and timeliness of news classification through multi-level feature mining and dynamic feedback mechanisms. First, by integrating multi-dimensional analysis of dialect vocabulary, cultural keywords, and policy relevance, it breaks through the limitations of traditional single-semantic classification, accurately capturing the regional characteristics of news, especially suitable for regions with complex dialects and diverse cultures (such as Minnan and Cantonese-speaking areas), ensuring that local events are not diluted by common vocabulary. Second, based on the heat calculation of user interaction data and regional relevance, the classification priority is dynamically adjusted, automatically highlighting highly disseminated news. Third, through keyword position weighting and confidence filtering mechanisms, the robustness of identifying core issues such as people's livelihood and infrastructure is strengthened, avoiding misclassification interference. Finally, it balances policy guidance and public attention, achieving efficient matching of "content-region-demand." Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating the news data classification method in this embodiment.

[0042] Figure 2 This is a flowchart illustrating the feature extraction method described in this embodiment.

[0043] Figure 3 This is a flowchart illustrating the method for updating the news text category index in this embodiment.

[0044] Figure 4 This is a schematic diagram of the news data classification device in this embodiment.

[0045] Figure 5 This is a schematic diagram of the electronic device in this embodiment. Detailed Implementation

[0046] To more clearly illustrate the present invention, the following description, in conjunction with preferred embodiments and accompanying drawings, further explains the invention. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.

[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0048] Specifically, the news data classification method described in this embodiment is applied to the classification of local news, providing regional users (such as those in the Minnan region) with news content that conforms to their dialect and cultural preferences, thereby increasing user dwell time.

[0049] Please see Figure 1 As shown, it is a flowchart illustrating the news data classification method of this embodiment, including:

[0050] Step S101: Extract dialect matching features, cultural matching features, and policy matching features from the collected news texts.

[0051] Specifically, by mining dialect words, cultural expressions, and policy relevance in news reports, we can capture the regional attributes and cultural background of the text from multiple dimensions, enhance our sensitivity to local characteristics, and provide multi-dimensional feature support for subsequent classification.

[0052] For example, in this embodiment, news text in a target area can be crawled by a web crawler. The target area is the area where news text is classified in this embodiment, and structured fields such as title, body text, and publication time are extracted. This embodiment does not specifically limit the method of collecting news text, and those skilled in the art can set it freely according to their needs.

[0053] Please see Figure 2 As shown, the feature extraction method includes:

[0054] Step S201: Extract dialect matching features from the collected news text.

[0055] Specifically, dialect words are extracted from the news text, the number of dialect words in the news text is counted as F, the total number of words in the news text is counted as Fz, and the dialect matching feature of the news text is set as Mf, the expression of Mf is:

[0056] ;

[0057] In the formula, dk is the edit distance between the k-th dialect word and the corresponding standard word in the news text, and Dmax is the edit distance threshold.

[0058] Specifically, this embodiment only analyzes news texts containing dialect words.

[0059] Specifically, it identifies dialectal vocabulary unique to news articles and the degree of difference between them and standard vocabulary, accurately reflects the localization tendency of the text, avoids overlooking local characteristics due to the dominance of common words, and improves the pertinence of regional analysis.

[0060] For example, in this embodiment, the editing distance threshold can be set to 5; this embodiment does not specifically limit the setting of the editing distance threshold, and those skilled in the art can set it freely according to their needs.

[0061] Specifically, in this embodiment, the edit distance between dialect words and their corresponding standard words is the minimum number of edit operations required to convert a dialect word into its standard form in the standard vocabulary.

[0062] Exemplarily, when extracting dialect words from news texts in this embodiment, a dialect word dictionary of the target region can be obtained, such as the "Dictionary of Minnan Dialect", etc. Use a pre-trained dialect NER model (such as CRF + BiLSTM) to scan the full news text. After text tokenization, the model is used to determine whether each word is a dialect word, and only the dialect words that match the target region label are retained (for example, when processing Guangdong news, the words belonging to the "Guangdong" label are screened out), and the number of dialect words is counted as F; for obtaining the total number of words in the news text, the news text can be cleaned to remove noise such as punctuation marks, HTML tags, non-alphabetic characters, etc., and a Chinese word segmentation tool such as HanLP is used to segment the text, filter out stop words (such as "de", "le", "zai") and single-character words (such as "a", "o"), and only retain the words with practical meanings, and count the total number Fz; the pre-trained dialect NER model can be called to identify the word boundaries, and the Python Levenshtein library is used to obtain the edit distance between the dialect word and the corresponding standard word.

[0063] Please continue to refer to Figure 2 As shown, the feature extraction method further includes:

[0064] Step S202, extract the cultural matching features from the collected news text.

[0065] Specifically, the number of sentences containing the j-th cultural keyword in the news text is counted as Wj, the total number of sentences in the news text is counted as Wz, and the cultural matching feature is set as Mh. The expression of Mh is ; where α1 is the first weight, α2 is the second weight, α1 + α2 = 1, J is the number of cultural keywords in the news text, and Jz is the preset quantity threshold.

[0066] Specifically, by statistically analyzing the distribution density of cultural keywords at the sentence level, the deeply associated content of cultural events or traditions can be effectively identified, and the classification ability of news on cultural themes such as intangible cultural heritage and folk customs can be strengthened.

[0067] Exemplarily, in this embodiment, the first weight can be set to 0.7, the second weight can be set to 0.3, and the preset quantity threshold can be set to 50; in this embodiment, no specific limitations are imposed on the above values, and those skilled in the art can freely set them according to requirements.

[0068] For example, in this embodiment, a Chinese sentence segmentation tool (such as rule-based sentence segmentation or a pre-trained model) can be used to split the news text into independent sentences, using periods (.), question marks (?), exclamation marks (!), and newline characters (\n) as sentence boundary markers, and handling special cases (such as ellipses "..." needing to be merged into a single sentence terminator). At the same time, invalid sentences with a length less than a threshold are excluded (such as sentences with a length ≤ 2, which may be noise or typographical errors), and the total number of sentences is counted as Wz. Each sentence is then cleaned, and it is determined whether it contains cultural keywords. If a match is found, the counter is incremented by 1, and the total number of sentences in the news text is counted as Wz.

[0069] Please continue reading. Figure 2 As shown, the feature extraction method further includes:

[0070] Step S203: Extract policy matching features from the collected news text.

[0071] Specifically, the relevance of the news text to each policy document in the target region's policy database is calculated, and the relevance Qi between the news text and the i-th policy document in the target region's policy database is expressed as:

[0072] In the formula, Ti is the number of words in the i-th policy document in the target region policy library, tf(ti) is the number of times the ti-th word in the i-th policy document in the target region policy library appears in the news text, k1 is the saturation control factor, b is the length normalization factor, G is the average number of words in all policy documents in the target region policy library, N is the average number of words in all documents in the policy library, and df(ti) is the number of policy documents in the target region policy library that contain the ti-th word in the i-th policy document.

[0073] The ratio of the average relevance of each policy document in the target region's policy database to a preset relevance threshold is used as the policy matching feature, denoted as zf.

[0074] Specifically, quantifying the lexical relevance between news and local policies measures the degree of news dissemination or response to policies, and helps assess the social impact and public attention of news, thereby improving the accuracy of constructing the regional relevance features of news texts.

[0075] For example, in this embodiment, the saturation control factor can be set to 1.2, the length normalization factor can be set to 0.75, and the preset correlation threshold can be set to 50. In this embodiment, the above values ​​are not specifically limited, and those skilled in the art can set them freely according to their needs.

[0076] For example, in this embodiment, policy documents can be crawled periodically using a web crawler. The word frequency tf(ti) can be counted using Python's built-in collections.Counter, and the word count Ti can be calculated directly using len() after word segmentation. The average word count of all documents can be calculated using Python's numerical computing library, and df(ti) can be obtained by calling APIs such as .termvectors(). In this embodiment, no specific limitation is made on the above data acquisition method, and those skilled in the art can set it freely according to their needs.

[0077] Please continue reading. Figure 1 As shown, the news data classification method further includes:

[0078] Step S102: Construct regional association features based on dialect matching features, cultural matching features and policy matching features of news text.

[0079] Specifically, the dialect matching feature Mf, cultural matching feature Mh, and policy matching feature zf of the news text are fused to construct the regional association feature Dy. The expression of Dy is: Dy=x1×Mf+x2×Mh+x3×zf; where x1 is the dialect weight, x2 is the cultural weight, x3 is the policy weight, and x1+x2+x3=1.

[0080] Specifically, by integrating the characteristics of dialect, culture, and policy, a comprehensive regional correlation index is generated, avoiding the one-sidedness of single-feature analysis and improving the overall accuracy of regionally related content.

[0081] For example, in this embodiment, the dialect weight can be set to 0.5, the culture weight can be set to 0.3, and the policy weight can be set to 0.2. This embodiment does not specifically limit the above values, and those skilled in the art can set them freely according to their needs.

[0082] Please continue reading. Figure 1 As shown, the news classification method also includes:

[0083] Step S103: Match the news text with four preset keywords: people's livelihood, infrastructure, culture, and ecology to determine the news text category and the news text category index.

[0084] Specifically, the news text is matched with preset keywords for each category, and a category score is calculated based on the matching results. The matching score between the news text and the preset keywords for category c is denoted as Sc, and the expression for Sc is: In the formula, Ca is the number of pre-defined keywords of category c in the news text, and Wca is the position weight of the ca-th pre-defined keyword of category c in the news text. If it is in the title, Wca takes the value of 1; if it is in the first paragraph of the main text, Wca takes the value of 2; if it is in the last paragraph of the main text, Wca takes the value of 5; if it is in other paragraphs of the main text, Wca takes the value of 3.

[0085] The matching score between the news text and the preset keywords of each category is used as the category score of the news text. The category scores of the news text are sorted in descending order, and the category corresponding to the maximum category score is used as the category of the news text. The corresponding category score is used as the category index of the news text, denoted as Sh.

[0086] Specifically, in this embodiment, the preset keywords for the cultural category are the same as those for the cultural keywords mentioned above. c is the category number. When c=1, it is the category for people's livelihood; when c=2, it is the category for infrastructure; when c=3, it is the category for culture; and when c=4, it is the category for ecology. Ca includes repeated preset keywords. That is, when calculating the matching score, if repeated preset keywords appear in the news text, the position weight of each preset keyword needs to be counted.

[0087] Specifically, by using keyword position weighting to match fixed categories such as people's livelihood and infrastructure, the news topic can be clearly identified, and the content bias can be reflected by combining keyword weights, which helps to quickly locate the core area of ​​the news.

[0088] For example, this embodiment does not specifically limit the setting of position weights, and those skilled in the art can set them freely according to their needs.

[0089] For example, in this embodiment, the appearance of a preset keyword at any position in the news text is considered a successful match. The position of the preset keyword (such as a character index or paragraph number) is marked and recorded by a word segmentation tool. In this embodiment, the method of obtaining the position of the preset keyword in the news text is not specifically limited. Those skilled in the art can set it freely according to their needs.

[0090] For example, this embodiment does not specifically limit the setting of preset keywords for each category. Those skilled in the art can set them freely according to their needs. For example, in the Minnan region, "medical insurance subsidies, affordable housing projects, Taiwanese enterprise recruitment, fishermen subsidies, Jinjiang employment, village road hardening, tuition fee reduction..." can be used as preset keywords for people's livelihood. "Xiamen-Zhangzhou Railway, Quanzhou Bridge, Zhangzhou Nuclear Power Plant, port expansion, charging pile coverage, old pipeline renovation..." can be used as preset keywords for infrastructure. "Nanyin heritage, Huian stone carving, Mid-Autumn Festival mooncake gambling, Mazu parade, Minnan language textbooks, Tulou World Heritage application..." can be used as preset keywords for culture. "Oyster carbon sequestration, mangrove restoration, Jiulong River water quality, marine debris management, stone factory discharge ban, photovoltaic industrial park..." can be used as preset keywords for ecology.

[0091] Please continue reading. Figure 1 As shown, the news data classification method further includes:

[0092] Step S104: Construct a news text popularity index based on the number of reposts, comments, and likes of the news text and the regional association characteristics of the news text, and update the news text category index according to the news text popularity index.

[0093] Specifically, the system dynamically adjusts category priorities based on user interaction data to ensure that trending news is highlighted in the categories, thereby enhancing the ability to respond to public concerns in real time.

[0094] Please see Figure 3 As shown, the method for updating the news text category index includes:

[0095] Step S301: Construct a popularity index for news texts based on the number of reposts, comments, and likes, as well as the regional association characteristics of news texts.

[0096] Specifically, the expression for the popularity index of news text is as follows:

[0097] H=ln(β1×r1 / u1+β2×r2 / u2+β3×r3 / u3+1)×tanh(3×Dy);

[0098] In the formula, H is the popularity index of the news text, β1 is the forwarding weight, β2 is the comment weight, β3 is the like weight, β1+β2+β3=1, r1 is the number of forwards, u1 is the forwarding threshold, r2 is the number of comments, u2 is the comment threshold, r3 is the number of likes, and u3 is the like threshold.

[0099] Specifically, by integrating interactive metrics such as reposts and comments with regional characteristics, a normalized popularity score is generated, balancing differences in interaction volume and highlighting high-popularity content with local attributes.

[0100] For example, in this embodiment, the weight of forwarding can be set to 0.3, the weight of commenting can be set to 0.5, and the weight of liking can be set to 0.2. The threshold for forwarding can be set to 1000 times, the threshold for commenting can be set to 200 times, and the threshold for liking can be set to 5000 times. This embodiment does not specifically limit the values ​​of the above data, and those skilled in the art can set them freely according to their needs.

[0101] For example, in this embodiment, the number of reposts, comments, and likes of news text can be obtained through web crawling tools (such as Python's requests or Scrapy library); this embodiment does not specifically limit the acquisition method, and those skilled in the art can freely set it according to their needs.

[0102] Please continue reading.Figure 3 As shown, the method for updating the news text category index further includes:

[0103] Step S302: Update the news text category index based on the news text popularity index.

[0104] Specifically, the popularity index H of the news text is compared with the popularity threshold H0. When H is greater than or equal to H0, the news text category index is updated to Sg, where Sg = Sh × γ; and γ is the update coefficient.

[0105] Specifically, by triggering category index adjustments through popularity thresholds, the classification weight of highly disseminated news is dynamically increased, thereby enhancing the exposure priority of high-quality content and optimizing the information acquisition efficiency for users or decision-makers.

[0106] For example, in this embodiment, the heat threshold can be set to 0.6 and the update coefficient can be set to 1.2; this embodiment does not specifically limit the values ​​of the above data, and those skilled in the art can set them freely according to their needs.

[0107] Please continue reading. Figure 1 As shown, the news data classification method further includes:

[0108] Step S105: Update the news text category based on the news text popularity index, news text category index, and policy matching features.

[0109] Specifically, the popularity index, category index, and policy matching characteristics of news texts are fused to construct a confidence index for news texts. The expression for the confidence index is as follows:

[0110] ZX = (2 × News Text Category Index × H) / {(News Text Category Index + H) × [1 + exp(-5 × zf)]};

[0111] The confidence index ZX is compared with the confidence threshold zx0. When ZX is less than zx0, the news text category is updated to no category; otherwise, the news text category is maintained.

[0112] Specifically, the final filtering is based on a combination of popularity, classification score, and policy relevance, eliminating misclassification results that are of low credibility or deviate from the key points, ensuring that the output results are accurate, timely, and policy-oriented.

[0113] For example, in this embodiment, the confidence threshold can be set to 0.6. This embodiment does not specifically limit the value of the confidence threshold, and those skilled in the art can set it freely according to their needs.

[0114] Please see Figure 4 As shown, the news data classification device includes:

[0115] The feature extraction unit is used to extract dialect matching features, cultural matching features, and policy matching features from the collected news texts.

[0116] The association feature construction unit is used to construct regional association features based on dialect matching features, cultural matching features, and policy matching features of news text;

[0117] The classification unit is used to match news texts with four preset keywords: people's livelihood, infrastructure, culture, and ecology, in order to determine the news text category and the news text category index.

[0118] The popularity construction unit is used to construct a popularity index for news texts based on the number of reposts, comments, and likes, as well as the regional association features of news texts, and to update the news text category index based on the popularity index of news texts.

[0119] The category update unit is used to update the news text category based on the news text popularity index, news text category index and policy matching features.

[0120] The news data classification device provided in this application embodiment can execute the news data classification method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.

[0121] Please see Figure 5 As shown, it is a structural schematic diagram of an electronic device in this embodiment. The electronic device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0122] like Figure 5As shown, the electronic device includes: a processor 501, a memory 502, a communication interface 503, and a system bus 504. The processor includes at least one of a central processing unit (CPU), a graphics processing unit (GPU), or a field-programmable gate array (FPGA), configured to call computer programs and data stored in the memory and generate control instructions; the memory includes random access memory (RAM) and / or non-volatile memory (NVM), the NVM including flash memory, solid-state drive (SSD), or a combination thereof, used to store computer programs, process intermediate data, and historical data sets; the communication interface includes a wired communication module and a wireless communication module, the wired communication module supporting Ethernet or RS-485 protocols for connecting to sensor networks; the wireless communication module supporting LoRa, 5G, or satellite communication protocols for transmitting processing results to a remote server; the system bus adopts a PCI Express or AXI bus architecture to achieve high-speed data interaction and clock synchronization between the processor, memory, and communication interface.

[0123] This embodiment also provides a computer-readable storage medium, which physically stores computer-executable instructions. When the instructions are transmitted to the processing unit via the integrated circuit substrate, they are encapsulated and processed through the data channel of the bus system and then solidified into the non-volatile storage area of ​​the storage module. The executable instructions are configured to implement the complete technical solution of the news data classification method when executed by the processor.

[0124] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.

Claims

1. A method for classifying news data, characterized in that, include: Extract dialect matching features, cultural matching features, and policy matching features from the collected news texts; Regional association features are constructed based on dialect matching features, cultural matching features, and policy matching features of news texts; The news texts are matched with four preset keywords: people's livelihood, infrastructure, culture, and ecology, to determine the news text category and the news text category index. A popularity index for news texts is constructed based on the number of reposts, comments, and likes, as well as the geographical association characteristics of news texts. The news text category index is then updated based on the popularity index. The news text category is updated based on the news text popularity index, news text category index, and policy matching characteristics. Extract dialect words from news texts, count the number of dialect words in the news text as F, count the total number of words in the news text as Fz, and set the dialect matching feature of the news text as Mf, where Mf is expressed as: ; In the formula, dk is the edit distance between the k-th dialect word and the corresponding standard word in the news text, and Dmax is the edit distance threshold.

2. The news data classification method according to claim 1, characterized in that, Let Wj be the number of sentences in the news text containing the j-th cultural keyword, and Wz be the total number of sentences in the news text. Let Mh be the cultural matching feature, and the expression for Mh is: In the formula, α1 is the first weight, α2 is the second weight, α1+α2=1, J is the number of cultural keywords in the news text, and Jz is the preset number threshold.

3. The news data classification method according to claim 2, characterized in that, Calculate the relevance between the news text and each policy document in the target region's policy database, and assign the relevance Qi between the news text and the i-th policy document in the target region's policy database. The expression for Qi is: ; In the formula, Ti is the number of words in the i-th policy document in the target region policy library, tf(ti) is the number of times the ti-th word in the i-th policy document in the target region policy library appears in the news text, k1 is the saturation control factor, b is the length normalization factor, G is the average number of words in all policy documents in the target region policy library, N is the average number of words in all documents in the policy library, and df(ti) is the number of policy documents in the target region policy library that contain the ti-th word in the i-th policy document; The ratio of the average relevance of each policy document in the target region's policy database to a preset relevance threshold is used as the policy matching feature, denoted as zf.

4. The news data classification method according to claim 3, characterized in that, The dialect matching feature Mf, cultural matching feature Mh, and policy matching feature zf of the news text are fused to construct the regional association feature Dy. The expression of Dy is: Dy=x1×Mf+x2×Mh+x3×zf; where x1 is the dialect weight, x2 is the cultural weight, and x3 is the policy weight.

5. The news data classification method according to claim 4, characterized in that, The news text is matched with preset keywords for each category, and a category score is calculated based on the matching results. The matching score of the news text with the preset keywords of category c is denoted as Sc, and the expression for Sc is: In the formula, Ca is the number of pre-defined keywords of category c in the news text, and Wca is the position weight of the ca-th pre-defined keyword of category c in the news text.

6. The news data classification method according to claim 5, characterized in that, A popularity index H for news texts is constructed based on the number of reposts, comments, and likes, as well as the geographical association features of the news texts. The expression for the popularity index H of news texts is as follows: H=ln(β1×r1 / u1+β2×r2 / u2+β3×r3 / u3+1)×tanh(3×Dy); In the formula, H is the popularity index of the news text, β1 is the forwarding weight, β2 is the comment weight, β3 is the like weight, β1+β2+β3=1, r1 is the number of forwards, u1 is the forwarding threshold, r2 is the number of comments, u2 is the comment threshold, r3 is the number of likes, u3 is the like threshold; The popularity index H of the news text is compared with the popularity threshold H0. When H is greater than or equal to H0, the news text category index is updated to Sg.

7. The news data classification method according to claim 6, characterized in that, The popularity index, category index, and policy matching characteristics of news texts are fused to construct a confidence index ZX for news texts. The expression for the confidence index ZX is as follows: ZX = (2 × News Text Category Index × H) / {(News Text Category Index + H) × [1 + exp(-5 × zf)]}; The confidence index ZX is compared with the confidence threshold zx0. When ZX is less than zx0, the news text category is updated to no category; otherwise, the news text category is maintained.

8. A news data classification device, applied to the news data classification method as described in claim 1, characterized in that, include: The feature extraction unit is used to extract dialect matching features, cultural matching features, and policy matching features from the collected news texts. The association feature construction unit is used to construct regional association features based on dialect matching features, cultural matching features, and policy matching features of news text; The classification unit is used to match news texts with four preset keywords: people's livelihood, infrastructure, culture, and ecology, in order to determine the news text category and the news text category index. The popularity construction unit is used to construct a popularity index for news texts based on the number of reposts, comments, and likes, as well as the regional association features of news texts, and to update the news text category index based on the popularity index of news texts. The category update unit is used to update the news text category based on the news text popularity index, news text category index and policy matching features.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the news data classification method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Policy influence analysis method and device, computer device and storage medium

    CN109635082A

  • News recommendation method based on image-text combination

    CN120011634A